You can use a sample script to monitor operating systems in physical servers.
The sample script is tested only on Windows Server 2012, 2012 R2, 2016, 2019, and 2022.
Prerequisites
If you are using the sample script and have upgraded, and you want to view the properties of the operating system objects, you must redo the following steps to monitor operating systems. You must download the helper script again, rerun it, and then restart custom Telegraf.
- Verify that PowerShell is at 4.0 or above. To check the PowerShell version, run the following in PowerShell:
$PSVERSIONTable
- 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 .
- Only IPv4 is supported at present for cloud proxy.
- Ensure that port 443 of VMware Aria Operations is reachable from the physical server.
- The endpoint VM/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
- Download the sample script from the following location: https://<cloudproxy_ip>/downloads/salt/telegraf-utils.ps1
You can run one of the following commands in the PowerShell terminal:
Invoke-WebRequest https://<cloudproxy_ip>/downloads/salt/telegraf-utils.ps1 -OutFile telegraf-utils.ps1
wget --no-check-certificate https://<cloudproxy_ip>/downloads/salt/telegraf-utils.ps1
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.
Note: Use the relevant cloud proxy
IP address for <cloud-proxy> in the preceding location specified. For application monitoring high availability activated collector groups, provide the virtual IP.
- Run the sample script to download the Telegraf binary files from cloud proxy, create necessary certificates for a secure connection with VMware Aria Operations, and make necessary updates in the Telegraf configuration files.
telegraf-utils.ps1 user-managed -c cloud_proxy_ip_or_collector_group_name -t token -d telegraf_conf_dir (-v vmwareariaoperations_ip_or_fqdn | [-g gateway_url -a csp_auth_url]) [-x proxy -u proxy_user -p proxy_user_password]
Description of arguments:
-c : [REQUIRED] cloud_proxy_ip_or_collector_group_name - Cloud Proxy IP or Collector Group Name
-t : [REQUIRED] token - This can be user_saas_refresh_token or on-prem vmwareariaoperations_auth_token.
on-prem: Auth Token of the user/account. For getting 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 : [OPTIONAL] Agent installation directory. Default: current directory
-v : [CONDITIONAL] [ON-PREM-SPECIFIC] vmwareariaoperations_ip_or_fqdn - IP/FQDN of VMware Aria Operations master node and required for on-prem.
[-x proxy -u proxy_user -p proxy_user_password] : [OPTIONAL] proxy - Proxy Server URL.It is in the form of <[protocol://]proxyhost[:proxyport]>
Note: encode or escape proxy user and password correctly for proxy authentication.
Example: .\telegraf-utils.ps1 user-managed -c 10.79.87.134 -t 41ef6601-6da3-4768-a51d-cbc08dd77355::4398b23d-e388-496e-ae91-bc04d5735345 -v 10.185.60.178
If the environment is behind a corporate proxy, the script considers the proxy explicitly for external connections.
Note: Ensure that the special characters in the user name and password are either encoded or escaped correctly for proxy authentication:
Note: If helper script execution fails for the first time due to wrong arguments, clear the Telegraf folder and rerun the script once more with the right arguments.
- Run Telegraf.
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:\VMware\UnManagedTelegraf\telegraf\telegraf.exe --config C:\VMware\UnManagedTelegraf\telegraf\telegraf.conf --config-directory C:\VMware\UnManagedTelegraf\telegraf\telegraf.d --service install
net start telegraf
What to do next
You can view metrics by selecting the
tab from the
VMware Aria Operations user interface.
- From the left panel, navigate to .
- Click the Operating System World object in the right pane.
- Navigate to the Metrics tab and select the corresponding OS object.