Receive Metrics from a Remote Telegraf Collector

In environments where a local cloud agent cannot be installed on the host running the Telegraf Collector, it is still possible for Oracle Management Cloud to receive Telegraf metrics via a remote cloud agent. However, in this type of deployment, the Telegraf service itself will not be monitored by the remote cloud agent.

To configure remote monitoring:

  1. Install a cloud agent on a host that is remote to the host on which the Telegraf Collector is installed

  2. Configure the Telegraf Collector to send metrics to the remote cloud agent. The URL configured for the HTTP output plugin will be as follows:

    url = "https://<remote-cloud-agent-host>:<remote-cloud-agent-port>/emd/receiver/gmc"

    The remaining configuration of the global collector tag and input plugins is the same as a local Telegraf configuration.

  3. Add a generic metric collector entity to the cloud agent, as shown in the following example.

    {
      "entities":
      [
        {
          "name": "<Your name for the Telegraf collector>",
          "type": "omc_generic_metric_collector",
          "displayName": "<Your display name for the Telegraf collector>",
          "timezoneRegion": "<Your timezone>",
          "properties":
          {
            "host_name":
            {
              "displayName": "Host Name",
              "value": "<Your name of the host where Telegraf is installed>"
            },
     
            "omc_filter_expression":
            {
              "displayName": "Filter Expression",
              "value": "{$.[?(@.host=='<Value of the host tag in the metric payload sent by Telegraf>')]}"
            },
     
            "omc_auto_map":
            {
              "displayName": "Automatically Map Metrics",
              "value": "TRUE"
            },
     
            "capability":
            {
              "displayName": "capability",
              "value": "monitoring"
            },
     
            "omc_monitored":
            {
              "displayName": "Cloud Agent Monitored",
              "value": "FALSE"
            },
     
            "omc_product_name":
            {
              "displayName": "Product Name",
              "value": "telegraf"
            },
     
            "omc_product_vendor":
            {
              "displayName": "Product Vendor",
              "value": "InfluxData Inc."
            },
     
            "omc_protocol":
            {
              "displayName": "Protocol",
              "value": "https"
            },
     
            "omc_payload_format":
            {
              "displayName": "Payload Format",
              "value": "json"
            },
     
            "omc_receiver_uri_path":
            {
              "displayName": "Receiver URI Path",
              "value": "/emd/receiver/gmc"
            }
          }
        }
      ]
    }

    In this case, the host where Telegraf is installed as specified in the host_name property will not be a managed target in Oracle Management Cloud.

With the above this configuration, when Telegraf is started up, the cloud agent will be able to receive metrics from the remote Telegraf Collector without monitoring the Telegraf service. The availability of the Generic Metric Collector entity representing the Telegraf Collector in this case will be reported as unknown.