NBI objectmetrics API

On this page

NBI objectmetrics API allows to request specified metrics for particular Managed Objects.

Usage

POST /api/nbi/objectmetrics

Get metrics for one or more Managed Objects. Maximal allowed time range is limited by nbi.objectmetrics_max_interval. configuration setting.

Example Request:

POST /api/nbi/objectmetrics?limit=1 HTTP/1.1
Host: noc.example.com
Private-Token: 12345

{
    "from": "2018-09-01T00:00:00",
    "to": "2018-09-01T01:00:00",
    "metrics": [
        {
            "object": "660",
            "interfaces": ["Fa0/1", "Fa0/2"],
            "metric_types": ["Interface | Load | In", "Interface | Load | Out"]
        },
        {
            "object": "661",
            "interfaces": ["Gi0/1"],
            "metric_types": ["Interface | Load | In", "Interface | Load | Out"]
        }
    ]
}

Example Response:

HTTP/1.1 200 OK
Content-Type: text/json

{
    "from": "2018-09-01T00:00:00",
    "to": "2018-09-01T01:00:00",
    "metrics": [
        {
            "object": 660,
            "metric_type": "Interface | Load | In",
            "path": ["", "", "", "Fa0/1"],
            "interface": "Fa0/1",
            "values": [
                ["2018-09-01T00:00:15", 10],
                ["2018-09-01T00:05:15", 12],
                ["2018-09-01T00:10:15", 17],
                ...
            ]
        },
        ...
    ]
}
Request JSON Object:
 
  • from (string) – Start of interval timestamp in ISO 8601 format (i.e. YYYY-MM-DDTHH:MM:SS).
  • to (string) – Stop of interval timetamp on ISO 8601 format (i.e. YYYY-MM-DDTHH:MM:SS).
Request JSON Array of Objects:
 
Response JSON Object:
 
  • from (string) – Start of interval timestamp in ISO 8601 format (i.e. YYYY-MM-DDTHH:MM:SS).
  • to (string) – Stop of interval timetamp on ISO 8601 format (i.e. YYYY-MM-DDTHH:MM:SS).
Response JSON Array of Objects:
 
  • object (string) – Managed Object’s ID
  • metric_type (string) – Metric Type name
  • path (array) – Metric path
  • interface (string) – Interface (Only for Interface Scope).
  • values (array) – Measured values as pairs of (timestamp, value)
Request Headers:
 
  • Private-TokenAPI Key with nbi:objectmetrics API access
Status Codes: