Si no utiliza el script de aplicación auxiliar, debe proporcionar configuraciones específicas necesarias en el dispositivo para publicar métricas en el proxy de nube. En función de si la máquina virtual vCenter Server, la instancia de EC2 AWS o la máquina virtual de Azure están administradas o no, se deben proporcionar las siguientes configuraciones para Telegraf de código abierto.Debe proporcionar los valores correctos para las variables entre <>.
Si no utiliza el script auxiliar, debe descargar mandatory_tags.sh o mandatory_tags.bat y proporcionar la ruta de acceso al script que descargó y la ruta de acceso al ejecutable de Telegraf. Por ejemplo, en el siguiente código, debe proporcionar lo siguiente: <Ruta de acceso a mandatory_tags.sh/bat> <ruta de acceso al ejecutable de Telegraf>.
Para Linux, descargue mandatory_tags.sh desde el proxy de nube ubicado en https://<CP_IP>/downloads/salt/mandatory_tags.sh.
Máquina virtual vCenter Server administrada
[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"
Instancia de EC2 de AWS administrada
[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"
Máquina virtual de Azure administrada
[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"
Máquinas virtuales de vCenter Server no administradas, instancias de AWS EC2 y máquinas virtuales de Azure
[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"