Runtime - Host and Services

This section is for searching for live objects being monitored by Opsview. This is in the Runtime database, hence the URL path is /rest/runtime/{objecttype}.

URL: /rest/runtime/service.

Requires authentication - requires VIEWALL or VIEWSOME permission

Access Control Copied

VIEWALL allows all objects to be returned. VIEWSOME allows objects to be returned where permission has been granted based on the access object selection.

Retrieving Host or Service Lists Copied

The same parameters as searching based on service filtering can be used.

Additional parameters:

Response:

Example response, if group_by=host and distinct=0:

    {
       "allrows" : "30",
       "list" : [
          {
             "list" : [
                "Another exception",
                "Coldstart",
                "Test exceptions"
             ],
             "name" : "cisco"
          },
          {
             "list" : [
                "Another exception",
                "Coldstart"
             ],
             "name" : "cisco1"
          }
       ],
       "rows" : "5",
       "total" : "50"
    }

Example response if group_by=service and distinct=0:

    {
       "allrows" : "30",
       "list" : [
          {
             "list" : [
                "cisco",
                "cisco1",
                "cisco2",
                "cisco3",
                "cisco4"
             ],
             "name" : "Another exception"
          }
       ],
       "rows" : "5",
       "total" : "50"
    }

Example response if group_by=host and distinct=1:

    {
       "allrows" : "12",
       "list" : [
          {
             "name" : "cisco"
          },
          {
             "name" : "cisco1"
          },
          {
             "name" : "cisco2"
          },
          {
             "name" : "cisco3"
          },
          {
             "name" : "cisco4"
          }
       ],
       "rows" : "5",
       "total" : "15"
    }

Example response if group_by=service and distinct=1:

    {
       "allrows" : "12",
       "list" : [
          {
             "name" : "Another exception"
          },
          {
             "name" : "Check Loadavg"
          },
          {
             "name" : "Check Memory"
          },
          {
             "name" : "Coldstart"
          },
          {
             "name" : "faked ok service"
          }
       ],
       "rows" : "5",
       "total" : "19"
    }
["Opsview"] ["API", "Technical Reference"]

Was this topic helpful?