Configure the Telegraf agent on a Linux VM
search cancel

Configure the Telegraf agent on a Linux VM

book

Article ID: 394946

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite) VMware Aria Operations (formerly vRealize Operations) 8.x

Issue/Introduction

  • How to configure the Telegraf agent
  • How to collect collect metrics from within the guest OS
  • How to collect custom metrics/properties

Environment

8.16.x, 8.17.x, 8.18.x

Resolution

  1. Install the Telegraf agent on the end point. See the official documentation and search for the corresponding OS version from Telegraf downloads
  2. Obtain the helper script from the cloud proxy:  
    https://<CloudProxy>/downloads/salt/telegraf-utils.sh
  3. Create a folder at the root path such as /opt/telegraf and create another folder inside that folder for the configuration data such as C:\telegraf\telegraf.d.
    Note: DO not create a folder with spaces in it as it will cause the process to fail
  4. Copy or move the files from the telegraf download and the helper script into the folder you created e.g. /opt/telegraf
  5. Run the windows service install command for the telegraf agent in a powershell prompt running as administrator: 
    .\telegraf.exe --service install --config C:\telegraf\telegraf.conf --config-directory C:\telegraf\telegraf.d
  6. Start the service:
    .\telegraf.exe --service start
  7. Obtain an API authentication token from Aria Operations by using:  
    https://<VMwareAriaOperations_IP>/suite-api/ or curl -ks -X POST https://<VMwareAriaOperations_IP>/suite-api/api/auth/token/acquire -H \"Content-Type: application/json\" -H \"Accept: application/json\" -d \"{\"username\":\"<VMwareAriaOperations_USER>\",\"password\":\"<VMwareAriaOperations_USER_PASSWORD>\"}\")
  8. Run the helper script:
    .\telegraf-utils.ps1 opensource -c <Cloud Proxy IP or FQDN> -t <Aria Operations API token> -v <Aria Operations IP or FQDN>
  9. Restart the telegraf agen:
    .\telegraf.exe --service stop' followed by '.\telegraf.exe --service start