Agent Data API


Agent Data REST API is used to analyze real-time and short-term historical data to address any capacity and performance issues in your environment.

Prerequisite: The TrueSight Capacity Optimization Gateway Server with  TrueSight Capacity Optimization Agents must be either in active Manager runs or in the Uncatalogued Systems list.

The following table provides the details of the Agent Data API methods:

Method

URI Pattern

Description

Sample Request

Sample Response

POST

agent-data/v1/servers/

Retrieves a list of servers, including the metadata for the servers. You can retrieve a specified set of servers when:

  • A server parameter is declared, a case insensitive search is performed in 'like' mode.
  • Operators are added by the call and 'like' operators are not required from the client. A search is performed as '%searchString%'.
Sample request
{
    "server.list": [
        "bpa",
        "qa"
    ],
    "pagination": {
        "page": 1,
        "size": 3
    }
}
Sample response
{
  "href": "https://name.bmc.com:8280/dh-services/agent-data/v1/servers/",
  "agent.type": "CAPACITY_AGENTS",
  "servers": [
    {
      "server.name": "name2.bmc.com",
      "agent.os": "AIX",

      "collection.server": "http://name3.bmc.com:10129"

    },

    {

      "server.name": "name4.bmc.com",
      "agent.os": "AIX",

      "collection.server": "http://name5.bmc.com:10129"

    },
    {

      "server.name": "name4.bmc.com",

      "agent.os": "AIX",

      "collection.server": "http://name3.bmc.com:10129"

    }
  ],
  "pagination": {
    "page": 1,
    "size": 3,

    "has.more.data": true

  }
}

POST

agent-data/v1/servers/bydomain/{domainid}/

Lists available nodes for a specific domain ID. If the domain ID is 0 or null, it returns the nodes that are associated to All domains and the dissociated nodes. 

Parameter required: domainid

Sample response

{
    "domains": [
        {
            "domain": "All domains",
            "structureid": "APP",
            "typeid": "0",
            "id": "0",
            "servers": [
                {
                    "server.name": "vm.aaa.com",
                    "os": "win",
                    "type": "CAPACITY_AGENT",
                    "collection.server": "gm.coll.com",
                    "structureid": "SYS",
                    "id": "xxx",
                    "typeid": "25"
                },
                {
                    "server.name": "vm2.aaa.com",
                    "os": "linux",
                    "type": "CAPACITY_AGENT",
                    "collection.server": "gm2.coll.com",
                    "structureid": "SYS",
                    "id": "xxx",
                    "typeid": "25"
                }
            ]
        },
        {
            "domain": "Unassociatednodes",
            "structureid": "APP",
            "typeid": "0",
            "id": "-999",
            "servers": [
                {
                    "server.name": "vm2.aaa.com",
                    "os": "win",
                    "type": "CAPACITY_AGENT",
                    "collection.server": "gm.coll.com",
                    "structureid": "SYS",
                    "typeid": "25"
                }
            ]
        }
    ]
}

POST

agent-data/v1/collection-groups/

Lists the metric groups retrieved from the metadata that is stored in the database.


Sample request
{
    "os.list": [
        "Windows",
        "Solaris",
        "linux"
    ]
}


Sample response
{
  "href": "https://name.bmc.com:8280/dh-services/agent-data/v1/collection-groups/",
  "agent.type": "CAPACITY_AGENTS",
  "os.list": [
    {
      "os": "Windows",
      "collected.metrics": [
        {
          "collection.group": "NT System Statistics",
          "collection.group.metadata": {
            "collection.group.path": "Windows/System"
          }
        },
        {
          "collection.group": "NT System Configuration",
          "collection.group.metadata": {
            "collection.group.path": "Windows/System"
          }
        },
        {
          "collection.group": "NT Collector Information Configuration",
          "collection.group.metadata": {
            "collection.group.path": "Windows/System"
          }
        },
        {
          "collection.group": "NT Collector Statistics",
          "collection.group.metadata": {
            "collection.group.path": "Windows/System"
          }
        },
        {
          "collection.group": "NT Processor Statistics",
          "collection.group.metadata": {
            "collection.group.path": "Windows/CPU"
          }
        },
        {
          "collection.group": "NT CPU Configuration",
          "collection.group.metadata": {
            "collection.group.path": "Windows/CPU"
          }
        },
        {
          "collection.group": "Hyper-V Partition Statistics",
          "collection.group.metadata": {
            "collection.group.path": "Windows/Hyper-V"
          }
        },
        {
          "collection.group": "Collector Statistics",
          "collection.group.metadata": {
            "collection.group.path": "Unix/System"
          }
        },
        {
          "collection.group": "Table Information",
          "collection.group.metadata": {
            "collection.group.path": "Unix/System"
          }
        },
        {
          "collection.group": "Swap Statistics",
          "collection.group.metadata": {
            "collection.group.path": "Unix/Storage"
          }
        },
        {
          "collection.group": "Disk Quota Statistics",
          "collection.group.metadata": {
            "collection.group.path": "Unix/Storage"
          }
        },
        {
          "collection.group": "Physical Partition Configuration",
          "collection.group.metadata": {
            "collection.group.path": "Unix/Solaris LDOM-DSD"
          }
        },
        {
          "collection.group": "Veritas Statistics",
          "collection.group.metadata": {
            "collection.group.path": "Unix/Solaris"
          }
        },
        {
          "collection.group": "ZFS Statistics",
          "collection.group.metadata": {
            "collection.group.path": "Unix/Solaris"
          }
        },
        {
          "collection.group": "Pool Configuration",
          "collection.group.metadata": {
            "collection.group.path": "Unix/Solaris"
          }
        }
      ]
    }
  ]
}

POST

agent-data/v1/collectiongroups/metrics/

Retrieves the associated set of 'collected metrics' for a specific collection group.

Sample request
{
  "os.list": [
    {
      "os": "Solaris",
      "collected.metrics": [
        {
          "collection.group": "Cpu Statistics",
          "collection.group.metadata": {
            "collection.group.path": "Unix/CPU"
          }
        }
      ]
    }
  ]
}
Sample response

{

  "href": "https://name.bmc.com:8280/dh-services/agent-data/v1/collection-groups/metrics/",
  "agent.type": "CAPACITY_AGENTS",
  "os.list": [
    {
      "os": "Solaris",
      "collected.metrics": [
        {
          "collection.group": "Cpu Statistics",
          "collection.group.metadata": {
            "collection.group.subresources": [
              "CPU ID"
            ],
            "collection.group.path": "Unix/CPU"
          },
          "metrics": [
            "CPU ID",
            "CPU Idle Time",
            "CPU Interrupt Time",
            "CPU Involuntary Wait",
            "Spins On Mutexes",
            "System Busy",
            "Time"
          ],
          "metric.data.types": [
            {
              "metric": "CPU ID",
              "data.type": "NUMBER",
              "hidden": 0
            },
            {
              "metric": "CPU Idle Time",
              "data.type": "NUMBER",
              "hidden": 0
           },
            {
              "metric": "CPU Interrupt Time",
              "data.type": "NUMBER",
              "hidden": 0
            },
            {
              "metric": "CPU Involuntary Wait",
              "data.type": "NUMBER",
              "hidden": 0
            },
            {
              "metric": "Spins On Mutexes",
              "data.type": "NUMBER",
              "hidden": 1
            },
            {
              "metric": "System Busy",
              "data.type": "NUMBER",
              "hidden": 0
            },
            {
              "metric": "Time",
              "data.type": "STRING",
              "hidden": 0
            }
          ]
        }
      ]
    }
  ]
}

POST

agent-data/v1/timeranges/

Retrieves available time ranges for a specific set of servers or collection groups.

Sample request
{
"servers": [
  {
    "server.name": "lnx01ud.bmc.com",
    "collected.metrics":  [
      {
        "collection.group": "System Statistics"
      }
     ]
  },
  {
    "server.name": "vw-aus-bco-qa19",
    "collected.metrics": [
      {
        "collection.group": "NT System Statistics"
      }
     ]
   }
  ]
}
Sample response

{

  "href": "https://name.bmc.com:8280/dh-services/agent-data/v1/timeranges/",
  "time.ranges.list": [
    {
      "server.name": "lnx01ud.bmc.com",

      "collection.server": "http://name5.bmc.com:10129",

      "collection.group": "System Statistics",
      "time.ranges": {
        "2020-04-30 02:02:05": "2020-05-01 02:00:56",
        "2020-05-01 02:02:05": "2020-05-02 02:00:56",
        "2020-05-02 02:02:05": "2020-05-03 02:00:56",
        "2020-05-03 02:02:05": "2020-05-04 02:00:56",
      }
    },
    {
      "server.name": "name3",

      "collection.server": "http://name5.bmc.com:10129",

      "collection.group": "NT System Statistics",
      "time.ranges": {
        "2020-04-30 02:02:06": "2020-05-01 02:00:58",
        "2020-05-01 02:02:08": "2020-05-02 02:00:58",
        "2020-05-02 02:02:08": "2020-05-03 02:00:58",
        "2020-05-03 02:02:08": "2020-05-04 02:00:58",
      }
    }
  ],
  "agent.type": "CAPACITY_AGENTS"
}

POST

agent-data/v1/data/

