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

Prerequisites

  • Verify that cloud proxy is installed and online.
  • Ensure that you follow the steps in Enable Open Source Telegraf Data Collection on Cloud Proxy.
  • 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 of the VM is monitored by vRealize Operations Cloud.
  • 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)

Procedure

  1. Install open source Telegraf on the end point. If you have an instance installed, you can skip this step. To download and install a new instance of Telegraf, see the official documentation and search for the corresponding OS version from https://www.influxdata.com/time-series-platform/telegraf/ and https://portal.influxdata.com/downloads/.
  2. Download the helper script from cloud proxy located at https://<CloudProxy-IP>/downloads/salt/open_source_telegraf_monitor.sh.
  3. Navigate to the directory where the script is downloaded.
  4. Enable execution permission of the script for Linux VM.
    chmod +x open_source_telegraf_monitor.sh
  5. Run the helper script to update Telegraf configurations.
    open_source_telegraf_monitor.sh  -t <SAAS_REFRESH_TOKEN> -d <TELEGRAF_CONFIG_DIR>  -c <CP_IP> -e <telegraf_bin_path>
    
    Description of arguments:
    SAAS_REFRESH_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". Mandatory parameter.
      Example: gi7lwabjnvdfiawt4watzksuol8sywrjvg8kabh31mx9x1guepgyhycyx61dqrpq
    TELEGRAF_CONFIG_DIR: Telegraf configuration directory.
    CP_IP: Mention the cloud proxy FQDN/IP address to post metrics.
    telegraf_bin_path - Path of telegraf binary. Example: /usr/bin/telegraf
    
    Example:
    ./open_source_telegraf_monitor.sh -v 10.192.0.1 -t UO2HafB0JMYiMmnppZIo2Zn5jCdDf1YeIXa0E7JXUPoUXF5HN6SK29kdJUibcJMg -c 10.192.0.100 -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 VMs, you might see unmanaged configurations, because of one of the following reasons:
    • VM details are not available in vRealize Operations Cloud by the vCenter Server adapter. Wait for a minimum of one to two collection cycles after configuring the vRealize Operations Cloud vCenter Server cloud accounts.
    • An incorrect SAAS_REFRESH_TOKEN.
    Note: -d <TELEGRAF_CONFIG_DIR>: The Telegraf executable has the command line option --config-directory. You must provide the value set for the option -d, when you run the script. In Linux, the value can be found in the service file /usr/lib/systemd/system/telegraf.service.
    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.
  6. If an application service that is supported by vRealize Operations Cloud is running on the end point and you want to monitor it, update the Telegraf configuration file or directory with necessary inputs for Telegraf.
    For a list of supported application services, see Introduction.
    For unsupported application services, update the Telegraf configuration file or directory with the necessary inputs for Telegraf.
  7. 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 of the VM is monitored by vRealize Operations Cloud, then the operating system and application objects fall under the respective VM > OS object > 'application service' instance.

Unmanaged VM object hierarchy: If a vCenter Server of the VM is not monitored by vRealize Operations Cloud, then the operating system and application objects fall under Environment > Operating System World > OS object > 'application service' instance.