network map

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

Moderators: Developers, Moderators

Post Reply
rik
Posts: 38
Joined: Mon Nov 22, 2004 5:15 am
Location: Zuerich; Switzerland
Contact:

Post by rik »

thank you for your answer

i had already tried with the direct TARGET to a rrd but it doesn't work

do i have to modify howie's weatherscript like following to get it work?

Code: Select all

use lib qw(/usr/local/rrdtool-1.0.49/lib/perl);
thx :-)
rik
Posts: 38
Joined: Mon Nov 22, 2004 5:15 am
Location: Zuerich; Switzerland
Contact:

fixed it :-)

Post by rik »

hi,,

i have got it out..

here are my steps:

i checked that my rrdtool had the perl libs.

then i changed the scripts like following (on my freebsd):

weathermap:

Code: Select all

use lib qw(/usr/local/lib/perl5/site_perl/5.6.1/mach);
weathermap.conf:

Code: Select all

REVERSEDIRECTION 1
this made it to work.. i hope it helps someone.
rik
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Hi folks, here's a quick tool I wrote up this afternoon to save an afternoon of tedious work - an hour spent coding beats an hour doing mechanical work :-)

It takes in a weathermap.conf file (specify the name as a command-line argument), and spits out a filename.new with OVERLIBGRAPH and INFOURL directives added for any LINKs that don't have one. It does this by looking up the information in your Cacti database. You'll need to make sure that the rrd files are correct FIRST, as it doesn't do any error checking at all. It only works with rrd-file TARGETs, too. Worst case is that it doesn't do anything, so there isn't too much to worry about.

Related handy tip: to strip out all the OVERLIBGRAPH and INFOURL lines in a Unix shell, do:

Code: Select all

grep -v OVERLIBGRAPH weathermap.conf | grep -v INFOURL > weathermap-clean.conf
You will need to edit the very top of the script to make it work. It needs some read-only mysql login details, and the URL for the base of your Cacti install (to generate URLs).

I'll put a copy up on my weathermap-related page later tonight, too.
Attachments
auto-overlib.pl.txt
the automatic OVERLIB script, version 1.0
(4.21 KiB) Downloaded 300 times
yliad
Posts: 3
Joined: Wed Mar 16, 2005 8:19 am

Post by yliad »

Hello,

stupid question, i know, but where do i find the best maps (world or country) for creating network weathermaps :roll:
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

yliad wrote:stupid question, i know, but where do i find the best maps (world or country) for creating network weathermaps :roll:
Google Images :-)

Another good source used to be Corel Draw, if you have an old version - it came with tons of clipart including many many maps.

Actually, I've found it's hard enough to lay out my network so that you can see all the parts on the page anyway, without having to tie yourself to a background geographical map as well. YMMV, obviously.
netana
Posts: 20
Joined: Wed Feb 16, 2005 6:36 am

Post by netana »

I would like to use the wheatermap. It is a great tool but I until now I had some problems to setup it.
- I downloaded the weathermap-1.1.1hj3.zip and weathermap-1.1.1hj3.exe. I read this is recommended for Windows.
- Extracted into c:\apache2\..\cacti\wheatermap.
- I generated html-files (cacti2weathermap.pl).
- But then I am not sure what I have/had to do. In the generated html files I can find for example the line (core_router_ie_2_41.rrd).
- I believe then I have to generate the weathermap.conf. I did it
- Then I tried to run the weathermap-1.1.1hj3.exe
The result is that the wathermap.png is generated and I got this error message:
Can't use an undefined value as a symbol reference at C:/Perl/site/lib/GD.pm line 175, <CONF> line 97.

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

Post by Howie »

netana wrote: Can't use an undefined value as a symbol reference at C:/Perl/site/lib/GD.pm line 175, <CONF> line 97.
If you specify a BACKGROUND image in the weathermap.conf, and it doesn't exist, or isn't a valid PNG file, I think you get this message.

Try removing that line.

Also, if you are running cacti on the same windows machine, you don't need cacti2weathermap. Just use the path to the rrd file as the TARGET directly:

TARGET rra/router1if2.rrd

You can find out which RRD file to use by looking in the Data Sources section of Cacti, and noting the name in there (it looks like <rra-path>/something.rrd).
netana
Posts: 20
Joined: Wed Feb 16, 2005 6:36 am

Post by netana »

Many thanks Howie.
Netana
mgb
Cacti User
Posts: 124
Joined: Mon Jun 21, 2004 4:06 am
Location: North of the Netherlands

Another weathermap

Post by mgb »

Hello

When I was searching for some more info regarding weathermap I found the following weathermap.

http://netstats.indiana.edu/wanmap/docs/usage.html

The extra's this version has is that you're able to see the amount of errors per link and also a black arrow when the link is down. I couldn't find the software though. The site housing the script does not exist anymore.

@Howie

Great work your scripts. Are you making a PHP version. It would be great if we could add this to cacti itself with a decent user interface.

