Use the helper script to monitor applications and operating systems on a Linux platform using open source Telegraf.

The helper script is tested only on the following operating systems:
  • CentOS 7.x and CentOS 8.x
  • RHEL 7.x and RHEL 8.x
  • SUSE 12.x and SUSE 15.x
  • OEL7.x and OEL 8.x
  • Ubuntu 16.x, Ubuntu 18.x, Ubuntu 20.x, and Ubuntu 22.x
  • VMware Photon Linux

Prerequisites

  • Install the jq package. For more information, see the official documentation for jq from https://stedolan.github.io/jq/download/.
  • Ensure that VMTools version >=10.2 if a vCenter Server VM is monitored by VMware Aria Operations. vmware-toolbox-cmd is necessary only for vCenter Server VMs.
  • Ensure that you have permissions to run the following commands and use the following packages:
    • Commands: /bin/bash, awk, sed, vmware-toolbox-cmd, jq, curl
    • Packages: coreutils (chmod, chown, cat), net-tools (ip, /dev/tcp, curl, wget)
  • Only IPv4 is supported at present for cloud proxy.
  • Ensure that Internet is activated.
  • Ensure that cloud proxy is up and online in VMware Aria Operations. In the case of collector groups, ensure that at least one cloud proxy in the application monitoring high availability activated collector group is up and online in VMware Aria Operations.
  • Verify that unzip is at 6.0-20.el7 or above.
  • The uuidgen package must exist on the vCenter Server VMs, AWS EC2 instances, Azure VMs, or the physical server.
  • vCenter Server VMs, AWS EC2 instances, Azure VMs, or the physical server must have access to port 8443 and 443 of cloud proxy or the virtual IP of the application monitoring high availability activated collector group.

Procedure

  1. Download the helper script from cloud proxy located at https://<CloudProxy-IP>/downloads/salt/telegraf-utils.sh.
    Note: Use the relevant cloud proxy IP address for <CloudProxy-IP> in the preceding commands and location specified. For application monitoring high availability activated collector groups, provide the virtual IP.
  2. Navigate to the directory where the script is downloaded.
  3. Activate execution permission of the script for Linux VM.
    chmod +x telegraf-utils.sh
  4. Run the helper script to update Telegraf configurations.
    telegraf-utils.sh  opensource -c cloud_proxy_ip_or_collector_group_name -t token -d telegraf_conf_dir -e telegraf_bin_path [-g gateway_url -a csp_auth_url]
        
    Description of arguments:
          -c : [REQUIRED] cloud_proxy_ip_or_collector_group_name - Cloud Proxy IP or Collector Group Name
           -t : [REQUIRED] token - CSP Refresh Token of the user/account. For getting a new token, 
              follow - User/Organization Settings >> My Account >> API Tokens >> Generate a New API Token.
              Example: gi7lwabjnvdfiawt4watzksuol8sywrjvg8kabh31mx9x1guepgyhycyx61dqrpq
          
          -d : [REQUIRED] telegraf_conf_dir - Telegraf configuration directory and it is required argument. ex: /etc/telegraf/telegraf.d
          -e : [REQUIRED] telegraf_bin_path - Path of telegraf executable ex: /usr/bin/telegraf
          
          -g : [OPTIONAL] [SAAS-SPECIFIC] gateway_url - argument to override default VMware Aria Operations SaaS gateway URL
          -a : [OPTIONAL] [SAAS-SPECIFIC] csp_auth_url - argument to override default CSP authentication URL
    
    
    Example: /bin/bash telegraf-utils.sh opensource -t gi7lwabjnvdfiawt4watzksuol8sywrjvg8kabh31mx9x1guepgyhycyx61dqrpq -c 10.10.10.101 -d /etc/telegraf/telegraf.d -e /usr/bin/telegraf 
    Note: After you run the helper script, ensure that the respective configurations are set correctly in the given config directory ( -d option) path with the name cloudproxy-http.conf. See Sample Configurations for more details. For managed vCenter Server VMs, AWS EC2 instances, or Azure VMs, you might see unmanaged configurations, because of one of the following reasons:
    • vCenter Server VMs, AWS EC2 instances, or Azure VMs details are not available in VMware Aria Operations by the vCenter Server, AWS, or Azure adapters correspondingly. Wait for a minimum of one to two collection cycles after configuring the VMware Aria Operations vCenter Server cloud accounts.
    • An incorrect SAAS_REFRESH_TOKEN.
    Note: By default, the InfluxDB output plugin is active in the telegraf.conf file and data is sent to the influxdb server so that you do not get multiple warning messages in the logs about the lack of configured influxdb server comment, the "[[outputs.influxdb]]" line should be commented. The following warning message is displayed: W! [outputs.influxdb] When writing to [http://localhost:8086]: database "telegraf" creation failed: Post "http://localhost:8086/query": dial tcp [::1]:8086: connect: connection refused

    Example: #[[outputs.influxdb]]

    Note: Ensure that the input plugins in the telegraf.conf file are related to the corresponding operating system. See Telegraf Configuration Details for Operating Systems.
    Note: The default gateway URL is https://www.mgmt.cloud.vmware.com/vrops-cloud and the default authentication URL is https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize. If the authentication URL and gateway URL are different from the default settings, provide the appropriate arguments (-g and -a).
  5. Restart the Telegraf service.
    systemctl restart telegraf 
    or
    /usr/bin/telegraf -config /etc/telegraf/telegraf.conf -config-directory /etc/telegraf/telegraf.d

What to do next

Managed VM object hierarchy:
  • If a vCenter Server VM is monitored by VMware Aria Operations, then the operating system and application objects fall under the respective VM > OS object > 'application service' instance.
  • If an Azure VM is monitored by VMware Aria Operations, then the operating system and application objects fall under the respective Azure VM > OS object > 'application service' instance.
  • If an AWS EC2 instance is monitored by VMware Aria Operations, then the operating system and application objects fall under the respective AWS EC2 instance > OS object > 'application service' instance.

Machines not monitored by VMware Aria Operations: If a vCenter Server VM, an AWS EC2 instance, an Azure VM, or a physical server is not monitored by VMware Aria Operations, then the operating system and application objects fall under Environment > Endpoint > OS Object > 'application service' instance.

View Data Collected: Data is collected and appears in the Manage Telegraf Agents page. To view the details, you can filter by Agent Type > Open source agent from the Manage Telegraf Agents page.