PHP Network Weathermap 0.8 (now 0.9)

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
knobdy
Cacti User
Posts: 495
Joined: Wed Sep 28, 2005 1:39 pm

Post by knobdy »

BAD A55!!!!

Okay, so I need to get caught up on this - since I had been putting off doing much with it until you released this plugin version.

If you want to monitor a link, you do it from only one side? For instance, of the 4 connections our building has to other buildings I would select either the cacti graphs for the connections in this building or the other three buildings - correct? In other words, I'm reporting on all of the devices, on both sides of each of these WAN links - but the map will only be showing one side of each? OR, do you create two links to show the in/out of each side...hmm...

Are any of the conf files for the maps you have on your site available for reviewing? Maybe some of the background images you used as well?

Finally, what is the "'Hover' Graph URL" in the editor? Would that be something I would manually put in from Cacti - like the url for that devices tree view?

In the documentation you mention using nodes as anchors for images (dynamic ones even) from elsewhere.... can you go into more detail on that? Not sure I even grasp the idea, but if I do I might have use for it. It was in the context of placing a company logo in the map, that sort of thing.
petero
Posts: 13
Joined: Sun Jul 17, 2005 3:45 pm
Location: Poland

Great WMap

Post by petero »

Howie great job on version 0.8 i have a little nad usefull tip to make possiblity for definig WIDTH of arrow for support 10M.100M,1G link.
Like for Width from 1-10 or so.
I couldnt find it in manual so i guess its a little idea for 0.8.1:)

Once again great plugin/standalone for network admins.

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

Re: Great WMap

Post by Howie »

petero wrote:Howie great job on version 0.8 i have a little nad usefull tip to make possiblity for definig WIDTH of arrow for support 10M.100M,1G link.
Like for Width from 1-10 or so.
I couldnt find it in manual so i guess its a little idea for 0.8.1:)
How do you imagine this would look in the config file? Can you give an example? I guess you mean like the SCALE lines, but I'm curious.

I do this by hand in my own maps, but maybe my network is more boring than other people's. Mostly 100M, 1G ethernet. I don't think it would help me, but I'm happy to be convinced.

There is a 'secret' switch to the command line version that has been there for a few versions now called --bulge, that will dynamically change the width of links based on %age use (from 1 to the actual WIDTH). I was playing with animating maps a while ago. The results are a little strange, so I gave up on it, but the option still exists.
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 »

knobdy wrote: If you want to monitor a link, you do it from only one side? For instance, of the 4 connections our building has to other buildings I would select either the cacti graphs for the connections in this building or the other three buildings - correct? In other words, I'm reporting on all of the devices, on both sides of each of these WAN links - but the map will only be showing one side of each? OR, do you create two links to show the in/out of each side...hmm...
Well, with 0.8, you could take the 'out' data from one rrd and the 'in' from another, but the way it's normally done is to pick the device 'nearest' your cacti (so that it's most likely to be available), and use the interfaces on that one. Make sure to define your link's NODES line as 'router1 router2' if router1 is where you're taking data from, otherwise the in and out will be swapped over.
knobdy wrote: Are any of the conf files for the maps you have on your site available for reviewing? Maybe some of the background images you used as well?
See the docs/example folder for a pretty complete example of most features, and at least a couple of backgrounds. This is the 'demo' map that's in the manual.

As usual, my (and most other people's) live maps tend to contain either business- or customer- sensitive info. Sorry.
knobdy wrote: Finally, what is the "'Hover' Graph URL" in the editor? Would that be something I would manually put in from Cacti - like the url for that devices tree view?
It's the OVERLIBGRAPH config line. If you have the cacti-picker function configured (see the manual, or cacti-pick.php), then the picker will put those lines in for you. It would be the URL for an image (not an image page - it goes into an HTML IMG tag).
knobdy wrote: In the documentation you mention using nodes as anchors for images (dynamic ones even) from elsewhere.... can you go into more detail on that? Not sure I even grasp the idea, but if I do I might have use for it. It was in the context of placing a company logo in the map, that sort of thing.
Well, suppose you have a program, we'll call it Cacti ;-) , that regularly produces a PNG file based on some data. In your weathermap, you can have an icon for any node. Usually it's a little logo, or router icon or whatever, but it can be any PNG. So you can have a node in your map which isn't part of any link, and uses the output from some other program for it's icon.

To do this with Cacti, you'd need to use Cacti's static graph option to get an actual PNG file. You can do similar things with ImageMagick fetching image URL from other places, and resizing/converting them to suitable PNGs. We use this to get smokeping data into a small space on our intranet, for example.

I have a perl script that I use to generate tiny graphs from rrds, and I'm planning some other scripts to do similar things for unix hosts - a little tile with the hostname, diskspace on each mountpoint etc.

The icon PNG could even be one of your other weathermaps. You could have a 'mini-map' as an icon on a different map, with it's INFOURL set so that when you click on it, it goes to the full-size version of that map.

I hope that all made some sense...
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!)
rskjels
Posts: 7
Joined: Sat Mar 25, 2006 1:18 pm

Somebody call somebody

Post by rskjels »

Howie!

Thank you so much for the work and time you have spent making on this plugin. This is one of those
features that are both cool and usefull.

I do have some problems though. I belive these are related to my limited knowledge about Microsoft Windows.
My platform of choice has always been Solaris. But i digest, i have installed your plugin - version v0.8.
It is installed in the C:\Apache2\htdocs\cacti\plugins\weathermap directory. I have also changed "$cacti_base = 'C:/apache2/htdocs/cacti';"
in editor-config.php according to your documentation. Then when i call : "http://localhost/cacti/plugins/weathermap/editor.php", i get :

OR
Open An Existing Map (looking in configs):

* NO DIRECTORY named configs

I have checked permissions on this directory and it should be ok. In fact, the whole world should be able to read and write to the
cacti directory structure. When i chooce a new config called test and click on create, the editor starts with the following error:

Warning: fopen(configs/test) [function.fopen]: failed to open stream: No such file or directory in C:\Apache2\htdocs\cacti\plugins\weathermap\Weathermap.class.php on line 2543



The plugins architecture works fine with other plugins and i run Cacti Version 0.8.6h on Windows XP. This is most likely
some small error on my part. Something that i have overlooked. If anyone could be so kind to point me in the right direction
i would apreciate it very much.

I would just like to add that Cacti with its community, plugins and future looks very exiting.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Somebody call somebody

Post by Howie »

rskjels wrote:
* NO DIRECTORY named configs
I guess that for some reason your current working directory isn't being set. The editor works as installed for me on my Windows test system (XAMPP). The solution should be to change the last line of editor-config.php:

Code: Select all

    $mapdir=  $cacti_base.'/plugins/weathermap/configs';
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!)
rskjels
Posts: 7
Joined: Sat Mar 25, 2006 1:18 pm

It worked!

Post by rskjels »

Thank you!

I changed the line to :
$mapdir= $cacti_base.'/plugins/weathermap/configs';

as you said and it worked beatifully. I look forward to experiment with
this plugin.
User avatar
gilles
Cacti User
Posts: 250
Joined: Tue Jul 12, 2005 8:16 pm

small problem

Post by gilles »

hello

i have 2 problems :

1- when i create a new map with the editor, the map is create without the extension .conf
i manually add this extension

2- i can't upload images

3- maps are not generated automatically
what can i do ?

4- i manually do a "php.exe weathermap --config configs/test1.conf --output output/test1.png --htmloutput test1.html"
in the test1.conf, there is links to have overlib images but there isn't in the test1.html
what can i do ?


thanks for your good job
davs
Posts: 28
Joined: Fri Mar 31, 2006 9:47 am
Location: paris

Post by davs »

Howie,

I did all the thing you told me to do and follow your manual but I still have the same errors... I don't know where it comes from...
I activated the gd module, changed the "memory_limit" to 32M and checked the 2 new 'realms' boxes but still the same problem.

Here is what I got when I go into http://.../cacti/plugins/weathermap/editor.php:

warning: dl() [function.dl] : Not supported multithreaded Web servers - use extension=gd.so in your php.ini in C:\...\weathermap\weathermap.class.php on line 20

warning: dl() [function.dl] : Not supported multithreaded Web servers - use extension=gd.dll in your php.ini in C:\...\weathermap\weathermap.class.php on line 20


and when I try to create a new map I got:

the two same 'warning' +

Fatal error: Call to Undefined function imagecreatetruecolor() in C:\Apache2\htdocs\cacti\plugins\weathermaps\weathermaps.class.php on line 2692

Could anyone help me?
I installed the architecture plugins with other plugins and everything worked fine. So I think that the problem comes from php. But I don't know a lot of thing about php.
I saw Howie's sample and I find this pluggins really interesting so i'd like to add it to my cacti...

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

Re: small problem

Post by Howie »

gilles wrote: 1- when i create a new map with the editor, the map is create without the extension .conf
i manually add this extension
That's true.
gilles wrote: 2- i can't upload images
That's also true. There is no upload image function at the moment.
gilles wrote:
3- maps are not generated automatically
what can i do ?
Do you mean that you've added the maps to the 'manage weathermaps' screen, and they *still* aren't generated automatically, or that they don't magically appear without you configuring anything? If it's the first one, then have a look at the Cacti log file for lines with WEATHERMAP at the start. If it's the second, then have a look at the 'manage weathermaps' screen in the plugin. :-) If you aren't using the Cacti plugin, then you'll need to add a new scheduler job to create the maps.
gilles wrote: 4- i manually do a "php.exe weathermap --config configs/test1.conf --output output/test1.png --htmloutput test1.html"
in the test1.conf, there is links to have overlib images but there isn't in the test1.html
what can i do ?
Probably add 'HTMLSTYLE overlib' to the start of your config file, at a guess.
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
gilles
Cacti User
Posts: 250
Joined: Tue Jul 12, 2005 8:16 pm

Post by gilles »

davs,

you must go to wamp tray icon
in the php extensions
you must active php_gd (you need a small symbol near the name)
restart apache
do a phpinfo() and verify

open your php.ini file
verify the line "extension=php_gd2.dll "
she must be active, not commented

i think...
davs
Posts: 28
Joined: Fri Mar 31, 2006 9:47 am
Location: paris

Post by davs »

Thanks Gilles, I had already activated the gd module but I did not restart the apache server. And after a restart it works. Thanks for your help..
And thanks to Howie for the great job he made..
User avatar
egarnel
Cacti Pro User
Posts: 708
Joined: Thu Nov 21, 2002 8:55 am
Location: Austin, TX

Post by egarnel »

Does anyone have a good link for images (specifically cisco) that can be used with weathermap? I have already checked out nagiosexchange.org, but none of the offerings appeal to me

thanx
Cacti1 OS: CentOS 5.6 | 300+ devices
Cacti2 OS: CentOS 5.6 | 300+ devices
King of the Elves
Local Anarchists Union #427
"Anarchism is founded on the observation that since few men are wise enough to rule themselves, even fewer are wise enough to rule others." -Edward Abbey
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

egarnel wrote:Does anyone have a good link for images (specifically cisco) that can be used with weathermap? I have already checked out nagiosexchange.org, but none of the offerings appeal to me

thanx
Cisco have some. Try googling for cisco and visio.
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!)
rskjels
Posts: 7
Joined: Sat Mar 25, 2006 1:18 pm

Cisco Icons

Post by rskjels »

egarnel wrote:Does anyone have a good link for images (specifically cisco) that can be used with weathermap? I have already checked out nagiosexchange.org, but none of the offerings appeal to me

thanx
http://www.cisco.com/web/about/ac50/ac47/2.html

You can find icons in many different formats.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests