Wheathermap question , change icon if device is down?

Hi guys, can not find any examples and nothing related in offcial documentation , so I will post question here.
Is it possible to change icon file , icon color , or any attribute when device is down ?
So far I can change link color according to value but would like to add this feature to my map so I can see when device is down.

Any feedback would be preciated:
Regards.
Leandro.

I havent seen actually make that work. It would require some coding.

Hi @Leandro_Roggerone ,

This is doable through SCALE TAGs.

I know it works on 0.98 but I haven’t tested it with LibreNMS version which I believe is 0.97 but you should be able to check out the 0.97 docs and see if it’s there or not.

Node config example

NODE node05268bis
ICON images/port_{node:this:inscaletag}.png
TARGET xxxxxxxxx
USESCALE ifstatus in percent
POSITION 321 280

SCALE config example

All settings for scale ifstatus

SCALE ifstatus 0 0.99 255 209 71 2
SCALE ifstatus 1 1 0 255 0 1
SCALE ifstatus 1.01 2 255 209 71 2

So if you look at the scale, after the RGB there is a"1" or “2” right?
Now if you look at the node’s config, that’s where you tell wheathermap what picture to use and the “inscaletag” does the trick. Of course you’ll need to have an image file named, as per my example, ‘port_1.png’ and ‘port_2.png’ and maybe also a ‘port_unknown.png’.

The scale could also be worded

All settings for scale ifstatus

SCALE ifstatus 0 0.99 255 209 71 sosad
SCALE ifstatus 1 1 0 255 0 reallyhappy
SCALE ifstatus 1.01 2 255 209 71 sadagain

And then you’ll need port_sosad.png, port_reallyhappy.png, etc…

I hope that helps, cheers.

1 Like

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