If you do not use the helper script, you must provide specific configurations required on the end point to post metrics to cloud proxy. Based on whether the vCenter Server VM, the EC2 AWS instance, or the Azure VM is managed or unmanaged, the following configurations must be provided for open source Telegraf.You must provide correct values for the variables enclosed in <>.
If you do not use the helper script, you must download mandatory_tags.sh or mandatory_tags.bat and provide the path to the script that you have downloaded and the path to the Telegraf executable. For example, in the following code, you must provide the following: <Path to mandatory_tags.sh/bat> <path to telegraf executable>.
For Linux, download the mandatory_tags.sh from cloud proxy located at https://<CP_IP>/downloads/salt/mandatory_tags.sh.
Managed vCenter Server VM
[agent] interval = "300s" round_interval = true metric_batch_size = 1000 metric_buffer_limit = 2000 collection_jitter = "0s" flush_interval = "60s" flush_jitter = "0s" precision = "" debug = false quiet = false logfile = "" hostname = "<VM_NAME/HOSTNAME>" omit_hostname = false # Configuration for HTTP server to send metrics to [[outputs.http]] url = "https://<CP_IP_or_FQDN>:8443/opensource/default/metric" timeout = "5s" method = "POST" insecure_skip_verify = true data_format = "wavefront" ## Additional HTTP headers [outputs.http.headers] Content-Type = "text/plain; charset=utf-8" vmId = "<VM_MOR>" vcid = "<VC_ID>" hostname = "<VM_NAME/HOSTNAME>" uuid = "" [[inputs.exec]] commands = ["/bin/bash <Path to mandatory_tags.sh/bat> <path to telegraf executable>"] timeout = "5s" data_format = "influx"
Managed AWS EC2 Instance
[agent] interval = "300s" round_interval = true metric_batch_size = 1000 metric_buffer_limit = 2000 collection_jitter = "0s" flush_interval = "60s" flush_jitter = "0s" precision = "" debug = false quiet = false logfile = "" hostname = "<EC2_INSTANCE_NAME/HOSTNAME>" omit_hostname = true # Configuration for HTTP server to send metrics to [[outputs.http]] url = "https://<CP_IP_or_FQDN>:8443/opensource/default/metric" timeout = "5s" method = "POST" insecure_skip_verify = true data_format = "wavefront" ## Additional HTTP headers [outputs.http.headers] Content-Type = "text/plain; charset=utf-8" vmId = "i-< EC2_INSTANCE_ID>" vcid = "<REAGON>" hostname = "<EC2_INSTANCE_NAME/HOSTNAME>" uuid = "aws" [[inputs.exec]] commands = ["/bin/bash <Path to mandatory_tags.sh/bat> <path to telegraf executable>"] timeout = "5s" data_format = "influx"
Managed Azure VM
[agent] interval = "300s" round_interval = true metric_batch_size = 1000 metric_buffer_limit = 2000 collection_jitter = "0s" flush_interval = "60s" flush_jitter = "0s" precision = "" debug = false quiet = false logfile = "" hostname = "<AZURE_VIRTUAL_MACHINE_NAME/HOSTNAME>" omit_hostname = true # Configuration for HTTP server to send metrics to [[outputs.http]] url = "https://<CP_IP_or_FQDN>:8443/opensource/default/metric" timeout = "5s" method = "POST" insecure_skip_verify = true data_format = "wavefront" ## Additional HTTP headers [outputs.http.headers] Content-Type = "text/plain; charset=utf-8" vmId = ";subscriptions;<SUBSCRIPTION_ID>;resourceGroups;<AZURE_RESOURCE_GROUP>;providers;Microsoft.Compute;virtualMachines;<AZURE_VIRTUAL_MACHINE_NAME>" vcid = "<SUBSCRIPTION_ID>" hostname = "<AZURE_VIRTUAL_MACHINE_NAME/HOSTNAME>" uuid = "azure" [[inputs.exec]] commands = ["/bin/bash \"/etc/telegraf/telegraf.d/mandatory_tags.sh\" \"/usr/bb in/telegraf\""] timeout = "5s" data_format = "influx"
Unmanaged vCenter Server VMs, AWS EC2 Instances, and Azure VMs
[agent] interval = "300s" round_interval = true metric_batch_size = 1000 metric_buffer_limit = 2000 collection_jitter = "0s" flush_interval = "60s" flush_jitter = "0s" precision = "" debug = false quiet = false logfile = "" hostname = "<VM_NAME/HOSTNAME>" omit_hostname = false # Configuration for HTTP server to send metrics to [[outputs.http]] url = "https://<CP_IP_or_FQDN>:8443/opensource/default/metric" timeout = "5s" method = "POST" insecure_skip_verify = true data_format = "wavefront" ## Additional HTTP headers [outputs.http.headers] Content-Type = "text/plain; charset=utf-8" uuid = "<UUID>" ip = "<IP_ADDRESS>" hostname = "<VM_NAME/HOSTNAME>" [[inputs.exec]] commands = ["/bin/bash <Path to mandatory_tags.sh/bat> <path to telegraf executable>"] timeout = "5s" data_format = "influx"