Retrieves the data points for a specific set of the following entities:

  • servers
  • collection groups
  • metrics
  • time period
  • resolution
Sample request

{

"analysis.type" : "CHART_ANALYSIS",
   "servers":[
      {
         "server.name":"pl-pun-bco-dv02.bmc.com",
         "collected.metrics":[
            {
              "collection.group":"System Statistics",
               "collection.group.metadata":{
                  "collection.group.path":"Unix/CPU",
                  "collection.group.subresources":[
                     "CPU ID"
                  ]
               },
               "metrics":[
                  "CPU Utilization"
               ]
            }
         ]
      }
   ],
//For offsets from the current time, use the followig time filter.
    "time.filter": {
        "lastex": "H1"
//The following values are valid. 
  • H1 - Last hour
  • D1 - Last day
  • D7- Last seven days
  • D30 - For last month
      }
//For specific time ranges, use the following filter:

     "time.filter":
       {

       "from.ts":"yyyy-MM-dd HH:mm:ss",
       "to.ts":"yyyy-MM-dd HH:mm:ss"
       }

//For example, "2022-01-06 10:03:24"
HH is the 24 hour format ranging from 0 to 23. 
}
Sample response
{
  "href": "https://name.bmc.com:8280/dh-services/agent-data/v1/data/",
  "agent.type": "CAPACITY_AGENTS",
  "analysis.type": "CHART_ANALYSIS",
  "time.filter": {
    "from.ts": "2020-05-08 10:03:24",
    "to.ts": "2020-05-08 11:03:24"
  },
  "datafields": [
    {
      "name": "ts",
      "collected.metric": {
        "metric": "ts"
      },
      "label": "ts",
      "meaning": "TS",
      "datatype": "TIMESTAMP"
    },
    {
      "name": "1",

      "server.name": "name6.bmc.com",

      "collection.server": "http://name5.bmc.com:10129",

      "collected.metric": {
        "collection.group": "System Statistics",
        "metric": "CPU Utilization",
        "unit.raw": "%",
        "source": "UDR"
      },
      "label": "System Statistics - CPU Utilization",
      "unit": "PCT",
      "datatype": "NUMBER"
    }
  ],
  "data": [
    {
      "ts": "2020-05-08 09:59:59",
      "1": "32.946000"
    },
    {
      "ts": "2020-05-08 10:04:59",
      "1": "33.609000"
    },
    {
      "ts": "2020-05-08 10:05:09",
      "1": "37.593000"
    },
    {
      "ts": "2020-05-08 10:05:19",
      "1": "41.536000"
    },
    {
      "ts": "2020-05-08 10:05:29",
      "1": "36.240000"
    },
    {
      "ts": "2020-05-08 10:05:39",
      "1": "32.348000"
    },
    {
      "ts": "2020-05-08 10:05:49",
      "1": "34.663000"
    },
    {
      "ts": "2020-05-08 10:05:59",
      "1": "35.271000"
    },
    {
      "ts": "2020-05-08 10:06:09",
      "1": "36.456000"
    },
    {
      "ts": "2020-05-08 10:06:19",
      "1": "23.745000"
    },
    {
      "ts": "2020-05-08 10:06:29",
      "1": "22.648000"
    },
    {
      "ts": "2020-05-08 10:06:39",
      "1": "26.219000"
    },
    {
      "ts": "2020-05-08 10:06:49",
      "1": "21.135000"
    },
    {
      "ts": "2020-05-08 10:06:59",
      "1": "20.491000"
    },
    {
      "ts": "2020-05-08 10:07:09",
      "1": "25.659000"
    },
    {
      "ts": "2020-05-08 10:07:19",
      "1": "24.498000"
    },
    {
      "ts": "2020-05-08 10:07:29",
      "1": "21.684000"
    },
    {
      "ts": "2020-05-08 10:07:39",
      "1": "25.974000"
    },
    {
      "ts": "2020-05-08 10:07:49",
      "1": "25.103000"
    },
    {
      "ts": "2020-05-08 10:07:59",
      "1": "21.527000"
    },
    {
      "ts": "2020-05-08 10:08:09",
      "1": "23.143000"
    },
    {
      "ts": "2020-05-08 10:08:19",
      "1": "19.899000"
    },
    {
      "ts": "2020-05-08 10:08:29",
      "1": "19.949000"
    },
    {
      "ts": "2020-05-08 11:02:59",
      "1": "53.141000"
    },
    {
      "ts": "2020-05-08 11:03:09",
      "1": "68.362000"
    }
  ],
  "metadata": {
    "percentage.upperbound": 100,
    "system.timezones": {
      "_srvr_": "Asia/Kolkata"
    }
  }
}

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*