Example: Generic Metric Collector Entity Type (Auto-mapping)

The following example shows how to define a generic metric collector entity representing a collectd agent that is locally monitored with metric auto-mapping functionality enabled:

Note:

The metric auto-mapping functionality is enabled in the following example by setting the omc_auto_map property to TRUE.

Example 4-1 Entity of Generic Metric Collector Type - Locally Monitored

{
  "entities": 
  [
    {
      "name": "<Your name for the collectd collector>",
      "type": "omc_generic_metric_collector",
      "displayName": "<Your display name for the collectd collector>",
      "timezoneRegion": "<Your timezone>",
      "properties": 
      {
        "host_name": 
        {
          "displayName": "Host Name",
          "value": "<Your name of the host where collectd is installed>"
        },

        "omc_query_interface_path": 
        {
          "displayName": "Query Interface Path",
          "value": "<Full path to the collectdctl file>"
        },

        "omc_filter_expression": 
        {
          "displayName": "Filter Expression",
          "value": "{$.[?(@.host=='<Value of the host field in the metric payload sent by collectd>')]}"
        },

        "omc_auto_map": 
        {
          "displayName": "Automatically Map Metrics",
          "value": "TRUE"
        },

        "capability": 
        {
          "displayName": "capability",
          "value": "monitoring"
        },

        "omc_monitored": 
        {
          "displayName": "Cloud Agent Monitored",
          "value": "TRUE"
        },

        "omc_product_name": 
        {
          "displayName": "Product Name",
          "value": "collectd"
        },

        "omc_product_vendor": 
        {
          "displayName": "Product Vendor",
          "value": "Florian octo Forster, et al."
        },

        "omc_product_version_query_arg": 
        {
          "displayName": "Product Version Query Argument",
          "value": "-h"
        },

        "omc_product_version_regex": 
        {
          "displayName": "Product Version Regular Expression",
          "value": "^collectd (.+), http"
        },

        "omc_metrics_query_arg": 
        {
          "displayName": "Metrics Query Argument",
          "value": "listval"
        },

        "omc_response_query_arg": 
        {
          "displayName": "Response Query Argument",
          "value": "listval"
        },

        "omc_use_exit_code_for_response": 
        {
          "displayName": "Use exit code for response",
          "value": "TRUE"
        },

        "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"
        }
      }
    }
  ]
}

For additional configurations, metric schema mapping, and troubleshooting, see Additional collectd Configurations and Information.