mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Add API endpoint to get service graphs (#15138)
* Add API endpoint to get service graphs * Docs: Add missing title to get_graph_by_service
This commit is contained in:
@@ -564,6 +564,38 @@ Output:
|
||||
|
||||
Output is an image.
|
||||
|
||||
### `get_graph_by_service`
|
||||
|
||||
Get the graph for a service
|
||||
|
||||
Route: `/api/v0/devices/:hostname/services/:service_id/graphs/:datasource`
|
||||
|
||||
- hostname can be either the device hostname or id
|
||||
- service id
|
||||
- datasource is the name of the service datasource
|
||||
|
||||
Input:
|
||||
|
||||
- from: This is the date you would like the graph to start - See
|
||||
[http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html](http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html)
|
||||
for more information.
|
||||
- to: This is the date you would like the graph to end - See
|
||||
[http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html](http://oss.oetiker.ch/rrdtool/doc/rrdgraph.en.html)
|
||||
for more information.
|
||||
- width: The graph width, defaults to 1075.
|
||||
- height: The graph height, defaults to 300.
|
||||
|
||||
Example:
|
||||
|
||||
```curl
|
||||
curl -H 'X-Auth-Token: YOURAPITOKENHERE' https://librenms.org/api/v0/services/localhost/35/graphs/loss
|
||||
```
|
||||
|
||||
Output:
|
||||
|
||||
Output is an image.
|
||||
|
||||
|
||||
### `get_port_graphs`
|
||||
|
||||
Get a list of ports for a particular device.
|
||||
|
Reference in New Issue
Block a user