PHP Network Weathermap 0.8 (now 0.9)

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
User avatar
ScOp3
Cacti User
Posts: 61
Joined: Wed Aug 03, 2005 4:14 am
Location: Cologne Germany
Contact:

Post by ScOp3 »

Howie i am having some issues with getting the "OVERLIBGRAPH" working.

My config regarding the link where i want the overlib pic to be looks like this.

Code: Select all

LINK node1144164553-node1144310979
	INFOURL Http://<hostename>/cacti/graph.php?action=zoom&local_graph_id=355&rra_id=1&view_type=
	OVERLIBGRAPH http://<hostename>/cacti/graph_image.php?local_graph_id=355&rra_id=0&graph_nolegend=true&graph_height=100&graph_width=300
	TARGET /srv/www/htdocs/cacti/rra/cisco_450701_traffic_in_359.rrd
	NODES node1144164553 node1144310979
But actually nothing shows up. Clear case of DUH?!?!
fear leads to anger, anger leads to hate and dancing leads to sex!
lorcs
Posts: 14
Joined: Thu Oct 20, 2005 2:27 am

Re: Problem with Weathermap 0.5

Post by lorcs »

Howie wrote:
lorcs wrote:Here is the log from cacti.log

04/10/2006 03:09:57 AM - SYSTEM STATS: Time:293.1732 Method:cactid Processes:1 Threads:20 Hosts:9 HostsPerProcess:9 DataSources:70 RRDsProcessed:3
04/10/2006 03:09:57 AM - WEATHERMAP: Poller[0] Weathermap 0.8 in da house
04/10/2006 03:09:57 AM - WEATHERMAP: Poller[0] Map: /var/www/html/cacti/plugins/weathermap/configs//test.conf -> /var/www/html/cacti/plugins/weathermap/output//weathermap_8.html & /var/www/html/cacti/plugins/weathermap/output//weathermap_8.png
04/10/2006 03:09:58 AM - WEATHERMAP: Poller[0] Weathermap 0.8 in da house
04/10/2006 03:09:58 AM - WEATHERMAP: Poller[0] Map: /var/www/html/cacti/plugins/weathermap/configs//test.conf -> /var/www/html/cacti/plugins/weathermap/output//weathermap_8.html & /var/www/html/cacti/plugins/weathermap/output//weathermap_8.png
This is a strange log!

First, I think you have a problem with cactid - it should run for so long with only 90 hosts. I suggest you disable weathermap and see what is going on with cactid first. 293 seconds is the maximum time it can run for before the next poller cycle. Usually that is a fault.

Second, you seem to be running weathermap twice! Is it possible that you have the $plugins[] = 'weathermap' in two places in your config?

Third, neither of the weathermaps is finishing correctly. Normally there would be a line saying ' Weathermap has left the building' as the last thing it writes to the log. I think that if you had DEBUG on, you would see more there, including a line like 'If this is the last you see, you need to increase your memory_limit in php.ini'. Turn on DEBUG to verify that, but my guess at the moment is to increase memory_limit to something like 32M in php.ini, and restart apache.

With your command line problem... when you don't have an --output line, the weathermap command line program produces a PNG called weathermap.png and no HTML, by default.
Howie,

You are right that my php.ini is out of memory and when I change to 64M, the weathermap successfully generate two png files.

As for the weathermap processes running twice within same polling cycle, it is actually caused by the Cactid timeout issue (exceeding 292s), as a result, the program forks two poller processes and two weathermap prcoesses.

I am still working hard to fix the Cactid timeout problem but thanks for your help.


Raymond Lo
klr0514
Posts: 27
Joined: Tue Apr 04, 2006 8:19 am
Contact:

weathermap as a plugin

Post by klr0514 »

I unpacked the tar file in the plugins directory, added 'weathermap' to the plugins, but I still don't see a tab or the permissions under user management for weathermap. When I attempt to run weathermap from a command line, I get an error stating
"Can't locate Number/Format.pm in @INC (@INC contains....)
BEGIN failed--compilation aborted...

Any ideas? Perl is in the path and working fine 5.8.8)
This is a Fedora core 5 system.
User avatar
pshankland
Cacti User
Posts: 247
Joined: Fri Dec 31, 2004 7:07 am
Location: UK

Post by pshankland »

Where do you save images that you wish to use as a background? I have created a PNG file and currently have it saved in <cacti_install>/plugins/weathermap/images/ but when I use the editor, and click on Map Properties, no backgrounds are available.

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

Re: weathermap as a plugin

Post by Howie »

klr0514 wrote:I unpacked the tar file in the plugins directory, added 'weathermap' to the plugins, but I still don't see a tab or the permissions under user management for weathermap. When I attempt to run weathermap from a command line, I get an error stating
"Can't locate Number/Format.pm in @INC (@INC contains....)
BEGIN failed--compilation aborted...

Any ideas? Perl is in the path and working fine 5.8.8)
This is a Fedora core 5 system.
1. It's actually a zip, not a tar
2. You seem to have got some perl from somewhere!!! :o

There is a perl version, but it's really old now, and will never be updated. If you want to use the Cacti plugin, or any of the nice features, you need php-weathermap-0.8 from the link in my sig.
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:

Post by Howie »

pshankland wrote:Where do you save images that you wish to use as a background? I have created a PNG file and currently have it saved in <cacti_install>/plugins/weathermap/images/ but when I use the editor, and click on Map Properties, no backgrounds are available.
The editor does not do images. The editor does not do images.

You need to edit the configuration file and add a BACKGROUND line, like:

Code: Select all

BACKGROUND images/yourfile.png
Some day, the editor will do everything that everyone wants, and there will be no need to edit config files by hand, but that day is not today, or even this month. :-?
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
pshankland
Cacti User
Posts: 247
Joined: Fri Dec 31, 2004 7:07 am
Location: UK

Post by pshankland »

The editor does not do images. The editor does not do images.
OK. It obviously threw me as you seem to have added the ability to add background images through the editor which is why I posted here.

Pete.
Last edited by pshankland on Mon Apr 10, 2006 3:02 pm, edited 1 time in total.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

pshankland wrote:
The editor does not do images. The editor does not do images.
OK. It obviously threw me as you seem to have added the ability to add background images through the editor which is why I posted here.

Pete.
The editor isn't finished. The intention is that you would go to Manage Images, and use that to upload images which are then pickable in the ICON and BACKGROUND bits. I didn't want to work through all the security implications of file upload, so as a result, it's not there yet.

Actually, I'll try and get the pick-list part going for the next (0.81) release, so you can pick images you uploaded another way into the images folder. The next major release will have a whole new editor (again), but it'll probably work in a similar way for images.

Sorry for the attitude earlier - having a bad day today. :roll:
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!)
klr0514
Posts: 27
Joined: Tue Apr 04, 2006 8:19 am
Contact:

Re: weathermap as a plugin

Post by klr0514 »

Howie wrote:
klr0514 wrote:I unpacked the tar file in the plugins directory, added 'weathermap' to the plugins, but I still don't see a tab or the permissions under user management for weathermap. When I attempt to run weathermap from a command line, I get an error stating
"Can't locate Number/Format.pm in @INC (@INC contains....)
BEGIN failed--compilation aborted...

Any ideas? Perl is in the path and working fine 5.8.8)
This is a Fedora core 5 system.
1. It's actually a zip, not a tar
2. You seem to have got some perl from somewhere!!! :o

There is a perl version, but it's really old now, and will never be updated. If you want to use the Cacti plugin, or any of the nice features, you need php-weathermap-0.8 from the link in my sig.
Okay, that worked... I assumed .zip was windows... Back to configuring the maps and such... Thanks!
klr0514
Posts: 27
Joined: Tue Apr 04, 2006 8:19 am
Contact:

errors in editor

Post by klr0514 »

when I am going through the editor, I get this message:
Undefined index: map_linkdefaultbwout in /www/htdocs/cacti/plugins/weathermap/editor.php on line 177

Also, I cannot define background images or html/png output through the editor...

I did vi the editor-config.php file and add the background image.

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

Post by Howie »

ScOp3 wrote:
But actually nothing shows up. Clear case of DUH?!?!
Assuming that the image actually exists (try pasting that into a browser), then my guess is that you need 'HTMLSTYLE overlib' at the top of the config file. This isn't the default.
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
ScOp3
Cacti User
Posts: 61
Joined: Wed Aug 03, 2005 4:14 am
Location: Cologne Germany
Contact:

Post by ScOp3 »

Howie wrote:then my guess is that you need 'HTMLSTYLE overlib' at the top of the config file. This isn't the default.
Yup you're guess was a perfect hit. Now it works as designed. :)
fear leads to anger, anger leads to hate and dancing leads to sex!
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

Hey, how about a "cycle" option for the weathermaps we create?

Could just be an option added to the current "cycle" plugin that uses weathermaps instead of graphs (which make more sense anyway).
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

knobdy wrote:Hey, how about a "cycle" option for the weathermaps we create?

Could just be an option added to the current "cycle" plugin that uses weathermaps instead of graphs (which make more sense anyway).
I was planning to add it as a third 'view mode'. To add it to the Cycle plugin would need the co-operation of whomever the Cycle maintainer is (I don't recall who it is). It would be simple enough to add some hooks into weathermap so that other things can extract the list of maps, and URIs to display them. I want to write a screensaver to do a similar thing and float the results around on my screen, when I have masses of spare time. :-)

My own wish along these lines is that someday Cacti will deal with 'Display Objects' instead of graphs, so that maps and other data can appear in Trees and wherever else graphs appear today. I'd like to be able to make Graph Trees with diagrams, weathermaps and HTML chunks (like explanation) in them, so that a graph tree could be a 'living specification' for a customer.
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!)
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

Howie wrote:I was planning to add it as a third 'view mode'.
That would be excellent - how long?! :)
Howie wrote:My own wish along these lines is that someday Cacti will deal with 'Display Objects' instead of graphs, so that maps and other data can appear in Trees and wherever else graphs appear today.
Yes I think, if I understand what you are saying correctly, we share the same dream. It would increase the flexibility and usefulness of Cacti a 100 fold!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests