-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
azure_monitor support for VM scale sets #5819
Comments
Hello @johncrim i have ubuntu 18.04 LTS VMSS on azure , below are the steps which i followed: apt install telegraf -y
But still telegraf metric not able to visible in the metric option at vmss, can you please help here it will be more helpful. telegraf status telegraf.service - Telegraf Nov 14 18:01:09 waf-teleg000000 telegraf[3505]: 2023-11-14T18:01:09Z I! Tags enabled: host=waf-teleg000000 Telegraf config file. #Send aggregate metrics to Azure Monitor #Set the namespace prefix, defaults to "Telegraf/". #Azure Monitor doesn't have a string value type, so convert string #Both region and resource_id must be set or be available via the The Azure Resource ID against which metric will be logged, e.g. Please share any example telegraf config file, i wanted to achieve based on the Apache requests in telegraf metric wanted to scale up vmss |
Currently, the
azure_monitor
output plugin doesn't correctly resolve Virtual Machine Scaleset Resource IDs for VMs that are part of scale sets. It only works correctly/automatically for single + individually configured Virtual Machines. By default VMs in ScaleSets receive a bunch of 404 errors in the telegraf log, and it's difficult to diagnose the cause.Proposal:
The
resourceIDTemplate
unnecessarily constrains the resource ID to non-scaleset VMs:Fixing this template is easy enough - the harder part is adding logic to determine whether the VM is running singly or within a scaleset resource.
Scaleset VMs do have the Instance Metadata service running, and managed service identity works the same. The only difference needed for this plugin to work correctly is for the correct resource ID to be determined, using a template like:
Current behavior:
Currently, if this setup is performed on a VM in a scaleset:
The telegraf service log starts showing a bunch of 404 errors, though the URL isn't specified.
If the resourceID is manually set to the VM ScaleSet resource Id in
telegraf.conf
, the telegraf metrics are sent as expected.Desired behavior:
Installing and configuring the
azure_monitor
output plugin, as specified (and as documented in the Microsoft and Influx docs) just works.Use case:
Much of the cloud native use-cases for Azure use VM scalesets (eg Kubernetes or ServiceFabric). Adding this support makes telegraf useable in Azure for VMs that aren't individually configured.
The text was updated successfully, but these errors were encountered: