Host & Link Status Monitoring in Weathermap

In weathermap link utilization is working fine.
I want to monitor host and link status. For example, if host is up = green, down = red, error = orange. same for links also. After hours of googling came up with following for host status.

#scale definiation
    SCALE updown 0    0      0 255   0  
    SCALE updown 0    30   255 255   0  
    SCALE updown 30   100  255   0   0  

#under node
   TARGET fping:hostname
   USESCALE updown out percent

But it always shows green even libre says host is down. Can anybody guide what might be wrong ? Also like to know how to monitor port status in Weathermap.


Old post, but this was bugging me recently and I ended up doing the below. I tried fping and even tried altering the datasource plugin to understand it better but never got any luck.

Below I have white for normal, red if no ping stats. Added the actual number (latency ms) in a label for testing below it as an option too:

image image

Define an updown scale, then use it along with a target that directly references the ping-perf.rrd of the host in question. When the host is down, the RRD ends up with NaN and that translates to 0 when extracted and displayed:

SCALE updown 0 0  255 0 0
SCALE updown 0 10000 255 255 255

        LABEL BLAH-SW01
        INFOURL /device/device=63/
        OVERLIBGRAPH /graph.php?height=100&width=512&device=63&type=device_bits&legend=no
        ICON 80 80 images/WorkgroupSwitch.png
        LABELOFFSET 0 25
        POSITION 178 521
        USESCALE updown in
        TARGET gauge:./BLAH-SW01/ping-perf.rrd:ping:-

# if you want the number for debugging/validation:
        LABEL {node:this:inpercent:%k}
        POSITION 178 570
        USESCALE updown in
        TARGET gauge:./BLAH-SW01/ping-perf.rrd:ping:-

If you wanted to graduate the latency values in to a colour scale, you could do that too.


Excellent! Thank you for sharing. This is what I’ve been looking for.
I had it working and then I updated to the latest build and it seems the logic for getting the RRD path changed somewhere between the old version I was running and the most current.

Is this configuration you shared still working on the latest build?

Post update all the nodes I had setup using your example return the following now

…had no valid data, according to WeatherMapDataSource_rrd


Upon further investigation it appears it may be due to the fact that I’m running rrdcached

I’ve found some relevant information here and here


I setup a ngix proxy for the sock and tried to do some testing by running the command manually

/usr/bin/rrdtool fetch LAST --start now-800 --end now -d localhost:42217


‘‘ERROR: request: internal error while talking to rrdcached’’

So I tailed the nginx log and found

2021/09/03 12:40:10 [crit] 606660#606660: *2757 connect() to unix:/run/rrdcached.sock failed (13: Permission denied) while connecting to upstream, client:, server: 0 .0.0.0:42217, upstream: “unix:/run/rrdcached.sock”, bytes from/to client:0/0, bytes from/to upstream:0/0

Which lead me to the permissions of the files in /var/run/rrdcached

Once I changed the permissions on those files everything worked!

Well done for getting to the bottom of that rabbit hole! :+1:

I’m glad it’s working and that someone else was able to confirm it. It continues to work for the latest 0.98a version.

After playing around with it some more I wasn’t convinced it was the right fit for me, rrdcache seemed to throw a wrench into this method. I wanted to leverage the LibrenmsAPI for device status so I ended up writing a datasource plugin that does just that. I think it’s more true to reflect exactly what you would see in the librenms dashboard availability map regardless of what your RRD environment looks like.

I made a pull request on the plugin , here’s the file if anyone is interested.

1 Like

Thank you for this code.
I was looking for something like this to easily color code the map.
I had originally assumed that that was what the weathermap would do, until everything stayed the same color regardless of connection.


edit WeatherMapDataSource_fping.php

and change:
$this->fping_cmd = “/usr/local/sbin/fping”;

$this->fping_cmd = “/usr/sbin/fping”;

and you should start seeing colors