host monitoring?

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

mandy
Posts: 7
Joined: Thu Feb 14, 2008 2:35 am

Post by mandy »

I have tried monitor host status in weathermap, but it was not successful.

I'm not too sure what is the value of cactihost id and where to find it??
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: host monitoring?

Post by Howie »

mandy wrote:I'm not too sure what is the value of cactihost id and where to find it??
Howie wrote: So, for Cacti device 33 (the number in the URL on the host.php page)
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!)
goulin
Posts: 7
Joined: Thu Jul 16, 2009 8:27 pm

Post by goulin »

Hi,

I have just stumbled across this post and decided to give this a try. I haven't had any success with my code. The code I am using is:

NODE node03020
LABEL TESTROUTER
ICON images/nodestatus_{node:this:state}.png
TARGET cactihost:239
POSITION 228 301

The nodestatus images I am using is of a switch, but when I changed the code to use the TARGET parameter and changed the icon to include '_{node:this:state}', the image of the switch has disappeared from the Weathermap, and the only thing showing is the label, which now seems to have a green background with white text.

Am I missing something? I have checked and I do have the WeatherMapDataSource_cactihost.php installed, and I can't see any errors in my cacti logs.

07/17/2009 11:27:22 AM - WEATHERMAP
: Poller[0] Weathermap 0.95b starting - Normal logging mode. Turn on DEBUG in Cacti for more information
07/17/2009 11:27:22 AM - WEATHERMAP: Poller[0] [Map 6] ausnz.conf: Map: /opt/sfw/cacti-0.8.7b/plugins/weathermap/configs/ausnz.conf -> /opt/sfw/cacti-0.8.7b/plugins/weathermap/output/b71abe783b9164a56d7d.html & /opt/sfw/cacti-0.8.7b/plugins/weathermap/output/b71abe783b9164a56d7d.png
07/17/2009 11:27:25 AM - WEATHERMAP: Poller[0] [Map 6] ausnz.conf: NODE Hastings has a relative position to an unknown node! [WMWARN10]
07/17/2009 11:27:28 AM - WEATHERMAP: Poller[0] [Map 6] ausnz.conf: ColourFromPercent: Clipped Mascot-RIAG-Internet-Cloud 141.559540568% to 100%
07/17/2009 11:27:28 AM - WEATHERMAP: Poller[0] [Map 6] ausnz.conf: About to write image file. If this is the last message in your log, increase memory_limit in php.ini [WMPOLL01]
07/17/2009 11:27:30 AM - WEATHERMAP: Poller[0] [Map 6] ausnz.conf: ColourFromPercent: Clipped Mascot-RIAG-Internet-Cloud 141.559540568% to 100%
07/17/2009 11:27:30 AM - WEATHERMAP: Poller[0] [Map 6] ausnz.conf: Using a non-existent special font (100) - falling back to internal GD fonts
07/17/2009 11:27:30 AM - WEATHERMAP: Poller[0] [Map 6] ausnz.conf: Using a non-existent special font (100) - falling back to internal GD fonts
07/17/2009 11:27:30 AM - WEATHERMAP: Poller[0] [Map 6] ausnz.conf: Using a non-existent special font (100) - falling back to internal GD fonts
07/17/2009 11:27:30 AM - WEATHERMAP: Poller[0] [Map 6] ausnz.conf: Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
07/17/2009 11:27:30 AM - WEATHERMAP: Poller[0] [Map 6] ausnz.conf: Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
07/17/2009 11:27:30 AM - WEATHERMAP: Poller[0] [Map 6] ausnz.conf: Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
07/17/2009 11:27:30 AM - WEATHERMAP: Poller[0] [Map 6] ausnz.conf: Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
07/17/2009 11:27:30 AM - WEATHERMAP: Poller[0] [Map 6] ausnz.conf: Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
07/17/2009 11:27:30 AM - WEATHERMAP: Poller[0] [Map 6] ausnz.conf: Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
07/17/2009 11:27:30 AM - WEATHERMAP: Poller[0] [Map 6] ausnz.conf: Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
07/17/2009 11:27:30 AM - WEATHERMAP: Poller[0] [Map 6] ausnz.conf: Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
07/17/2009 11:27:30 AM - WEATHERMAP: Poller[0] [Map 6] ausnz.conf: Using a non-existent special font (100) - falling back to internal GD fonts [WMWARN03]
07/17/2009 11:27:35 AM - WEATHERMAP: Poller[0] [Map 6] ausnz.conf: Wrote map to /opt/sfw/cacti-0.8.7b/plugins/weathermap/output/b71abe783b9164a56d7d.png and /opt/sfw/cacti-0.8.7b/plugins/weathermap/output/b71abe783b9164a56d7d.thumb.png
07/17/2009 11:27:39 AM - WEATHERMAP: Poller[0] [Map 6] ausnz.conf: Weathermap 0.95b run complete - 1 maps were run in 17 seconds

