Device up/down indicator with grafana etc

Maybe I’m not wording my query very well but I can’t seem to find quite what I’m looking for (I’m a bit new to some of this)

I have LibreNMS working with InfluxDB and Grafana. I don’t necessarily need the solution to end up on Grafana but I suspect that with better understanding, that will start to fall into place.

First - If I just wanted a dashboard that showed me a list of the devices that are down at the moment, how would I go about this? Component Status doesn’t seem to give me ANY information, Device Summary is… helpful but too broad. After some searching, I found some macros that would seem to indicate that the up/down state for a device is stored or determined and I would think it would be available to use either in the dashboards or as a datapoint being sent to grafana, but the only indication I can find that this info is being looked at is in either a query or the device summary (it shows the down count, I would assume there’s an expanded version of that?)

Second - (sort of as a workaround maybe) how are the fields being populated in Influx determined by LibreNMS? Seems like there’s a set list with very little in the way of flexibility. Basically, same issue as the First point/question - how dow I get just the up/down state? I don’t need an alert yet, right now I just want to be able to list it out in a dashboard either in grafana or librenms (ideally both).

I’m a little short on time to write this, so I apologize if the details are a bit sparse - I’m not really time constrained to solve it, just to write this post :wink:

I feel like I’m missing something obvious but it’s just out of reach…

First, you don’t send stuff to Grafana, I uses queries in dashboards to get data from sources.
You can use the LibreNMS DB as a data source in Grafana and build a dashboard with dynamically appearing state tiles and use the same logic LibreNMS uses to set the state and color.

I think that fell into the ‘short on time’ category… I’m not sending things to grafana obviously, I should have said that I have LibreNMS putting things into influxdb and that’s feeding grafana. I’m also using infulx/grafana for some other non-nms (though semi-related) data.

I hadn’t considered using the LibreNMS DB directly… that seems like it’d be a much more efficient usage of space. Doing things the way I’m doing them always seemed like duplicating - or partially duplicating - information. I’ll investigate this.

For the moment, while I look into that, if we assume that that won’t work for whatever reason, how would I specify what data I want LibreNMS to put into influxdb? Or is that actually possible?

I think you only need influxDB for graphs of time series data - like RRD.
State you can get from the LibreNMS DB directly.

If I read librenms/InfluxDB.php at master · librenms/librenms · GitHub correctly, the same data, that RRD gets, is also send to influxDB.

Probably there is no need to fiddle with the data that get send.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.