Wenn Sie das Hilfsskript nicht verwenden, müssen Sie bestimmte Konfigurationen bereitstellen, die am Endpunkt erforderlich sind, um Metriken an den Cloud-Proxy zu übermitteln. Je nachdem, ob die vCenter Server-VM, die EC2-AWS-Instanz oder die Azure-VM verwaltet oder nicht verwaltet ist, müssen die folgenden Konfigurationen für Open Source Telegraf bereitgestellt werden.Sie müssen die korrekten Werte für die Variablen zwischen den spitzen Klammern (<>) angeben.
Wenn Sie das Hilfsskript nicht verwenden, müssen Sie „mandatory_tags.sh“ oder „mandatory_tags.bat“ herunterladen und den Pfad zum heruntergeladenen Skript sowie den Pfad zur ausführbaren Telegraf-Datei angeben. Beispielsweise müssen Sie im folgenden Code Folgendes angeben: <Path to mandatory_tags.sh/bat> <path to telegraf executable>.
Laden Sie für Linux die Datei „mandatory_tags.sh“ vom Cloud-Proxy unter https://<CP_IP>/downloads/salt/mandatory_tags.sh herunter.
Verwaltete 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"
Verwaltete AWS-EC2-Instanz
[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"
Verwaltete 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"
Nicht verwaltete vCenter Server-VMs, AWS EC2-Instanzen und 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"