I know, I’m needy/wanty this week!
I’ve played around with the “Graphs” in the past, but unless I’m missing something, it doesn’t seem to work quite the way I expected it.
What I’d like is a link to a graph from an interface – and it brings up the graph for that interface or the graphs of both ends of the connection. Cacti URLs ftw! Maybe a “URL” field in “Edit Interface” that can contain more than one URL?
However, it appears as if I can only define one set of graphs, and that’ll get displayed regardless on which interface’s “graph” button I click. So basically it’s one “display graphs” button that then displays all the graphs I have listed in “Extras->Graphs”
I realize there was a discussion in https://github.com/digitalocean/netbox/issues/675, and I did read the documentation, but I think I fail at the “understanding” part
Let’s say I have two 48-port switches with devices connected to the switch interfaces. It seems that if I define graphs (type Interface) for each port (96), regardless on which switch’s interface’s graph button I click, I see all 96 graphs, which is a little on the overkill side.
Or is this where I need to mess with the “Export Templates” and do an active export of a particular connection, in which case “Help! I fell off the learning curve and I can’t get up!”
It’s really just an “I want to do this because I’m too lazy to search for the device/port in Cacti” thing.
Sorry if I sound confused (which I might be). I blame too many trips to the coffee machine.
Frank
obj
.--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discuss+unsubscribe@googlegroups.com.
To post to this group, send email to netbox-discuss@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/55d73961145a441aab08f6c6394f2164%40WS1-EXCH02.dc.local.
For more options, visit https://groups.google.com/d/optout.
Ooooh!!!!
Now, that’s slick! Tried it and it works like a charm. Well, I had to do some Cacti-wrangling, but Cacti and I have always had a complicated relationship.
Say, just in case that there are other people out there who are as dense as I, could you think perhaps add that example to the docs/graph section?
Frank
From: Jeremy Stretch [mailto:jstr...@digitalocean.com]
Sent: Wednesday, March 08, 2017 09:23
To: Frank Mogaddedi <fra...@datachambers.com>
Cc: NetBox <netbox-...@googlegroups.com>
Subject: Re: [netbox-discuss] Wishlist: interface graph links
You only need to define one graph for each type of graph you want to display. The interface name is available as a template variable within the graph's source URL:
> Source URL: The source of the image to be embedded. The associated object will be available as a template variable named obj
.
So, if you might define a graph with the source URL of
https://my.nms.local/graphs/?node={{ obj.device.name }}&interface={{ obj.name }}&duration=5m
This graph will be shown for every interface. You'd create multiple graphs if you wanted to, for instance, display multiple time periods or different data:
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
Hope that helps.
Jeremy
[…]
The quick answer is: poorly J
In Netbox, I define a graph called “traffic”, type “Interface”, some weight and the source URL pointing to my cacti server like this:
http://cactiserver.domain.com/cacti_xlate/netbox.php?HOST={{obj.device.name}}&PORT={{obj.name}}
I attached a tar-gzipped file (and bcc-ed you directly, if the google group doesn’t like attachments) containing my hack.
It’s a hack. It’s ugly, but it does the trick. Note that there I do some fancy port-name translation that don’t seem to make sense, but I have Extreme switches with ports like “1:12”, and I didn’t put those exact names as ports into Netbox, so I have to translate them.
I also searched for the proper graph_template_id / data_template_id that I want to use in the cacti database before plugging those numbers straight into the query (see functions.php)
It’s messy but it kinda works. Cacti doesn’t have an API (I think there’s some plugin which I haven’t looked at, though), and I’m on my way to replace cacti with LibreNMS (a fork of Observium). A ton of graphs for my switches right out-of-the-box, graphs look a bit different, but it DOES have a proper API.
Good luck,
Frank
From: netbox-...@googlegroups.com [mailto:netbox-...@googlegroups.com] On Behalf Of bellwood
Sent: Friday, April 21, 2017 09:58
To: NetBox <netbox-...@googlegroups.com>
Subject: Re: [netbox-discuss] Wishlist: interface graph links
Frank,
--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.
To post to this group, send email to netbox-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/d4826594-3759-42c0-abea-1681b9714efc%40googlegroups.com.
obj
.The quick answer is: poorly J
In Netbox, I define a graph called “traffic”, type “Interface”, some weight and the source URL pointing to my cacti server like this:
http://cactiserver.domain.com/cacti_xlate/netbox.php?HOST={{obj.device.name}}&PORT={{obj.name}}
I attached a tar-gzipped file (and bcc-ed you directly, if the google group doesn’t like attachments) containing my hack.
It’s a hack. It’s ugly, but it does the trick. Note that there I do some fancy port-name translation that don’t seem to make sense, but I have Extreme switches with ports like “1:12”, and I didn’t put those exact names as ports into Netbox, so I have to translate them.
I also searched for the proper graph_template_id / data_template_id that I want to use in the cacti database before plugging those numbers straight into the query (see functions.php)
It’s messy but it kinda works. Cacti doesn’t have an API (I think there’s some plugin which I haven’t looked at, though), and I’m on my way to replace cacti with LibreNMS (a fork of Observium). A ton of graphs for my switches right out-of-the-box, graphs look a bit different, but it DOES have a proper API.
Good luck,
Frank
From: netbox-...@googlegroups.com [mailto:netbox-...@googlegroups.com] On Behalf Of bellwood
Sent: Friday, April 21, 2017 09:58
To: NetBox <netbox-...@googlegroups.com>
Subject: Re: [netbox-discuss] Wishlist: interface graph links
Frank,
I'd be interested to know how you managed to wrangle Cacti to integrate with Netbox?
While the above examples "helps" i think having some sound documentation of how one would actually integrate with Cacti would be really appreciated.
Thanks =)
--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-...@googlegroups.com.