Configure the Telegraf agent on a Windows VM
search cancel

Configure the Telegraf agent on a Windows VM

book

Article ID: 389884

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite) VMware Telco Cloud Platform

Issue/Introduction

For Windows machines (physical or virtual), you can setup and configure the open source telegraf agent to receive custom data.

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

Environment

Aria Ops, vROps: 8.16.x, 8.17.x, 8.18.x, 8.18.6

TCP: 5.x, 5.0, 5.0.1, 5.0.2, 5.1

Resolution

Prerequisite:

In order to setup a telegraf agent, you must install the cloud proxy first. See Installing Cloud Proxy in Aria Operations

  1. Install and Configure Open Source Telegraf agent

  2. Obtain the helper script from the cloud proxy:  https://<CloudProxy>/downloads/salt/telegraf-utils.ps1 and save the file in the local system

  3. Create a folder at the root path such as 'C:\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 'C:\telegraf\"

  5. Now that you have the files there, 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 using '.\telegraf.exe --service start'

  7. Acquire an API authentication token

    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. Next you need to run the helper script :  .\telegraf-utils.ps1  opensource -c cloud_proxy_ip_or_collector_group_name -t token -d telegraf_conf_dir -e telegraf_bin_path -v vmwareariaoperations_ip_or_fqdn
    Description of arguments:

          -c : [REQUIRED] cloud_proxy_ip_or_collector_group_name - Cloud Proxy IP or Collector Group Name
          -t : [REQUIRED] token - Auth Token of the user/account. For getting a new token:
               (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>\"}\")
          -d : [REQUIRED] telegraf_conf_dir - Telegraf configuration directory and it is required argument. ex: C:\Telegraf\telegraf-1.20.4\telegraf.d
          -e : [REQUIRED] telegraf_bin_path - Path of telegraf executable ex: C:\Telegraf\telegraf-1.20.4\telegraf.exe
          -v : [REQUIRED] vmwareariaoperations_ip_or_fqdn - IP/FQDN of VMware Aria Operations master node and required for on-prem

  9. Once completed, you should restart the telegraf agent using '.\telegraf.exe --service stop' followed by '.\telegraf.exe --service start'

    NOTE:  All commands should be run within a powershell prompt running as Administrator and wait for 10 min to appear in the Aria operations

    Additional Information

    • Telegraf agents cannot start as a Windows service until they have been fully configured.

    See: Configure Open Source Telegraf in Aria Operations