Icons not changes when node down/up

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Icons not changes when node down/up

Post by EAleg »

No node icons change, I would like to know why. I set everything up as in the instructions.

When node down the icon must changes in red ball, when up in green. But something wrong (node always green)... Who knows why? Thank you for answers!
Attachments
222222222.PNG
222222222.PNG (55.76 KiB) Viewed 6903 times
11111111.PNG
11111111.PNG (317.74 KiB) Viewed 6903 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Icons not changes when node down/up

Post by Howie »

Two things

1) you have two nodes, each with a different scale, and each scale only has one entry.

2) you have an ICON line which just links to an image. It will always show the same image for the icon.

If this wasn't a screenshot, I would have rewritten it for you, but you at least want to make ONE scale (both SCALE lines with the same name, both USESCALE lines with that name). After that, you should have node labels that change colour.

To change the colour of an ICON is more complex though. The first few posts here are about that: viewtopic.php?t=47809
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Icons not changes when node down/up

Post by Howie »

ALSO - very important #3: You don't have any TARGET line for these NODEs!

Weathermap collects data and changes it into colours. You have not told it where to get data from. It doesn't know that these nodes are supposed to be routers in Cacti. Again, the link above has an example.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: Icons not changes when node down/up

Post by EAleg »

Howie wrote: Fri Jan 22, 2021 4:13 am Two things

1) you have two nodes, each with a different scale, and each scale only has one entry.

2) you have an ICON line which just links to an image. It will always show the same image for the icon.

If this wasn't a screenshot, I would have rewritten it for you, but you at least want to make ONE scale (both SCALE lines with the same name, both USESCALE lines with that name). After that, you should have node labels that change colour.

To change the colour of an ICON is more complex though. The first few posts here are about that: viewtopic.php?t=47809
SCALE cactidown 0 0 75 0 130 down
SCALE cactiup 4.5 5.5 128 128 128 up

NODE node01655
LABEL Debian
INFOURL http://192.168.118.128/device/device=5/
OVERLIBGRAPH http://192.168.118.128/graph.php?height ... &legend=no
POSITION 571 234
TARGET 5
USESCALE cactidown
ICON images/down.png

NODE node01655
LABEL Debian
INFOURL http://192.168.118.128/device/device=5/
OVERLIBGRAPH http://192.168.118.128/graph.php?height ... &legend=no
POSITION 571 234
TARGET 5
USESCALE cactiup
ICON images/up.png

Thank You Howie!
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: Icons not changes when node down/up

Post by EAleg »

and i dont have rrd, i use librenms )=
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: Icons not changes when node down/up

Post by EAleg »

And can u tell me, what is the value, this is speed?

Where 0 0.5, 0.5 1.5 and etc

SCALE cactiupdown 0 0.5 192 192 192 disabled
SCALE cactiupdown 0.5 1.5 255 0 0 down
SCALE cactiupdown 1.5 2.5 0 0 255 recovering
SCALE cactiupdown 2.5 3.5 0 255 0 up
SCALE cactiupdown 4.5 5.5 128 128 128 unknown
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Icons not changes when node down/up

Post by Howie »

No, it's the status in the cacti database. Not much use to you.

Also, you still have two scales.

SCALE updown 0 0 75 0 130 down
SCALE updown 4.5 5.5 128 128 128 up

NODE xxcvx
USESCALE updown

I think you are missing the basic idea here. Weathermap fetches numbers from TARGETs. It translates those numbers into colours using a SCALE, and then draws nodes and links in those colours. So you need to supply it with a number that is the state of your node, and you do that with a TARGET. "TARGET 5" doesn't mean anything - you will be getting errors in your logs. SCALEs usually have multiple lines, to decide which colour to use based on the value. But the first, and most important thing: you need to define what it means for a node to be down, and how you are going to get that value.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: Icons not changes when node down/up

Post by EAleg »

Howie wrote: Fri Jan 22, 2021 8:53 am No, it's the status in the cacti database. Not much use to you.

Also, you still have two scales.

SCALE updown 0 0 75 0 130 down
SCALE updown 4.5 5.5 128 128 128 up

NODE xxcvx
USESCALE updown

I think you are missing the basic idea here. Weathermap fetches numbers from TARGETs. It translates those numbers into colours using a SCALE, and then draws nodes and links in those colours. So you need to supply it with a number that is the state of your node, and you do that with a TARGET. "TARGET 5" doesn't mean anything - you will be getting errors in your logs. SCALEs usually have multiple lines, to decide which colour to use based on the value. But the first, and most important thing: you need to define what it means for a node to be down, and how you are going to get that value.
Maybe this is speed? let it be 0 0 - down, 1 - 100 - up. do you think it will go?

