From 92d726bbd43965a9e40031008d1940338212cf42 Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Wed, 15 Mar 2017 12:16:46 -0400 Subject: [PATCH] Added examples to the graphs documentation --- docs/data-model/extras.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/data-model/extras.md b/docs/data-model/extras.md index 58da76cee..ec424fec2 100644 --- a/docs/data-model/extras.md +++ b/docs/data-model/extras.md @@ -90,6 +90,22 @@ NetBox does not have the ability to generate graphs natively, but this feature a * **Source URL:** The source of the image to be embedded. The associated object will be available as a template variable named `obj`. * **Link URL (optional):** A URL to which the graph will be linked. The associated object will be available as a template variable named `obj`. +## Examples + +You only need to define one graph object for each graph you want to include when viewing an object. For example, if you want to include a graph of traffic through an interface over the past five minutes, your graph source might looks like this: + +``` +https://my.nms.local/graphs/?node={{ obj.device.name }}&interface={{ obj.name }}&duration=5m +``` + +You can define several graphs to provide multiple contexts when viewing an object. For example: + +``` +https://my.nms.local/graphs/?type=throughput&node={{ obj.device.name }}&interface={{ obj.name }}&duration=60m +https://my.nms.local/graphs/?type=throughput&node={{ obj.device.name }}&interface={{ obj.name }}&duration=24h +https://my.nms.local/graphs/?type=errors&node={{ obj.device.name }}&interface={{ obj.name }}&duration=60m +``` + # Topology Maps NetBox can generate simple topology maps from the physical network connections recorded in its database. First, you'll need to create a topology map definition under the admin UI at Extras > Topology Maps.