Thanks,
goulin
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

goulin wrote:using is of a switch, but when I changed the code to use the TARGET parameter and changed the icon to include '_{node:this:state}', the image of the switch has disappeared from the Weathermap, and the only thing showing is the label, which now seems to have a green background with white text.

Am I missing something? I have checked and I do have the WeatherMapDataSource_cactihost.php installed, and I can't see any errors in my cacti logs.
That's odd. Just to confirm - yor images are called nodestatus_up.png, nodestatus_down.png etc?

I would have expected to see some complaint in the logs about icon files not found.

If you run with DEBUG logging for one poller cycle, you'll see a lot more info, including: what value the DS plugin is fetching for the host, what values are being set to various variables (including 'state'), and also what icon filename is being used.

See if anything looks funny in that lot?
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!)
goulin
Posts: 7
Joined: Thu Jul 16, 2009 8:27 pm

Post by goulin »

Hi Howie,

Yes, the images are called nodestatus_up.png etc etc:

-rw-r--r-- 1 cactiuser cacti 1726 Jul 17 11:07 nodestatus_up.png
-rw-r--r-- 1 cactiuser cacti 1726 Jul 17 11:07 nodestatus_recovering.png
-rw-r--r-- 1 cactiuser cacti 1726 Jul 17 11:07 nodestatus_down.png
-rw-r--r-- 1 cactiuser cacti 1726 Jul 17 11:07 nodestatus_disabled.png

Unfortunately, I only maintain the front end of the Weathermap and Cacti, as opposed to the backend, so I am not sure how to run the Cacti poll in debug mode. I asked our backend people, and they don't seem to know either. Are you able to post the command to run the poll in debug mode (apologies for the newbie question)?

Thanks,
goulin
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

goulin wrote: Unfortunately, I only maintain the front end of the Weathermap and Cacti, as opposed to the backend, so I am not sure how to run the Cacti poll in debug mode. I asked our backend people, and they don't seem to know either. Are you able to post the command to run the poll in debug mode (apologies for the newbie question)?
Sure.. in Cacti's Settings, on the first tab, choose Poller Logging Level, and set it as DEBUG. Wait for 5 minutes, then turn it back to LOW again. You should now have a big lump of log for that one poller cycle, which has a lot more detail about what is going on.
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!)
goulin
Posts: 7
Joined: Thu Jul 16, 2009 8:27 pm

Post by goulin »

Ok... weird... looks like it is getting the value back from Cacti correctly:

07/20/2009 03:53:00 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:435] [Map 6] ausnz.conf: ProcessString: Found appropriate item: WeatherMapNode node08624
07/20/2009 03:53:00 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:454] [Map 6] ausnz.conf: ProcessString: used note
07/20/2009 03:53:00 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:468] [Map 6] ausnz.conf: ProcessString: replacing {node:this:state} with up

But I still see no image... it only shows the label with a green background.

Edit:
More info:

07/20/2009 04:05:18 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:600] [Map 6] ausnz.conf: ReadData for NODE node08624:
07/20/2009 04:05:18 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:606] [Map 6] ausnz.conf: ReadData: New Target: cactihost:239
07/20/2009 04:05:18 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:637] [Map 6] ausnz.conf: ReadData: Matched for WeatherMapDataSource_cactihost. Calling WeatherMapDataSource_cactihost->ReadData()
07/20/2009 04:05:18 PM - CMDPHP: Poller[0] DEBUG: SQL Row: "select * from host where id=239"

07/20/2009 04:05:18 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@WeatherMapDataSource_cactihost.php:82] [Map 6] ausnz.conf: CactiHost ReadData: Returning (3,3,0)
07/20/2009 04:05:18 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:674] [Map 6] ausnz.conf: ReadData complete for NODE node08624: 3 3
07/20/2009 04:05:18 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:715] [Map 6] ausnz.conf: ReadData: Setting 3,3
07/20/2009 04:05:18 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:719] [Map 6] ausnz.conf: ReadData Completed.
07/20/2009 04:05:19 PM - WEATHERMAP: Poller[0] DEBUG: [NewColourFromPercent@Weathermap.class.php:945] [Map 6] ausnz.conf: NCFPC node08624 0.01_10 0 50 0
07/20/2009 04:05:19 PM - WEATHERMAP: Poller[0] DEBUG: [pre_render@WeatherMapNode.class.php:223] [Map 6] ausnz.conf: Node->pre_render: Label Metrics are: 24 x 13 -> 28 x 17
07/20/2009 04:05:19 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:435] [Map 6] ausnz.conf: ProcessString: Found appropriate item: WeatherMapNode node08624
07/20/2009 04:05:19 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:454] [Map 6] ausnz.conf: ProcessString: used note
07/20/2009 04:05:19 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:468] [Map 6] ausnz.conf: ProcessString: replacing {node:this:state} with up
goulin
Posts: 7
Joined: Thu Jul 16, 2009 8:27 pm