I've also added the icon part as extra to your source. Could you make that permanent to your code? The ICON part still has some flaws.

Great tool tough.

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

Re: Another weathermap

Post by Howie »

mgb wrote:The extra's this version has is that you're able to see the amount of errors per link and also a black arrow when the link is down. I couldn't find the software though. The site housing the script does not exist anymore.
I found this one too, when I was looking around for something :-) The black 'down' arrow is in 'our' weathermap too - although it's grey. If the throughput is EXACTLY zero (which is only true in practice on a dead link), then it goes grey. As for errors, it wouldn't be too hard, but cacti doesn't measure the error rate without you adding a second data source, at least (there are several error counters). I guess it'd be something like an ERRORTARGET or similar.
mgb wrote: Great work your scripts. Are you making a PHP version. It would be great if we could add this to cacti itself with a decent user interface.

I've also added the icon part as extra to your source. Could you make that permanent to your code? The ICON part still has some flaws.
Michael
Yes, I have a mostly-working PHP version. My intention is to try and make a web-based editor for the maps using imagemaps and the PHP version. I have the next week off, so maybe now is the time to try and make it :-) It'd be great to have it appear like THold does inside cacti, especially if individual maps could be presented in the Graph Tree too.

What ICON part? Was that the thing to replace nodes with images?
mgb
Cacti User
Posts: 124
Joined: Mon Jun 21, 2004 4:06 am
Location: North of the Netherlands

ICONs

Post by mgb »

Hi Howie,

Great you're still working on the PHP version. Would be glad to help you testing. The ICON part was from "jas0420" and I inserted it into your perl script. It doesn't do any error checking so if you do not supply an icon it gives some kind of error. I used Visio to create ICONS. The advantage of using icons is thta you draw the arrows first and then the ICON so the network ICON overlaps the arrows. That way the image looks cooler :wink:
It also makes it possible to create a decent weathermap without any background picture. That way It's even possible to make the weathermap resizable.

The error part should be optional if implemented. You should be able to indicate the RRA inside the RRD to be used. It would add something extra to the map when something like that could be implemented.

Would you're PHP version be implemented inside Cacti like the Threshold addon? I think the weathermap would add a lot of extra weight to cacti and make it even more stand out from the crowd than it does already.

Great Job,
howie

Michael
jamdatadude
Posts: 1
Joined: Tue Mar 22, 2005 4:23 pm
Location: Nashville, TN
Contact:

Adding the Weathermap to your Cacti Install

Post by jamdatadude »

To make the Weathermap display as the default graph page for the header records simple add a section to the graph_view.php file. At line 95 you will see the following:

Code: Select all

print "<br><br>";
In my case I just have one map that I want to display at the tree root. Here is the code I used to do that.

Code: Select all

        if (!isset($_GET["leaf_id"])) {
         print "<IMG SRC=\"weathermap/weathermap.png\" WIDTH=800 HEIGHT=363 BORDER=0>"; }
If you use setup conditionals for each header using its leaf_id as the check you can assign a different default page to each. Note: if you are using multiple trees you need to add that check to the code above as well.
ssams
Cacti User
Posts: 65
Joined: Tue Feb 01, 2005 5:54 pm
Location: Texas
Contact:

Post by ssams »

i am getting the message -

Can't locate loadable object for module RRDs in @INC (@INC contains: /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.4 /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl .) at /www/htdocs/cacti/weathermap/cacti2weathermap.pl line 5
Compilation failed in require at /www/htdocs/cacti/weathermap/cacti2weathermap.pl line 5


can i reinstall RRD with the shared-install option on top of what I have without issues?
pmos
Posts: 3
Joined: Fri Apr 01, 2005 5:51 am
Location: Portugal

Weathermap license

Post by pmos »

http://netmon.grnet.gr/weathermap/ says the code is GPLd.

However, it seems (at first glance) very similar to:
http://tools.globalnoc.iu.edu/wxmap/
http://loadrunner.uits.iu.edu/weathermaps/abilene/
by Mark Meiss, which is not GPLd and has a 1998 copyright by the Trustees of Indiana University.

(also mentioned here btw: http://www.caida.org/projects/interneta ... redits.xml)

Does anyone have any info about this?
(Or did I miss something...)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Weathermap license

Post by Howie »

pmos wrote:http://netmon.grnet.gr/weathermap/ says the code is GPLd.

[...]

Does anyone have any info about this?
(Or did I miss something...)
Did you get source for the Indiana one? or do you mean the output is similar? For what it's worth, I have a PHP port of grnet's (wit some of my additions) which I guess would be 'clean' if it's the code you mean. I didn't bother going through the hoops to get the IU source code, so I don't know about that. When I started looking around for weathermap code originally, I got the impression that the licensing of the IU code is the reason why there are so many different similar ones - no-one wanted to work on the non-GPL version - that's purely my impression, not a fact though!

If it's the output you mean, then I don't think it matters at all. I rather like those 'split' arrows though, personally. :)
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests