network map

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

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

Post by Howie »

TFC wrote:I installed perl
I installed rrdtool like
./configure --prefix=/usr/local/rrdtool
then i searched RRD.pm, i found in source directory.
I copied it to /usr/local/rrdtool/lib directory.
Then I tried to run werahermap4rrd
But i still get same message.
But what is at the top of the script? The whole point is that the RRDs.pm (with the s) must be in either a standard perl module directory, or in the directory mentioned in 'use lib' at the top of the script, if there is one. That's what the error is complaining about. If that's where you put the file, then

Code: Select all

use lib qw (/usr/local/rrdtool/lib);
at the top of the script (just after the #! line) should help.
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
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

The beginning of the script like this:

Code: Select all

[root@PIONEER weathermap]# more weathermap
#!/usr/bin/perl
# Weathermap4rrd 
# Alexandre Fontelle, <afontelle AT free.fr>
# http://weathermap4rrd.tropicalex.net
# based on Network Wearthermap - version 1.1.1 from Panagiotis Christias (http:/
/netmon.grnet.gr/weathermap/)
# modified for RRDTool use and other stuff

$VERSION = "1.2RC3";

use Getopt::Long;
use GD;
use RRDs;
use POSIX;
use lib qw (/usr/local/rrdtool/lib);

################################################################
#
# Configuration parameters
#
$CONFIG = "weathermap.conf";    # Default value if nothing is specified in confi
g file
$OUTPUTFILE = "weathermap.png"; # Default value if nothing is specified in confi
g file
$DEBUG  = 0;
$WIDTH  = 740; # Default value if nothing is specified in config file
$HEIGHT = 600;  # Default value if nothing is specified in config file
$DATE   = "now";
$FONT   = gdLargeFont;
$RRDTOOL_PATH = "/usr/local/rrdtool/bin/";
################################################################
I tried make clean, make uninstall then I intall again rrdtool as:
./configure --prefix=/usr/local/rrdtool --enable-shared=RRDs.pm
After that i use make command like this:
make site-perl-install
In this section I read some errors like this:
../src/config_aux.h:80:2: error: #error "Can't compile without finite function"
../src/config_aux.h:84:2: error: #error "Can't compile without isinf function"
make[3]: *** [RRDs.o] Error 1
make[3]: Leaving directory `/root/CACTI/Backend_Tools/rrdtool/rrdtool-1.0.49/perl-shared'
make[2]: *** [perl_shared] Error 2
make[2]: Leaving directory `/root/CACTI/Backend_Tools/rrdtool/rrdtool-1.0.49'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/CACTI/Backend_Tools/rrdtool/rrdtool-1.0.49'
make: *** [all] Error 2
After that I go to perl-shared directory intothe rrdtool source directory
I Use that command:
perl Makefile.PL
make test
I see an error again:
../src/config_aux.h:80:2: error: #error "Can't compile without finite function"
../src/config_aux.h:84:2: error: #error "Can't compile without isinf function"
make: *** [RRDs.o] Error 1
As a result I think I can't compile rrdtool correctly.
How can fix these problems?
User avatar
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

weathermap4rrd wrote:what a pity ! Weathermap4rrd is great ! ;-)

Seriously you're right Howie's tool is good too. I just confirmed that Weathermap4rrd support corner arrows.

bye

Alex
I try to use your weathermap.
But I get some error like this:
Warning: imagepng() [function.imagepng]: Unable to open '/var/www/htdocs/weathermap4rrd-php-1.2rc6/weathermap.png' for writing in /www/htdocs/weathermap/w4rrd.php on line 1105
WeatherMap4RRD 1.2RC8 : An error occured : HTMLFILE directive is not correctly defined in configuration.
Then I correct oUTPUTFILE weathermap.conf :
OUTPUTFILE /www/htdocs/weathermap/weathermap.png
Then I write down the addres http://10.200.24.40/weathermap/index.php
I see that error:
WeatherMap4RRD 1.2RC8 : An error occured : HTMLFILE directive is not correctly defined in configuration.
Then I add the line:
HTMLFILE /www/htdocs/weathermap/map.html
Again i try the address http://10.200.24.40/weathermap/index.php
Now: I get the error:
WeatherMap4RRD 1.2RC8 : An error occured : Le fichier /www/htdocs/weathermap/map.html n'est pas accessible en écriture.
Then ,I don't know how, I can see the graph. But it loaded to slow.
After that, I modify the weathermap.conf for LINKOVERLIBGRAPH, HTMLFILE (as /www/htdocs/weathermap/map.htm) and LINKINFOURL directives. When I fill these directives I go to browser and I see that a red cross.
Here is the My configurations:

Code: Select all

# Define path and name of a png file on server. You may comment this line if you don't want to keep a file of graph.
OUTPUTFILE /www/htdocs/weathermap/weathermap.png
HTMLFILE /www/htdocs/weathermap/map.htm
...
...
...
NODE bastille2
        POSITION 136 387
                IP 192.168.23.7
                CHECK tcp 80
       LABEL Bastille2
                ICON icons/router_cisco.png 
                ICONRESIZE 75

NODE k7
        POSITION 478 385
                IP 192.168.23.8
                CHECK ping
        LABEL K7
                ICON icons/terminal.png 
                ICONTPT 50
                NODEINFOURL     toto
                NODEOVERLIBGRAPH toto2
...
...
...
LINK k7-bastille2
                NODES   bastille2 k7 
                TARGETOUT /www/htdocs/cacti/rra/m_2d_7507_traffic_in_10.rrd
                TARGETIN /www/htdocs/cacti/rra/localhost_proc_7.rrd
        LINKOVERLIBGRAPH http://10.200.24.240/cacti/graph_image.php?local_graph_id=7&rra_id=1&graph_nolegend=true&graph_height=120&g
raph_width=300
        LINKINFOURL htp://10.200.24.240/cacti/graph_php&local_graph_id=7&rra_id=all
                INPOS   1
                OUTPOS  2
                UNIT    bits
                BANDWIDTH       155
                DISPLAYVALUE    1
                ARROW   circle
The I turn the brovser and click the "if you don't see any map, please click here to see error message. "
Here is the message:

What is the problem?
Warning: fopen(http://10.200.24.240/weathermap/http:// ... ermap.conf) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /www/htdocs/weathermap/graphic.php on line 168

Warning: fread(): supplied argument is not a valid stream resource in /www/htdocs/weathermap/graphic.php on line 169

Warning: fclose(): supplied argument is not a valid stream resource in /www/htdocs/weathermap/graphic.php on line 170

Warning: fopen(http://10.200.24.240/weathermap/http:// ... ermap.conf) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /www/htdocs/weathermap/graphic.php on line 168

Warning: fread(): supplied argument is not a valid stream resource in /www/htdocs/weathermap/graphic.php on line 169

Warning: fclose(): supplied argument is not a valid stream resource in /www/htdocs/weathermap/graphic.php on line 170

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/weathermap/graphic.php:168) in /www/htdocs/weathermap/w4rrd.php on line 1134

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/weathermap/graphic.php:168) in /www/htdocs/weathermap/w4rrd.php on line 1136

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/weathermap/graphic.php:168) in /www/htdocs/weathermap/w4rrd.php on line 1137

Warning: Cannot modify header information - headers already sent by (output started at /www/htdocs/weathermap/graphic.php:168) in /www/htdocs/weathermap/w4rrd.php on line 1139
‰PNG IHDRì\•4»KPLTEÿÿÿÿÿÿÿ€€€øøøÜÒ<ÿŒÿ ÿÀÿğğğÿÀÿdÿŒË÷šŞyµ¤¤˜æåÚ½¼¬ÚÚÍÇŸ™µ »IDATxœíİ wÚ8€QfNÎ¾ÛÍt÷ÿÿÒmÀI–ß&`몙–Œc'_ar»\J¨Ë«?ܼR]
....
...
What's wrong with me?
mgb
Cacti User
Posts: 124
Joined: Mon Jun 21, 2004 4:06 am
Location: North of the Netherlands

Node Status in weathermap

Post by mgb »

Hello Howie,

Is it possible to expand the weathermap with the monitor functionality? I mean, It would be great if the status of a node reflects on the weathermap. If the node is down a red icon, else a green icon. If you look at the whatsup program from ipswitch you will know what i mean.

Michael
User avatar
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

Hi Howie,
When your program can support multiple link between two nodes?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Node Status in weathermap

Post by Howie »

mgb wrote:Hello Howie,

Is it possible to expand the weathermap with the monitor functionality? I mean, It would be great if the status of a node reflects on the weathermap. If the node is down a red icon, else a green icon. If you look at the whatsup program from ipswitch you will know what i mean.

Michael
Hehe. Funny you should mention that. We use Whats Up at work, and I don't really like it much. I have been thinking about adding the WUG map interface to something like mon, which has quite a nice monitoring engine already, but a horrible config and UI.

Providing this kind of interface to whatsup in particular isn't too hard - we have some stuff internally that does similar things. The main problem with adding it to weathermap would be that everyone's expectation is very different - much more than with bandwidth monitoring, I think. Maybe a plugin would be the way to go.

Within weathermap, I suppose you'd just add a TARGET for NODEs as well as links, and define some extra PNG files, if you are using ICONs.

So the answer is - yes, it would be possible, but not a 5 minute change :-)[/url]
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 »

TFC wrote:Hi Howie,
When your program can support multiple link between two nodes?
There's nothing to stop you doing this right now. Simply make some intermediate nodes with no LABEL or ICON, and make the links in two halves.

Like this:

Code: Select all

# Node definitions:
NODE node1129281440
	POSITION 200 358
	LABEL Site 1

NODE node1129281442
	POSITION 480 169
	LABEL Site 2

NODE node1129281445
	POSITION 265 188
	LABEL 

NODE node1129281448
	POSITION 403 322
	LABEL 

LINK node1129281445-node1129281442
	NODES node1129281445 node1129281442
	BANDWIDTH 10240

LINK node1129281445-node1129281440
	NODES node1129281445 node1129281440
	BANDWIDTH 10240

LINK node1129281448-node1129281440
	NODES node1129281448 node1129281440
	BANDWIDTH 10240

LINK node1129281448-node1129281442
	NODES node1129281448 node1129281442
	BANDWIDTH 10240
Attachments
Simple work-around for multiple links between sites.
Simple work-around for multiple links between sites.
2-links.png (2.17 KiB) Viewed 15110 times
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!)
mgb
Cacti User
Posts: 124
Joined: Mon Jun 21, 2004 4:06 am
Location: North of the Netherlands

Post by mgb »

Hi Howie,

I never said it would be easy :lol: just a nice thing to have.

b.t.w. Isn't is possible to team up with the write of weathermap4rrd. I think you are sharing the same goals. I saw on his site that he is looking for developers. Might be an idea to team up :)

If this idea is completly insane, :oops: forget that i mentioned it.

Just a thought though.

Regarding the editor.
Works great. I've already used it to help me create a few maps. Have you been able to add extra functionality?

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

Post by Howie »

mgb wrote:Hi Howie,

I never said it would be easy :lol: just a nice thing to have.

b.t.w. Isn't is possible to team up with the write of weathermap4rrd. I think you are sharing the same goals. I saw on his site that he is looking for developers. Might be an idea to team up :)

If this idea is completly insane, :oops: forget that i mentioned it.

Just a thought though.

Regarding the editor.
Works great. I've already used it to help me create a few maps. Have you been able to add extra functionality?

Michael
Alex spoke to me on IM a couple of weeks ago about it. At the moment, I haven't decided what I want to do once the editor is done. I might just call that version 1.0 and leave it. It'd be nice to have time to learn to play my guitar :-)

I'll be adding the 'click on timestamp' before 0.7. The other missing pieces - colour editing, and image management - will be in a future (0.8) release.
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
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

Howie,
We try to instal your php-weathermap-0.6.zip,
I change the weathermap file for correct executable php and rrdtool.
Then I run that command :
./weathermap
But I get that Error:
Warning: fopen(weathermap.conf): failed to open stream: No such file or directory in /www/htdocs/map/Weathermap.class.php on line 748
Couldn't open config file weathermap.conf for reading
My cacti dir is: /www/htdocs/cacti
My weathermap dir is : /www/htdocs/map
What's wrong?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

TFC wrote: But I get that Error:
Warning: fopen(weathermap.conf): failed to open stream: No such file or directory in /www/htdocs/map/Weathermap.class.php on line 748
Couldn't open config file weathermap.conf for reading
Is there a file called weathermap.conf in the directory where weathermap is?

If your config file is called something else, then you'll need to use the --config option to specify the filename.
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
TFC
Cacti Pro User
Posts: 739
Joined: Wed Apr 09, 2003 2:17 am
Location: Izmir/Turkey

Post by TFC »

Oh yes, I forgot to copy example.conf as weathermap.conf
Thanks
kslt
Cacti User
Posts: 85
Joined: Tue Aug 02, 2005 4:12 am

Post by kslt »

hello to all

i'm using 1.1.1hj3 and everythink is ok, exept one thing:
when i'm adding an background as png i recive this error :
Can't locate object method "newFromPng" via package "GD::Image" at ./weathermap line 56, <CONF> line 71.
and there is the code:
54 if($background){
55 open (PNG,"$background") || die "$background: $!\n";
56 $map = newFromPng GD::Image(PNG) || die "newFromPng failed.";
57 close PNG;
58 } else {
59 $map=new GD::Image($WIDTH,$HEIGHT)
60 }
....
....

sictc
Posts: 6
Joined: Mon Nov 07, 2005 4:56 am

Post by sictc »

I posted this question in another thread (may be deleted) but its better to place it here...

I use (I hope only temporary until I can fix my linux box) the win32 weathermap. I works but personaly, I want to see the peaks and spikes as well. Now it takes the 'CUIN d' from the HTML files, but I want to have the 'maxin d' values... Since its a packed win32 file, I can not edit it myself :(
jpasquie
Posts: 6
Joined: Thu Aug 11, 2005 9:45 am
Location: France

Weathermap background issue

Post by jpasquie »

Hi all,
I am using Howie's PHP Weathermap 0.6 and I have a problem with background image. The script only work with greyscale image, if I use a 256 or more colors image the result is bogus (yellow blocks for nodes and arrows).
Have you already seen this problem?
regards,
julien
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests