mid - POST /mid/sa/metrics

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

URL format

This request goes to the Operational Metrics MID Server, not the instance. The MID Server must have the operational metric extension setup with Enable REST endpoint set to true. See Get started with Operational Metrics for more information.

The URL of the request is 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. 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.

Table 5. Elements accepted in the request body
Element Description
metric_type Name of the metric.
resource Information about the resource for which metric 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.
ci_identifier List of key-value pairs to identify the CI.
source Data source monitoring the metric type.

Request payload example

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