Post by goulin »

Hmmm... I can't figure it out. The functionality seems to be working (I simulated a down below, and it is correctly getting this information frmo Cacti), but I'm not getting the picture coming up on my weathermap:

07/24/2009 02:42:58 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:600] [Map 6] ausnz.conf: ReadData for NODE node08624:
07/24/2009 02:42:58 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:606] [Map 6] ausnz.conf: ReadData: New Target: cactihost:239
07/24/2009 02:42:58 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:637] [Map 6] ausnz.conf: ReadData: Matched for WeatherMapDataSource_cactihost. Calling WeatherMapDataSource_cactihost->ReadData()
07/24/2009 02:42:58 PM - CMDPHP: Poller[0] DEBUG: SQL Row: "select * from host where id=239"
07/24/2009 02:42:58 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@WeatherMapDataSource_cactihost.php:82] [Map 6] ausnz.conf: CactiHost ReadData: Returning (1,1,0)
07/24/2009 02:42:58 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:674] [Map 6] ausnz.conf: ReadData complete for NODE node08624: 1 1
07/24/2009 02:42:58 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:715] [Map 6] ausnz.conf: ReadData: Setting 1,1
07/24/2009 02:42:58 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:719] [Map 6] ausnz.conf: ReadData Completed.
07/24/2009 02:43:00 PM - WEATHERMAP: Poller[0] DEBUG: [NewColourFromPercent@Weathermap.class.php:945] [Map 6] ausnz.conf: NCFPC node08624 0.01_10 0 50 0
07/24/2009 02:43:00 PM - WEATHERMAP: Poller[0] DEBUG: [pre_render@WeatherMapNode.class.php:223] [Map 6] ausnz.conf: Node->pre_render: Label Metrics are: 24 x 13 -> 28 x 17
07/24/2009 02:43:00 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:435] [Map 6] ausnz.conf: ProcessString: Found appropriate item: WeatherMapNode node08624
07/24/2009 02:43:00 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:454] [Map 6] ausnz.conf: ProcessString: used note
07/24/2009 02:43:00 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:468] [Map 6] ausnz.conf: ProcessString: replacing {node:this:state} with down
goulin
Posts: 7
Joined: Thu Jul 16, 2009 8:27 pm

Post by goulin »

I noticed something else in the debugs, not sure if it is relevant or not:
(WeatherMapPostProcessorTest Not Enabled)

07/24/2009 02:42:58 PM - WEATHERMAP: Poller[0] DEBUG: [DrawMap@Weathermap.class.php:2308] [Map 6] ausnz.conf: Running Post-Processing Plugins...
07/24/2009 02:42:59 PM - WEATHERMAP: Poller[0] DEBUG: [DrawMap@Weathermap.class.php:2311] [Map 6] ausnz.conf: Running WeatherMapPostProcessorTest->run()
07/24/2009 02:42:59 PM - WEATHERMAP: Poller[0] DEBUG: [run@WeatherMapPostProcessorTest.php:26] [Map 6] ausnz.conf: WeatherMapPostProcessorTest Not Enabled
07/24/2009 02:42:59 PM - WEATHERMAP: Poller[0] DEBUG: [DrawMap@Weathermap.class.php:2316] [Map 6] ausnz.conf: Finished Post-Processing Plugins...
07/24/2009 02:42:59 PM - WEATHERMAP: Poller[0] DEBUG: [DrawMap@Weathermap.class.php:2318] [Map 6] ausnz.conf:

Also, I am getting this error, which I am not sure if it is related either:

07/24/2009 02:43:00 PM - WEATHERMAP: Poller[0] DEBUG: [Draw@WeatherMapLink.class.php:268] [Map 6] ausnz.conf: Outline colour is NOT none for Site1-Site2 Array

This is occuring directly after the cactihost check:

07/24/2009 02:43:00 PM - WEATHERMAP: Poller[0] DEBUG: [ProcessString@Weathermap.class.php:468] [Map 6] ausnz.conf: ProcessString: replacing {node:this:state} with down
07/24/2009 02:43:00 PM - WEATHERMAP: Poller[0] DEBUG: [pre_render@WeatherMapNode.class.php:364] [Map 6] ausnz.conf: Skipping unavailable imagefilter() call.
07/24/2009 02:43:00 PM - WEATHERMAP: Poller[0] DEBUG: [pre_render@WeatherMapNode.class.php:367] [Map 6] ausnz.conf: If this is the last thing in your logs, you probably have a buggy GD library. Get > 2.0.33 or use PHP builtin.
07/24/2009 02:43:00 PM - WEATHERMAP: Poller[0] DEBUG: [Draw@WeatherMapLink.class.php:268] [Map 6] ausnz.conf: Outline colour is NOT none for Site1-Site2 Array
goulin
Posts: 7
Joined: Thu Jul 16, 2009 8:27 pm

