mid - POST /mid/sa/metrics

Push raw Operational Metrics data from an external source to the MID Server.

URL format

This request pushes raw Operational Metrics data from an external source to the MID Server, not to the instance. Configure the Operational Metric extension assigned to the MID Server with Enable REST endpoint selected. For more information, see Get started with Operational Metrics.

The URL of the request is in the form http[https]://mid1.servicenow.com/api/mid/sa/metrics, where mid1.servicenow.com is the FQDN or IP address of the MID Server.

Versioned URL: api/mid/sa/metrics

Default URL: api/mid/sa/metrics

Supported request parameters

Table 1. Request parameters
Parameter Description
None

Headers

Table 2. Request headers
Header Description
None
Table 3. Response headers
Header Description
None

Status codes

The following status codes apply to this HTTP action. For a list of possible status codes used in the REST API, see REST response codes .

Table 4. Status codes
Status code Description
200 Request completed successfully. If a valid query returned no results, the response body contains only an empty result array.

Request body

The API accepts these JSON or XML elements in the request body to specify the content of email messages you want to create in the Email [sys_email] table.

Table 5. Elements accepted in the request body
Element Description
metric_type Name of the metric.
resource Information about the resource for which metric data is being collected. In the example below, C:\ is the resource for which metric data is collected.
node IP, FQDN, name of the CI, or host. In the example below, the name of the Linux server where the disks are installed.
value Value of the metric.
timestamp Epoch timestamp of the metric in milliseconds.
ci2metric_id List of key-value pairs to identify the CI. It is formerly known as ci_identifier. The script continues to accept ci_identifier.
source Data source monitoring the metric type.

Request payload example

[{
    "metric_type": "Disk C: % Free Space",
    "resource": "C:\\",
    "node": "lnux100",
    "value": 50,
    "timestamp": 1473183012000,
    "ci2metric_id": {
        "node": "lnux100"
    },
    "source": "Splunk"
}]