Versions Compared

Key

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

...

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

GET node resource indexes (fetch indexes for a node resource)

...

Request data from a dataset.  The request structure for this 

Request 

 

...

is not simple. The required inputs are resource, dataset, possibly index.  

Request  

Code Block
requestData  = JSON( {
  "model_view": "graph",
  "dataset": {
    "data_source": "local_nmis",
    "parameters": {
      "resource_index": "2",
      "graph_type": "interface",
      "lineType": "line",
      "index_graph_type": "ifInOctets",
      "axis": "0",
      "node": "thor",
      "translation": "",
      "field": ""
    },
    "options": {
      "datasetTitle": ""
    }
  },
  "parameters": {
    "time_period": "specific_time",
    "start_date": "23-May-2014 00:14:40",
    "end_date": "23-May-2014 08:14:40"

  },
  "options": {
    "titleText": "Interface Average Bits"
  }
}

Successful Response

A successful response will be a hash with 2 objects.  The requestObject that was submitted along with a responseObject : 

Code Block
{
  "requestData": {
  	...
  },
  "replyData": {
    "options": {
      "subtitleText": "thor",
      "titleText": "Interface eth0 Bits/Second Utilisation",
      "yAxis1TitleText": null,
      "plotBands": [],
      "yAxis0TitleText": "Avg bps"
    },
    "min": null,
    "stacking": null,
    "max": null,
    "meta_data": {
      "time_start": 1400768080,
      "start_date_input": "2014-05-23 00:14:40",
      "end_date_input": "2014-05-23 08:14:40"
    },
    "data": [
      {
        "yAxis": 0,
        "color": "#00FF00",
        "stack": null,
        "name": " Out",
        "type": "line",
        "data": [
          [
            1400768080000,
            7206.53803798496
          ],
          [
            1400768152000,
            7206.53803798496
          ],
          [
            1400768224000,
            7206.53803798496
          ]
        ]
      }
    ]
  }
}

...