GRNET MON API
Welcome to the GRNET MON API
This page describes the GRNET MON API
This api supports queries using multiple parameters.
Usage
The API responds with JSON objects containing the data it was asked for
Queries without parameters will return the top level options of the API, as such
mon.grnet.gr/api/ ~> {"Peers": "/api/peers/", "rg": "/api/rg/", "Points of Presence": "/api/pops/"}
Then, by specifying one parameter, you get the data under the tag you specified
mon.grnet.gr/api/rg ~> {"switches": "/api/rg/switches/", "routers": "/api/rg/routers/"}
API contents
This section describes the contents of the API
Peers
This API endpoint provides all the interfaces each peer site is connected.
Points of presence
This API endpoint shows all points of presence, cities, datacenters, and details for each of GRNET's point of presence (pop).
Rg
This API endpoint provides all the graphs for every device GRNET is monitoring
Below, as an example, we describe the process to obtain graphs for the router eier.grnet.gr
Ask the API for the graph types this device supports.
https://mon.grnet.gr/api/rg/routers/eie.grnet.gr/
The API responds with a list of available graph types and their links>
{ "discards": "/api/rg/routers/eier.grnet.gr/discards/", "errors": "/api/rg/routers/eier.grnet.gr/errors/", "traffic": "/api/rg/routers/eier.grnet.gr/trafic/", ... }
Now lets assume we want to see the traffic graphs. By following the url and selecting a graph, the API provides the desired graph.
https://mon.grnet.gr/api/rg/routers/eier.grnet.gr/traffic/: { "209015": { # graph id "uri": "/rg/209015/draw/static/", # url "metadata": { # metadata json "node": { "name": "node", "value": "eier.grnet.gr" }, "status": { "name": "status", "value": "up" }, ....(other metadata).... } }, ...(other graph ids)..... } https://mon.grnet.gr/api/rg/209015/draw/static/: { .. responds with the graph .. }
The API allows the user to apply for a graph starting and ending at a specific time. This is achieved by modifying the graph url in the following manner:
https://mon.grnet.gr/rg/209193/draw/static/ //draws the default diagram https://mon.grnet.gr/rg/209193/draw/static/-1y,-300 //draws the diagram for the time period {-1year,-300sec} https://mon.grnet.gr/rg/209193/draw/static/-2d,-300m //draws the diagram for the time period {-2days,-300minutes}
Finally, if a GET request is sent using the parameter html=true, the API responds with this info page