You can configure Telegraf to monitor operating systems in physical servers.

Prerequisites

  • Ensure that Internet is enabled.
  • Verify that cURL is at 7.29.0.
  • Verify that unzip is at 6.0-20.el7 or above.
  • Verify that OpenSSL is at 1.0.2k-fips or above.

Procedure

  1. Create a refresh token from the following location in the Cloud Service portal:
    ( https://console.cloud.vmware.com/csp/gateway/portal/#/user/tokens/generate )

    User/Organization Settings >> My Account >> API Tokens >> Generate a New API Token

  2. Download Telegraf on the end point from cloud proxy.
    curl -k https://<cloud-proxy>/downloads/salt/telegraf.tar.gz --output telegraf.tar.gz
    
    Note: Use the relevant cloud proxy IP address for <cloud-proxy> in the preceding location specified.
  3. Create a certificate signing request by running the following command:
    openssl req -new -newkey rsa:2048 -nodes -keyout key.pem -out csr.pem -subj "/C=IN/ST=KA/L=BLR/O=VMWARE/OU=CMBU/CN=$(uuidgen)"
  4. Sign the certificate using the vRealize Operations Cloud Suite API. The vROps User role is sufficient for this step.
    1. Use the refresh token (step 1) to get the access token. Run the following command:
      curl --location --request POST 'https://console.cloud.vmware.com/csp/gateway/am/api/auth/api-tokens/authorize' \
           --header 'Accept: application/json' \
           --header 'Content-Type: application/x-www-form-urlencoded' \
           --data-urlencode "refresh_token=${refresh_token}"
      
    2. Get the collector ID by running the following command:
      curl --location --request GET 'https://www.mgmt.cloud.vmware.com/vrops-cloud/suite-api/api/collectors?host=<cloud-proxy>' \
           --header 'Authorization: CSPToken ${access_token}' \
           --header 'Accept: application/json'
      
    3. Get the signed certificate and CA as a ZIP file. Run the following command:
      curl --location --request POST 'https://www.mgmt.cloud.vmware.com/vrops-cloud/suite-api/api/applications/clientCertificate/<cloud-proxy-id>' \
           --header 'Authorization: CSPToken ${access_token}' \
           --header 'Content-Type: application/json' \
           --data-binary @csr.pem \
           --output certificate-bundle.zip
      
      Note: Use the cloud proxy collector ID as the <cloud-proxy-id> in the preceding example.
  5. Extract the telegraf binary and the signed certificate-bundle. Update the telegraf configuration with the following settings:
    [[outputs.http]]
      url = "https://<cloud-proxy>/arc/default/metric"
      insecure_skip_verify = true
      tls_ca = "ca.cert.pem"
      tls_cert = "cert.pem"
      tls_key = "key.pem"
      data_format = "wavefront"
    
      [outputs.http.headers]
        uuid = "$(uuidgen)"
        hostname = "$(hostname)"
    
  6. Restart Telegraf and wait for 10 minutes to get the data.

What to do next

You can view metrics by selecting the relevant object > Metrics tab from the vRealize Operations Cloud user interface.