Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This is a DRAFT Work In Progress - Contents subject to change.

...

We can view opCharts Inventory below using these endpoints - http[s]://server/omk/opCharts/v2/inventory

API Routes

Request Method

Operation

URL Example

id required

Notes






GETread list /server/omk/opCharts/v2/inventoryn

CHANGED response: Returns a list of all the inventory ids.

Paginated.

GETread one /server/omk/opCharts/v2/inventory/idyReturns the details of the requested inventory
subconcepts
record.





GETread
list
list /server/omk/opCharts/v2/inventory/
subconcept
subconcepts
y
nCHANGED URI: Returns a list of all the inventory
ids for the given subconcept
subconcepts.

Paginated.

GETread
one 
list/server/omk/opCharts/v2/inventory/subconcepts/
id
subconcepty
Returns the details of the requested inventory record

CHANGED URI: Returns a list of all the inventory ids for the given subconcept.

Paginated.






GETread list /server/omk/opCharts/v2/nodes/node_uuid/inventory/subconceptsn

CHANGED URI: Returns a list of all the inventory subconcepts for the given node_uuid.

Paginated.

GETread list /server/omk/opCharts/v2/nodes/node_uuid/inventory/subconcepts/subconcepty

CHANGED URI: Returns the list of inventory data for the given node_uuid and subconcept.

Paginated.

Request Modifiers (query parameters)

...

Query Parameter

Possible Values

properties

Array of property names. If provided only the properties specified will be returned (instead of the whole document).

eg: properties=["configuration.customer", "configuration.group"]

By default the nodes UUID is returned by default if no properties are given

page(int) Which page of the requested document to be returned, from 1 .. n, defaults to 1
limit(int) How many results are returned, defaults to 25
filter

Array of key=value pairs, but coded in an array. Applied to the list of results in the order they are given. If an application key is provided that will be applied first.

eg: filter={"configuration.group":"NMIS8","data.index": "196609"} (which is "configuration.group"="NMIS8" AND "data.index"="196609" )

for a string, if it starts with regex: or iregex: then a case-sensitive or case-insensitive regular expression match is used.

eg: filter={"node_name":"iregex:Switch"} to find all the nodes with switch or SWITCH in their name.

sort

1 | -1 : sort the response with id ascending or descending.

redact

0 | 1 : redact the information in configuration.
** works only if you have MongoDB 4.2 and above and set db_use_v42_features => 1 in opCommon.json

...

Property

Description

Example

id

A globally unique ID

65a5b8b843c6b8c138bc9cab

concept

The concept for this inventory

"device"

cluster_id

The id of the NMIS poller server for the associated node

"660f29ae-f150-4119-bf04-cd9296852449"

configuration



data

Some inventory data is stored in "data"

{
    "hrCpuLoad": 100,
    "hrDeviceDescr": "GenuineIntel: Intel(R) Xeon(R) CPU @ 2.20GHz",
    "hrDeviceType": "1.3.6.1.2.1.25.3.1.3",
    "index": "196609"
}

data_info

Some meta-data about "data" is stored in "data_info"


dataset_info

Some meta-data about time-series data related to this inventory is stored in "dataset_info"


description


"GenuineIntel: Intel(R) Xeon(R) CPU @ 2.20GHz"

enabled


0 or 1

expire_at



historic


0 or 1

lastupdate

The unix timestamp that this inventory record was last updated. 

705359544.17113

node_name

The uuid of the associated node

"vrouter_host"

node_uuid

The uuid of the associated node

"a8ac3d79-aa7c-496f-ae19-f6df04c58a21"

path

array 

response

server_name

The name of the NMIS poller server for the associated node

lab_poller1

subconcepts

An array of the subconcepts for this inventory record

[ "hrsmpcpu" ]

storage

Describes the storage for time-series data for this inventory item.


...