Post by goulin »

Grrr.... it actually does work! My problem was that the 'Weathermap' page that I was looking at was not the Weathermap page that Cacti generates. One of our Unix guys has written a cron job that takes the Weathermap page the Cacti generates and creates his own, and that is the Weathermap page we use. When I look at the Weathermap page from Cacti, the host monitoring does work.

Thanks for your help,
goulin
HuaweiVSCisco
Posts: 29
Joined: Mon Jun 16, 2014 8:58 am

Re: host monitoring?

Post by HuaweiVSCisco »

Me too I'm having trouble with this :

NODE Mikrotik
LABEL Mikrotik
LABELOFFSET N
LABELFONT 3
LABELOUTLINECOLOR none
LABELBGCOLOR none
INFOURL /cacti/graph.php?rra_id=all&local_graph_id=40
OVERLIBGRAPH /cacti/graph_image.php?rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300&local_graph_id=40
ICON 100 100 images/updown_{node:this:state}.png
TARGET gauge:/var/lib/cacti/rra/mikrotik_traffic_in_12.rrd
USESCALE DEFAULT out percent
POSITION 760 270
I have three images up down and recovery
I read the thread but couldn't understand how to fix the problem....Im using php5 and not even the green icon is showing it was showing before though.... when I unplug the router's incoming internet cable ..the green face icon goes away instead of becoming red/ used to go away now there is nothing.....
HuaweiVSCisco
Posts: 29
Joined: Mon Jun 16, 2014 8:58 am

Re: host monitoring?

Post by HuaweiVSCisco »

I tried using the whole link directory it doesn't work:

ICON /usr/share/cacti/site/plugins/weathermap/images/updown_{node:this:state}.png
HuaweiVSCisco
Posts: 29
Joined: Mon Jun 16, 2014 8:58 am

Re: host monitoring?

Post by HuaweiVSCisco »

USESCALE DEFAULT out percent

USESCALE non in percent

i played with these two commands and now its working , I believe that as long as cacti uses the usescale command you won't get a change in the picture even the first picture to be output. Correct me if I'm wrong. Here is cacti log I got after I used "USESCALE non in percent"


06/27/2014 04:35:02 AM - WEATHERMAP: Poller[0] STATS: Weathermap 0.97c run complete - Fri, 27 Jun 14 04:35:02 -0400: 1 maps were run in 0 seconds with 3 warnings.
06/27/2014 04:35:02 AM - WEATHERMAP: Poller[0] [Map 2] kkkkk.conf: Wrote map to /usr/share/cacti/site/plugins/weathermap/output/cd4ac1632d185c2c862a.png and /usr/share/cacti/site/plugins/weathermap/output/cd4ac1632d185c2c862a.thumb.png
06/27/2014 04:35:02 AM - WEATHERMAP: Poller[0] WARNING: [Map 2] kkkkk.conf: ICON 'images/updown_recovering.png' does not exist, or is not readable. Check path and permissions. [WMARN38]
06/27/2014 04:35:02 AM - WEATHERMAP: Poller[0] WARNING: [Map 2] kkkkk.conf: ICON 'images/updown_recovering.png' does not exist, or is not readable. Check path and permissions. [WMARN38]
"f: ICON 'images/updown_recovering.png' does not exist, "

of course this message shows that I didn't give permission to the file but I didn't get this message before. So i changed the permissions and it was all good. hope this helps.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: host monitoring?

Post by Howie »

You are wrong :-)

The reason you don't get a changing icon is that the node doesn't have a 'state' variable defined.

So back to basics:

What data is in mikrotik_traffic_in_12.rrd? If it is a normal Cacti interface traffic graph, then there is no interface state information in there.
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!)
HuaweiVSCisco
Posts: 29
Joined: Mon Jun 16, 2014 8:58 am

Re: host monitoring?

Post by HuaweiVSCisco »

Howie wrote:You are wrong :-)

The reason you don't get a changing icon is that the node doesn't have a 'state' variable defined.

So back to basics:

What data is in mikrotik_traffic_in_12.rrd? .
hmph I read that the CDP's are stored in the rra and also when I'm on my graph management interface I find that there is "traffic_in" and "traffic_out) the inbound and outbound data sources that are to be used in graph.

am I right to say that traffic_in and traffic_out are the PDP ?
and when I open the rra template it shows average, min and max
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests