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

  • Verify that OpenSSL is at 1.1.1 or above. Download from https://slproweb.com/products/Win32OpenSSL.html. To check the OpenSSL version run the following in PowerShell:

    openssl.exe version

  • Ensure that cloud proxy is up and online in vRealize Operations.
  • Ensure that cloud proxy is reachable from the physical server.
  • Ensure that port 443 of vRealize Operations is reachable from the physical server.

Procedure

  1. Download the sample script from the following location: https://<cloudproxy_ip>/downloads/salt/unmanagedagent_setup_sample.ps1
    You can run one of the following commands in the PowerShell terminal:
    Invoke-WebRequest https://<cloudproxy_ip>/downloads/salt/unmanagedagent_setup_sample.ps1 -OutFile unmanagedagent_setup_sample.ps1
    
    wget --no-check-certificate https://<cloudproxy_ip>/downloads/salt/unmanagedagent_setup_sample.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.
  2. Run the sample script to download the Telegraf binary files from cloud proxy, create necessary certificates for a secure connection with vRealize Operations, and make necessary updates in the Telegraf configuration files.
    unmanagedagent_setup_sample.ps1 -v <vrops_ip_or_fqdn> -a <vrops_user> -b <vrops_password> -c <cloudproxy_ip> -d <Telegraf_Download_Directory> 
    Example:
    unmanagedagent_setup_sample.ps1 -v 10.192.0.189 -a admin -b Password!23 -c 10.192.0.158 -d C:/TelegrafDownloadDirectory 
    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:
    unmanagedagent_setup_sample.ps1 -v <vrops_ip_or_fqdn> -a <vrops_user> -b <vrops_password> -c <cloudproxy_ip> -d <Telegraf_Download_Directory> -x <[protocol://]proxyhost[:proxyport]> -u <proxyUser> -p <proxyPassword>
    Description of arguments:

    vrops_ip_or_fqdn: IP or FQDN of vRealize Operations. Mandatory parameter.

    vrops_user: User name of vRealize Operations to make suite-api call. Mandatory parameter.

    vrops_password: Password of vRealize Operations to make suite-api call. Mandatory parameter.

    cloudproxy_ip: IP of Cloud Proxy. Mandatory parameter.

    Telegraf_Download_Directory: Where to install agent? Optional parameter. Default value: current directory.

    proxy: Proxy Server URL. Optional parameter.

    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.
  3. 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 relevant object > Metrics tab from the vRealize Operations user interface.
  1. From the left panel, navigate to Environment > Custom Groups.
  2. Click the Operating System World object in the right pane.
  3. Navigate to the Metrics tab and select the corresponding OS object.