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

The helper script is tested only on Windows Server 2012, 2012 R2, 2016, 2019, and 2022.

Prerequisites

  • Verify that cloud proxy is installed and online.
  • Verify that Windows PowerShell is at 4.0 or above.
  • Ensure that VMTools version >=10.2 if a vCenter Server VM is monitored by vRealize Operations Cloud. vmware-toolbox-cmd is necessary only for vCenter Server VMs.
  • Ensure that Internet is enabled.
  • Ensure that cloud proxy is up and online in vRealize Operations Cloud. 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 vRealize Operations Cloud.
  • Ensure that cloud proxy or the virtual IP of the application monitoring high availability activated collector group is reachable from vCenter Server VMs, AWS EC2 instances, Azure VMs, or the physical server.

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/.
    After downloading and extracting Telegraf files, besides telegraf.exe and telegraf.conf files, create a folder with the name telegraf.d which is used in the next steps.
  2. Download the helper script from cloud proxy located at https://<CloudProxy-IP>/downloads/salt/open_source_telegraf_monitor.ps1.
    Note: Use the relevant cloud proxy IP address/FQDN for <CloudProxy-IP> in the preceding commands and location specified. For application monitoring high availability activated collector groups, provide the virtual IP.

    If the script download fails with the following message: The request was aborted: Could not create SSL/TLS secure channel, follow the steps mentioned in Script Download Fails on a Windows Platform.

  3. Navigate to the directory where the script is downloaded.
  4. Run the helper script to update Telegraf configurations.
    open_source_telegraf_monitor.ps1  -t <SAAS_REFRESH_TOKEN> -d <TELEGRAF_CONFIG_DIR>  -c <CP_IP_OR_COLLECTOR_GROUP_NAME> -e <TELEGRAF_EXE_PATH> [ -g <GATEWAY_URL> -a <CSP_AUTH_URL> ]
    
    Description of arguments:
    SAAS_REFRESH_TOKEN - CSP Refresh Token of the user/account. For getting new token, follow - User/
    Organization Settings >> My Account >> API Tokens >> Generate a New API Token. It's a mandatory parameter.
    Example: gi7lwabjnvdfiawt4watzksuol8sywrjvg8kabh31mx9x1guepgyhycyx61dqrpq
    TELEGRAF_CONFIG_DIR - Telegraf configuration directory. i.e value of --config-directory argument mentioned in telegraf service. ex: C:\telegraf\telegraf.d
    TELEGRAF_EXE_PATH - Path of telegraf.exe ex: C:\telegraf\telegraf.exe
    CP_IP_OR_COLLECTOR_GROUP_NAME - Mention the cloud proxy FQDN/IP or the name of the application monitoring high availability activated collector group.
    GATEWAY_URL - Optional argument to override default vROps SaaS gateway URL
    CSP_AUTH_URL - Optional argument to override default CSP authentication URL
    
    Example:
    ./open_source_telegraf_monitor.ps1 -v 10.192.0.1 -t UO2HafB0JMYiMmnppZIo2Zn5jCdDf1YeIXa0E7JXUPoUXF5HN6SK29kdJUibcJMg -c 10.192.0.100 -d "C:\Telegraf\telegraf-1.20.4\telegraf.d" -e "C:\Telegraf\telegraf-1.20.4\telegraf.exe"
    
    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 vRealize Operations Cloud by the vCenter Server, AWS, or Azure adapters correspondingly. 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 Windows, the value is based on the installation of Telegraf.
    • Do not use a space in the configuration path. Paths with spaces can be passed as a short name notation, such as c:\PROGRA~1 for c:\Program Files.
    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.
  5. 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. For more information, see https://docs.influxdata.com/telegraf/latest/plugins/inputs/.
  6. Restart the Telegraf service.
    telegraf.exe --config telegraf.conf --config-directory telegraf.d
    Or you can make Telegraf a Windows service.
    <Telegraf_executable_path> --config <Telegraf_config_file_path> --config-directory <Telegraf_config_directory_path> --service install net start telegraf
    
    For example:
    & 'C:\Telegraf\telegraf-1.20.4\telegraf.exe'  --config 'C:\Telegraf\telegraf-1.20.4\telegraf.conf' --config-directory 'C:\Telegraf\telegraf-1.20.4\telegraf.d'  --service install
    net start telegraf
    

What to do next

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

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