Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Fri Apr 28, 2017 5:18 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 49 posts ]  Go to page Previous  1, 2, 3, 4  Next
Author Message
 Post subject:
PostPosted: Fri Oct 31, 2008 3:24 am 
Offline

Joined: Thu Feb 14, 2008 2:35 am
Posts: 7
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??


Top
 Profile  
 
 Post subject: Re: host monitoring?
PostPosted: Fri Oct 31, 2008 4:08 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5091
Location: United Kingdom
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 16, 2009 8:34 pm 
Offline

Joined: Thu Jul 16, 2009 8:27 pm
Posts: 7
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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 17, 2009 2:28 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5091
Location: United Kingdom
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jul 19, 2009 11:16 pm 
Offline

Joined: Thu Jul 16, 2009 8:27 pm
Posts: 7
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


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 20, 2009 12:42 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5091
Location: United Kingdom
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jul 20, 2009 12:56 am 
Offline

Joined: Thu Jul 16, 2009 8:27 pm
Posts: 7
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 23, 2009 11:48 pm 
Offline

Joined: Thu Jul 16, 2009 8:27 pm
Posts: 7
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


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 24, 2009 12:05 am 
Offline

Joined: Thu Jul 16, 2009 8:27 pm
Posts: 7
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


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 29, 2009 5:56 pm 
Offline

Joined: Thu Jul 16, 2009 8:27 pm
Posts: 7
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


Top
 Profile  
 
 Post subject: Re: host monitoring?
PostPosted: Thu Jun 26, 2014 7:35 am 
Offline

Joined: Mon Jun 16, 2014 8:58 am
Posts: 29
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.....


Top
 Profile  
 
 Post subject: Re: host monitoring?
PostPosted: Fri Jun 27, 2014 12:22 am 
Offline

Joined: Mon Jun 16, 2014 8:58 am
Posts: 29
I tried using the whole link directory it doesn't work:

ICON /usr/share/cacti/site/plugins/weathermap/images/updown_{node:this:state}.png


Top
 Profile  
 
 Post subject: Re: host monitoring?
PostPosted: Fri Jun 27, 2014 3:42 am 
Offline

Joined: Mon Jun 16, 2014 8:58 am
Posts: 29
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.


Top
 Profile  
 
 Post subject: Re: host monitoring?
PostPosted: Fri Jun 27, 2014 4:22 am 
Offline
Cacti Guru User
User avatar

Joined: Thu Sep 16, 2004 5:53 am
Posts: 5091
Location: United Kingdom
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.98 is out! & QuickTree 0.2. Superlinks is over there now.
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!)


Top
 Profile  
 
 Post subject: Re: host monitoring?
PostPosted: Fri Jun 27, 2014 5:13 am 
Offline

Joined: Mon Jun 16, 2014 8:58 am
Posts: 29
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 49 posts ]  Go to page Previous  1, 2, 3, 4  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group