Node color changing depends on status.

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

citycat
Posts: 12
Joined: Thu Sep 28, 2017 1:27 pm

Node color changing depends on status.

Post by citycat »

Hi,

I have 30 cisco routers that are monitored by the Cacti. I want to do implement node color changing, related to a node state (that's not new on this forum) but I have a problem with a node state that is always "unknown". For node state detection I use ICMP ping & SNMP Uptime. What can be the reason of the unknown state?

Map configuration:

SCALE cactiupdown 0 0.5 192 192 192 images/router_unknown.png
SCALE cactiupdown 0.5 1.5 255 0 0 images/router_down.png
SCALE cactiupdown 1.5 2.5 0 0 255 images/router_unknown.png
SCALE cactiupdown 2.5 3.5 0 255 0 images/router_up.png
SCALE cactiupdown 4.5 5.5 128 128 128 images/router_unknown.png

# cactiupdown statuses:
#0 Disable
#1 Down
#2 Recovering
#3 Up
#5 Unknow

# End of global section

# TEMPLATE-only NODEs:
NODE DEFAULT
LABEL {node:this:name}
USESCALE cactiupdown in
ICON 70 70 {node:this:inscaletag}
MAXVALUE 100
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Node color changing depends on status.

Post by Howie »

What state is the device actually in?

Your scale actually will show 'unknown' for Disabled and Recovering 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!)
citycat
Posts: 12
Joined: Thu Sep 28, 2017 1:27 pm

Re: Node color changing depends on status.

Post by citycat »

I don't see any notice about nodes state in logs (logging level - debug) but I've just tried to delete one by one scale tags for Disabled, Recovering and Unknown and it looks like all nodes in disable state, so the SCALE cactiupdown 0 0.5 192 192 192 images/router_unknown.png works.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Node color changing depends on status.

Post by Howie »

I meant just look in the Cacti 'Manage..Devices' page :-) You don't need to do any detective work...
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!)
citycat
Posts: 12
Joined: Thu Sep 28, 2017 1:27 pm

Re: Node color changing depends on status.

Post by citycat »

According to Device page all routers have up status!
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Node color changing depends on status.

Post by Howie »

OK, so in your debug logs, look for lines with "ReadData" in them. This is the actual process fetching data from Cacti. You'll see lines that say something like "Returning (2,2)" or whatever the state is.
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!)
citycat
Posts: 12
Joined: Thu Sep 28, 2017 1:27 pm

Re: Node color changing depends on status.

Post by citycat »

I don't see any ReadData stings in logs - there're only WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php strings.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Node color changing depends on status.

Post by Howie »

Is that looking in the cacti log viewer, or actually grepping for ReadData?

If you have debug logging turned on and there is literally nothing in the logs but ProcessString lines, something is very wrong indeed.
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!)
citycat
Posts: 12
Joined: Thu Sep 28, 2017 1:27 pm

Re: Node color changing depends on status.

Post by citycat »

I realise that something wrong - looks like Weathermap doesn't get node status.

I see the following for each node in logs:

09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:659] [Map 3] wan.conf: ProcessString: replacing {link:this:interface} with Se0_0_0_0
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:637] [Map 3] wan.conf: ProcessString: used hint
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:626] [Map 3] wan.conf: ProcessString: Found appropriate item: WeatherMapLink 2
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:555] [Map 3] wan.conf: ProcessString: working on {link:this:interface}
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:659] [Map 3] wan.conf: ProcessString: replacing {link:this:router} with grttgbathgr01r01
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:637] [Map 3] wan.conf: ProcessString: used hint
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:626] [Map 3] wan.conf: ProcessString: Found appropriate item: WeatherMapLink 2
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:555] [Map 3] wan.conf: ProcessString: working on {link:this:router}
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:659] [Map 3] wan.conf: ProcessString: replacing {link:this:site} with athens
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:637] [Map 3] wan.conf: ProcessString: used hint
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:626] [Map 3] wan.conf: ProcessString: Found appropriate item: WeatherMapLink 2
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:555] [Map 3] wan.conf: ProcessString: working on {link:this:site}
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:538] [Map 3] wan.conf: Trace: ProcessString({link:this:site} {link:this:router} {link:this:interface}, link:2)
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:538] [Map 3] wan.conf: Trace: ProcessString(/cacti/graph_image.php?local_graph_id=141&rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300, link:2)
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:538] [Map 3] wan.conf: Trace: ProcessString(2, link:2)
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:659] [Map 3] wan.conf: ProcessString: replacing {link:this:interface} with Se0_0_0_0
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:637] [Map 3] wan.conf: ProcessString: used hint
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:626] [Map 3] wan.conf: ProcessString: Found appropriate item: WeatherMapLink 2
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:555] [Map 3] wan.conf: ProcessString: working on {link:this:interface}
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:659] [Map 3] wan.conf: ProcessString: replacing {link:this:router} with grttgbathgr01r01
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:637] [Map 3] wan.conf: ProcessString: used hint
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:626] [Map 3] wan.conf: ProcessString: Found appropriate item: WeatherMapLink 2
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:555] [Map 3] wan.conf: ProcessString: working on {link:this:router}
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:659] [Map 3] wan.conf: ProcessString: replacing {link:this:site} with athens
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:637] [Map 3] wan.conf: ProcessString: used hint
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:626] [Map 3] wan.conf: ProcessString: Found appropriate item: WeatherMapLink 2
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:555] [Map 3] wan.conf: ProcessString: working on {link:this:site}
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:538] [Map 3] wan.conf: Trace: ProcessString({link:this:site} {link:this:router} {link:this:interface}, link:2)
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:538] [Map 3] wan.conf: Trace: ProcessString(/cacti/graph_image.php?local_graph_id=141&rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300, link:2)
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:538] [Map 3] wan.conf: Trace: ProcessString(2, link:2)
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:538] [Map 3] wan.conf: Trace: ProcessString(/cacti/graph.php?rra_id=all&local_graph_id=139, link:1)
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:538] [Map 3] wan.conf: Trace: ProcessString(/cacti/graph.php?rra_id=all&local_graph_id=139, link:1)
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:538] [Map 3] wan.conf: Trace: ProcessString(/cacti/graph.php?rra_id=all&local_graph_id=139, link:1)
09/29/2017 12:40:09 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:538] [Map 3] wan.conf: Trace: ProcessString(/cacti/graph.php?rra_id=all&local_graph_id=139, link:1)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Node color changing depends on status.

Post by Howie »

Right, but the ReadData lines will tell you what data it IS getting.

Which version of weathermap on which version of Cacti is this, incidentally?
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!)
citycat
Posts: 12
Joined: Thu Sep 28, 2017 1:27 pm

Re: Node color changing depends on status.

Post by citycat »

Cacti Version: 0.8.8h, Plugin Architecture Version: 3.1
Weathermap 0.98
citycat
Posts: 12
Joined: Thu Sep 28, 2017 1:27 pm

Re: Node color changing depends on status.

Post by citycat »

Howie, do you have any ideas how to deal with the problem?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Node color changing depends on status.

Post by Howie »

If the only debug log messages you get are from ProcessString, your weathermap installation is broken somehow. I would delete it and re-install.
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!)
citycat
Posts: 12
Joined: Thu Sep 28, 2017 1:27 pm

Re: Node color changing depends on status.

Post by citycat »

In /var/log/messages I see ReadData for links only:

Oct 2 13:45:02 tormon03 Cacti[27086]: WEATHERMAP: WARNING: [Map 3] wan.conf: ReadData: LINK 4, target: /opt/cacti/rra/basel_traffic_in_157.rrd on config line 313 of /opt/cacti/plugins/weathermap/configs/wan.conf had no valid data, according to WeatherMapDataSource_rrd
Oct 2 13:45:02 tormon03 Cacti[27086]: WEATHERMAP: WARNING: [Map 3] wan.conf: ReadData: LINK 21, target: /opt/cacti/rra/rye_traffic_in_197.rrd on config line 499 of /opt/cacti/plugins/weathermap/configs/wan.conf had no valid data, according to WeatherMapDataSource_rrd


and
Oct 2 14:15:02 tormon03 Cacti[31747]: 10/02/2017 02:15:02 PM - SPINE: Poller[0] FATAL: MySQL Error:'2013', Message:'Lost connection to MySQL server during query' (Spine thread)
Oct 2 14:20:01 tormon03 Cacti[32247]: POLLER: WARNING: There are '2' detected as overrunning a polling process, please investigate
Oct 2 14:20:02 tormon03 Cacti[31638]: SYSTEM: TOPX STATS: Time:2.1671 DT:1 DS:66 CYCLES: 57882
Oct 2 14:20:03 tormon03 Cacti[31638]: WEATHERMAP: STATS: Weathermap 0.98 run complete - Mon, 02 Oct 17 14:20:03 -0400: 1 maps were run in 1 seconds with 0 warnings.
Oct 2 14:20:08 tormon03 Cacti[32247]: SYSTEM: STATS: Time:7.0398 Method:spine Processes:20 Threads:15 Hosts:30 HostsPerProcess:2 DataSources:195 RRDsProcessed:129
Oct 2 14:20:08 tormon03 Cacti[32247]: SYSTEM: THOLD STATS: Time:0.1623 Tholds:52 TotalHosts:29 DownHosts:0 NewDownHosts:0
Oct 2 14:20:11 tormon03 Cacti[32247]: SYSTEM: TOPX STATS: Time:2.2993 DT:1 DS:66 CYCLES: 57883
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Node color changing depends on status.

Post by Howie »

Wait a sec... you posted the DEFAULT node back up there. Do the other nodes actually have a TARGET line?
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!)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests