Si vous n'utilisez pas le script d'aide, vous devez fournir des configurations spécifiques requises sur le point de terminaison afin de publier des mesures vers le proxy cloud. Selon que la machine virtuelle vCenter Server, l'instance d'AWS EC2 ou la machine virtuelle Azure est gérée ou non gérée, les configurations suivantes doivent être fournies pour Telegraf open sourceVous devez fournir des valeurs correctes pour les variables et les inclure entre <>.

Si vous n'utilisez pas le script d'aide, vous devez télécharger mandatory_tags.sh ou mandatory_tags.bat et fournir le chemin d'accès au script que vous avez téléchargé et le chemin d'accès à l'exécutable Telegraf. Par exemple, dans le code suivant, vous devez fournir ce qui suit : <chemin d'accès à mandatory_tags.sh/bat> <chemin d'accès à l'exécutable telegraf>.

Pour Linux, téléchargez le fichier mandatory_tags.sh à partir du proxy cloud situé dans https://<CP_IP>/downloads/salt/mandatory_tags.sh.

Pour Windows, téléchargez le fichier mandatory_tags.ps1 à partir du proxy cloud situé dans https://<CP_IP>/downloads/salt/mandatory_tags.ps1.
Note : Pour Windows et Linux, utilisez l'adresse IP/le nom de domaine complet du proxy cloud approprié pour <CP_IP> dans les commandes et l'emplacement précédents spécifiés. Pour les groupes de collecteurs activés pour la haute disponibilité de surveillance d'applications, fournissez l'adresse IP virtuelle.

Machine virtuelle vCenter Server gérée

[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"

Instance d'AWS EC2 gérée

[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"

Machine virtuelle Azure gérée

[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"

Machines virtuelles vCenter Server, instances d'AWS EC2 et machines virtuelles Azure non gérées

[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"