Use the helper script to monitor applications and operating systems on a Windows 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.
- Verify that Windows PowerShell is at 4.0 or above.
- Ensure that VMTools version >=10.2 if a vCenter Server of the VM is monitored by vRealize Operations.
Procedure
- 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.
- Download the helper script from cloud proxy located at https://<CloudProxy-IP>/downloads/salt/open_source_telegraf_monitor.ps1.
- Navigate to the directory where the script is downloaded.
- Run the helper script to update Telegraf configurations.
open_source_telegraf_monitor.ps1 -v <vROps_IP> -t <AUTHENTIFICATION_TOKEN> -d <TELEGRAF_CONFIG_DIR> -c <CP_IP> -e <telegraf_exe_path>
Description of arguments:
vROps_IP: vRealize Operaions Manager FQDN/IP to perform REST API calls.
AUTHENTIFICATION_TOKEN: To perform REST API calls authentication token can be acquired using /api/auth/token/acquire call. Mandatory parameter.
Example: e5c394b4-f333-4391-8028-2040a8bfda60::0dd43038-10e3-4880-a4fc-49e4eaa00e3f
To get the authentication token, follow the steps in Acquire an Authentication Token.
TELEGRAF_CONFIG_DIR: Telegraf configuration directory.
CP_IP: Mention the cloud proxy FQDN/IP address to post metrics.
telegraf_exe_path: Path of telegraf.exe. For example: C:\telegraf\telegraf.exe
Example:
./open_source_telegraf_monitor.ps1 -v 10.192.0.1 -t 7accb88f-560d-4a5c-8fb9-29678c54511a::d1560b05-72fc-44ba-af6e-ffa746a6b4ea -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 VMs, you might see unmanaged configurations, because of one of the following reasons:
- VM details are not available in vRealize Operations 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
AUTHENTIFICATION_TOKEN or vROps_IP
.
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: 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]]
- If an application service that is supported by vRealize Operations 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.
- 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 of the VM is monitored by vRealize Operations , then the operating system and application objects will fall under the respective .
Unmanaged VM object hierarchy: If a vCenter Server of the VM is not monitored by vRealize Operations , then the operating system and application objects will fall under .