Metrics Integration API Overview

How to post datums to the Metrics Integration API

The inbound Metrics API provides an endpoint where you can post time series metrics from your monitoring services. For example, you can set up a simple script that regularly posts data to the REST integration. Alternatively, you could set up the REST integration as an endpoint for a webhook from a monitoring system.

For a full description of the metric schema, see Metric Datum API Object. The Data Config > Integrations > Metrics API page also includes auto-generated cURL commands with example JSON metrics. The metric schema is highly flexible, with a few required fields, several more optional fields, and a tags field for including additional data.

Note the following:

  • All times must be specified as UNIX time values normalized to Coordinated Universal Time (UTC).

  • Moogsoft stores all times in UTC format. The dates and times displayed in the UI are based on your browser's local time.

  • This integration expects data in the following JSON format. The "data", "source", and "metric" fields are required. If you do not specify a time, the "time" value is the time when Moogsoft ingests the metric.

       "data": <datum> , 
       "source": <source>, 
       "time": <utc_time_value>
  • You can include metadata as additional key/value pairs in a JSON data point, although Moogsoft only considers the "data" key when detecting anomalies. For example, you can specify a data point such as:

        "data": 1.2345 , 
        "source": "", 
        "time": 1571435450540, 
        "tags": {
            "protocol" : "tcp",
            "seq" : 12, 
            "total" : 157, 
            "bytes" : 1274
  • Moogsoft uses the Adaptive anomaly detector with default settings on all metrics ingested through the API. Custom anomaly detection of these metrics is not supported. The Adaptive detector identifies anomalies based on a statistical calculation against a median absolute deviation. This deviation varies over time and determines the high and low thresholds.

  • To search for metrics that were ingested via the API, go to the UI > Observe > Metrics page and enter the following search:

    "managed object" = moog:integration:rest
  • You can use the Collectors API to do the following:

    • Retrieve metric data from a collector.

    • Post metric data from a collector.

    • Retrieve the set of available metrics from a collector.