Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Add CBQoS index example, update Data post with new item field

...

Code Block
[
  {
    "active_indexes": null,
    "value": "nodehealth",
    "url": "/omk/opCharts/nodes/asgard/resources",
    "name": "nodehealth"
  },
  {
    "active_indexes": [ "192.168.90.17" ],
    "value": "bgpPeer",
    "url": "/omk/opCharts/nodes/asgard/resources",
    "name": "bgpPeer"
  },
  {
    "active_indexes": null,
    "value": "mib2ip",
    "url": "/omk/opCharts/nodes/asgard/resources",
    "name": "mib2ip"
  },
  {
    "active_indexes": [ "2"],
    "value": "cbqos-out",
    "url": "/omk/opCharts/nodes/asgard/resources",
    "name": "cbqos-out"
  },
  {
    "active_indexes": [ "2", "1" ],
    "value": "pkts_hc",
    "url": "/omk/opCharts/nodes/asgard/resources",
    "name": "pkts_hc"
  },
  {
    "active_indexes": [ "2", "1" ],
    "value": "interface",
    "url": "/omk/opCharts/nodes/asgard/resources",
    "name": "interface"
  }
]

Anchor
Node Resource Datasets
Node Resource Datasets
GET node resource datasets (fetch datasets for a single node & resource)

GET /omk/opCharts/nodes/[node]/resources/[resource]/

...

Code Block
[
  {
    indexed: "1",
    resource_id: "interface",
    value: "ifInOctets",
    url: "/omk/opCharts/nodes/asgard/resources/interface/indicies.json",
    tokens: [
      "ifInOctets",
      "interface"
    ],
    name: "ifInOctets"
  },
  ...
]

Anchor
Node Resource Indexes
Node Resource Indexes
GET node resource indexes (fetch indexes for a node resource)

GET /omk/opCharts/nodes/[node]/resources/[resource]/indicies.json

...

Returns a hash, with the name of the resource.  A datum array of index objects, these hold the data you are likely looking for.  The value attribute holds the identifier for this object.  Name is the attribute which can be displayed to users.  The "active" property tells you if this index is being collected.

The list of datasets available for the specified resource along with the list of indexes create an N x M matrix of possible datasets.

Code Block
{
  name: "interface",
  datum: [
    {
      resource_id: "interface",
      value: "2",
      url: "/omk/opCharts/nodes/asgard/resources/interface/datasets",
      "active": 1,
      tokens: [
        "WAN/DSL",
        "FastEthernet0/1",
        "2"
      ],
      name: "WAN/DSL -- FastEthernet0/1 -- 2"
    },
    {],
      resource_idheader: "interface"
}

If the resource is CBQoS and the index holds CBQoS data there will be an array of classes available from this index.

Another example, with CBQoS data: 

Code Block
{
  "name": "cbqos-out",
  "datum": [
    value: "1"{
      "classes": [
        "InternetControl",
        "class-default",
        "Interactive",
        "Voice",
        "VPN",
        "WebTraffic"
      ],
      "resource_id": "cbqos-out",
      "value": "2",
      "active": 1,
      "url": "/omk/opCharts/nodes/asgard/resources/interfacecbqos-out/datasets",
      "tokens": [
        "Opmantek LANWAN/DSL",
        "FastEthernet0/01",
        "1"2
      ],
      "name": "Opmantek LANWAN/DSL -- FastEthernet0/01 -- 12"
    }
  ],
  "header": "interfacecbqos-out"
}

 

Data

GET/POST node resource dataset (fetch data for a single dataset from a node resource)

...

Parameters  
{  
 

requestData (struct)

 

modelstring"nmis_rrd" or "nmis_graph". nmis_rrd will provide data directly as it is in the RRD files. nmis_graph will provide data after running it through the manipulations done by the NMIS graph
model_viewstring"graph", no other options supported at this time
data_sourcestring"local_nmis", no other options supported at this time
optionsstruct* can be empty for now, so just {}
parametersstruct
start_date_rawnumberunix time for data to start
end_date_rawnumberunix time for data to end
nodestringnode name, found using GET node
graph_typestring

If using nmis_rrd: maps to a resource found using Get Node Resources (value attribute, which is the ID).

If using nmis_graph: maps to the name of the graph if not indexed, maps to the same as nmis_rrd if indexed

fieldstringOnly used for nmis_rrd: maps to the dataset required found using GET node resource datasets (value attribute of desired dataset)
resource_indexstring/numberIf the resource is indexed, the index of the resource required, found using GET node resource indexes
index_graph_typestring

Only used if the resource is indexed:

 nmis_rrd: same as graph_type

nmis_graph: the name of the graph

itemstringCBQoS class name, found by using "Get node resource index"
axisnumber0 or 1, the axis the dataset will group itself into, usually 0
}  

...