OMG, i found rrd

./192.168.118.134/port-id2.rrd:INOCTETS:OUTOCTETS
Attachments
232323.PNG
232323.PNG (17.98 KiB) Viewed 6883 times
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: Icons not changes when node down/up

Post by EAleg »

And, here is, but.. my node not down -_-

why red, if my NODE is up

SCALE updown 0 0.01 255 0 0
SCALE updown 0.01 0.1 0 128 0
SCALE updown 0.1 100 0 128 128

SET key_hidepercent_STATE 1
# TEMPLATE-only NODEs:
NODE DEFAULT
MAXVALUE 100


# TEMPLATE-only LINKs:
LINK DEFAULT
BANDWIDTH 1M


# regular NODEs:
NODE 5
LABEL 192.168.118.134
INFOURL http://192.168.118.128/device/device=5/
OVERLIBGRAPH http://192.168.118.128/graph.php?height ... &legend=no
ICON images/s_tab_weathermap_red.gif
TARGET ./192.168.118.134/port-id2.rrd
USESCALE updown in percent
POSITION 203 196

NODE 6
LABEL 192.168.118.132
INFOURL http://192.168.118.128/device/device=6/
OVERLIBGRAPH http://192.168.118.128/graph.php?height ... &legend=no
POSITION 599 235


# regular LINKs:
LINK 5-6
INFOURL http://192.168.118.128/graphs/type=port_bits/id=2/
OVERLIBGRAPH http://192.168.118.128/graph.php?height ... &legend=no
TARGET ./192.168.118.134/port-id2.rrd:INOCTETS:OUTOCTETS
NODES 5 6
Attachments
вфывфывфывф.PNG
вфывфывфывф.PNG (7.41 KiB) Viewed 6881 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Icons not changes when node down/up

Post by Howie »

What data is in ./192.168.118.134/port-id2.rrd?

(i am guessing you are getting warnings about DS names in your logs right now, too)
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: Icons not changes when node down/up

Post by EAleg »

Howie wrote: Fri Jan 22, 2021 5:01 pm What data is in ./192.168.118.134/port-id2.rrd?

(i am guessing you are getting warnings about DS names in your logs right now, too)
The data from which port the info is transmitted.
Did I write the configuration correctly?
Attachments
999999.PNG
999999.PNG (35.04 KiB) Viewed 6871 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Icons not changes when node down/up

Post by Howie »

EAleg wrote: Sat Jan 23, 2021 3:16 am The data from which port the info is transmitted.
Did I write the configuration correctly?
It depends on the structure of the rrd file. There are named "data sources" inside an rrd file, chosen by the application that writes the file. By default, Weathermap will be expecting traffic_in and traffic_out. It's unlikely to be the same in librenms. But Weathermap logs an error if it can't find data, which is why I said look in the logs.

And still, what is the data? traffic? interface state? error rate? something else?
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: Icons not changes when node down/up

Post by EAleg »

Howie wrote: Sat Jan 23, 2021 5:00 am
EAleg wrote: Sat Jan 23, 2021 3:16 am The data from which port the info is transmitted.
Did I write the configuration correctly?
It depends on the structure of the rrd file. There are named "data sources" inside an rrd file, chosen by the application that writes the file. By default, Weathermap will be expecting traffic_in and traffic_out. It's unlikely to be the same in librenms. But Weathermap logs an error if it can't find data, which is why I said look in the logs.

And still, what is the data? traffic? interface state? error rate? something else?
Hi Howie, m-m-m traffic. What about config above? Is that right?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Icons not changes when node down/up

Post by Howie »

The scale probably is - it will show a red label when traffic gets to 0.
Weathermap 0.98a is out! & QuickTree 1.0. Superlinks is over there now (and built-in to Cacti 1.x).
Some Other Cacti tweaks, including strip-graphs, icons and snmp/netflow stuff.
(Let me know if you have UK DevOps or Network Ops opportunities, too!)
EAleg
Cacti User
Posts: 51
Joined: Wed Jun 10, 2020 3:56 am

Re: Icons not changes when node down/up

Post by EAleg »

Howie wrote: Mon Jan 25, 2021 4:22 am The scale probably is - it will show a red label when traffic gets to 0.
yep, when traffic - 0 node red, but when traffic up - node all the same red.
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests