PHP Network Weathermap 0.8 (now 0.9)

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
yp
Posts: 3
Joined: Fri May 26, 2006 5:29 am

Post by yp »

Hi Howie,
Which is your email, it is not in your profile.
If you don't wish to give it to the forum, send me an email and I will send you the files.
Thanks for the update, it looks like you already working on this idea (and in a more flexible way).
YP
Arrow2005
Cacti User
Posts: 54
Joined: Thu Nov 03, 2005 3:07 pm
Contact:

Post by Arrow2005 »

Seems nice but I cant get it working.....

I did unzip the zipfile to /var/www/c/plugins/weathermap

allsow did the chown cactiuser output

then i added
$plugins = array();
$plugins[] = 'monitor';
$plugins[] = 'weathermap';

in the var/www/c/include/config.php

then I login as a admin and looking under useradmin and I cant find the checkbox to view weathermap... I have thold installed and that shows.
====================

It seems like Im doing something wrong, but what ??

is there possible to do a install.sh just like the thold plugin ??
if you can patch it to day, why dont whait util 2morrow
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Arrow2005 wrote:
It seems like Im doing something wrong, but what ??

is there possible to do a install.sh just like the thold plugin ??
That should be enough. There is no install.sh. Do you get any errors in your Cacti log? or your apache error log?
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!)
Arrow2005
Cacti User
Posts: 54
Joined: Thu Nov 03, 2005 3:07 pm
Contact:

Post by Arrow2005 »

no errors i think....

dont really know how to check this either :-)

me is really new to this

checked in /var/logs/cacti and /var/logs/apache

no strange there
if you can patch it to day, why dont whait util 2morrow
nfantis
Posts: 8
Joined: Fri May 26, 2006 3:01 pm

Post by nfantis »

Arrow2005,

Dou you have the plugin architecture installed? If you had to add all 3 lines it looks like you don't. Go to www.cactiusers.org and on the right side you should see Plugin Architecture.

Download that and read the documentation on how to add it. After you have that installed (pretty easy) then you can go ahead and follow the instructions on weathermaps site.

Hope this helps

Nick
r_chetanjain
Cacti User
Posts: 83
Joined: Fri Aug 22, 2003 4:33 am

Graph URL Problem

Post by r_chetanjain »

Hi guys.....I installed the plugin and when i try to create a new node and i see that " Hover Graph URL ", i am not able to get the rrd's for it...it says " Pick From Cacti Not Yet " i have edited the editor-config.php...posting the file

<?php
$cacti_base = "/var/www/html/cacti";
if(is_dir($cacti_base))
{
// include the cacti-config, so we know about the database
include_once($cacti_base."/include/config.php");

// CHANGE: this to be the URL of the base of your Cacti install
// it MUST end with a / character!
$config['base_url']='http://netflow.monitor.com/cacti/';
}
$mapdir= $cacti_base.'/plugins/weathermap/configs';
?>

and my cacti.conf for HTTPD goes like this

Alias /cacti/ /var/www/html/cacti/
<Directory /var/www/html/cacti/>
Options None
order allow,deny
allow from all
</Directory>
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Re: Graph URL Problem

Post by Howie »

r_chetanjain wrote:Hi guys.....I installed the plugin and when i try to create a new node and i see that " Hover Graph URL ", i am not able to get the rrd's for it...it says " Pick From Cacti Not Yet " i have edited the editor-config.php...posting the file
Please read the big red "Note" box that appears when you start using the editor. You can't add hover graphs for nodes from the editor yet. You can't have a TARGET on a node anyway in 0.82, which is why that is not available in the editor. 0.9 will have targets for nodes.
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!)
mat
Posts: 3
Joined: Tue Apr 04, 2006 10:26 am
Location: Bayonne, France

Post by mat »

Hi Howie, Hi eveyone.

This is a contribution :)

I was on trainning course for 3 months on a french network company (Acte-ingenerie), and I did use your work. So I get the permission to send mine back to you. I think there is some usefull code for improving the editor...

But let's present the application:

It's a config generator. It works with Cacti, php-weathermap 0.81 (I don't have tried with the 0.82), mysql, rrd and under Linux.
The main problem with the actual state of the editor (which is very nice, I really wanted to mention it), is that we have to pick rrd sources, then graph's id from the cacti database.
If you've got 10 devices on your map, it represents some boring work, but you can do it. If you have 50 devices, it's become really dumb.

So I provide a page for selecting all availables devices/interfaces from the cacti base. Every couple having an associated Traffic graph is shown.
You can easily select the list of nodes you want to graph.

Next, let's add some links. Switch to Road page to do that.

When done, you can generate the config. You will be re-directed to Howie's editor for positionning your nodes.
At this time, config is enabled on weathermap, rrd and graph on mouse hover have been specified.

Now the second part:
I have a little modified your code Howie ;) I explain it:

php-weathermap is a tool for graphing a network. But, It also allow graphing with custom RRD and datasources.
What if, we want to see not the traffic load, but reather the cpu load of our network?
There is a 3rd page, which display all the available datasources (ordered by device). Now, just select those you find interresting, the whole map will be generated (size and position are fully automatic).

Here is a screenshot:
Image

As you can see, arrows are simple now. Each one point to an indicator. On mouse over, if an associated graph has been found, it will be displayed.

On Howie code, bits are getted from RRD, then converted on bytes for display. If you use single arrow, no conversion will occurs. But, they are several indicators that require to be processed, such as disk_used, where the used unit is the kilo-byte.

Cacti uses CDEF fonctions to do this (you know, the great reverse polish expressions!). For a datasource, it a CDEF processing is matched on the associated graphs, the expression will be get and written to config. Then, on Weathermap, when getting data from RRD, the 'simple' CDEF expression will be interpreted, and applied.

You can download all the stuff below.

I've made an archive including all my weathermap folder.
(I first did use 'patch', but finally, this way seems to be more simple).
It includes a more precise documentation, which provides more details features, and modifications.

Concerning support, I reach now the end of my contract. The developpement is over, and I won't maintain the application. Acte Ingenerie will still use php-weathermap 0.81, and won't maintain it too neither doing any support.

But, I'm still open for anservering to any questions, I may receive to my Inbox ;)
Attachments
php-weathermap-0.81-extended.tar.gz
The stuff
(927.94 KiB) Downloaded 247 times
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

mat wrote:
But let's present the application:

It's a config generator. It works with Cacti, php-weathermap 0.81 (I don't have tried with the 0.82), mysql, rrd and under Linux.
The main problem with the actual state of the editor (which is very nice, I really wanted to mention it), is that we have to pick rrd sources, then graph's id from the cacti database.
If you've got 10 devices on your map, it represents some boring work, but you can do it. If you have 50 devices, it's become really dumb.

So I provide a page for selecting all availables devices/interfaces from the cacti base. Every couple having an associated Traffic graph is shown.
You can easily select the list of nodes you want to graph.

Next, let's add some links. Switch to Road page to do that.
This sounds really interesting! I haven't tried it yet, but it sounds great. How does it know which devices are linked? or is that the Road page? I'll just try it... :D
mat wrote: When done, you can generate the config. You will be re-directed to Howie's editor for positionning your nodes.
At this time, config is enabled on weathermap, rrd and graph on mouse hover have been specified.

Now the second part:
I have a little modified your code Howie ;) I explain it:

php-weathermap is a tool for graphing a network. But, It also allow graphing with custom RRD and datasources.
What if, we want to see not the traffic load, but reather the cpu load of our network?
There is a 3rd page, which display all the available datasources (ordered by device). Now, just select those you find interresting, the whole map will be generated (size and position are fully automatic).

Here is a screenshot:
Image

As you can see, arrows are simple now. Each one point to an indicator. On mouse over, if an associated graph has been found, it will be displayed.

On Howie code, bits are getted from RRD, then converted on bytes for display. If you use single arrow, no conversion will occurs. But, they are several indicators that require to be processed, such as disk_used, where the used unit is the kilo-byte.

Cacti uses CDEF fonctions to do this (you know, the great reverse polish expressions!). For a datasource, it a CDEF processing is matched on the associated graphs, the expression will be get and written to config. Then, on Weathermap, when getting data from RRD, the 'simple' CDEF expression will be interpreted, and applied.
Version 0.9 makes some changes to the way datasources are handled that would make it much easier to use CDEFs and 'rrdtool xport' to do this type of stuff. All data is collected through plugins, so you can integrate any datasource that can be accessed from PHP.

Also, I think that the new node targets makes some of these "1-dimensional" variables like load and memory better to handle (although I actually like the flower-style design in your map :-) ). That said, I think the 1-way arrows are cool, and they will definitely be in a new version for mapping things like latency or other 1-way quantities. The new node stuff will allow you to add an number of labels around a node, each witha different datasource, and a different colourscale.
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!)
hermatize
Cacti User
Posts: 55
Joined: Wed Aug 10, 2005 6:29 pm

Post by hermatize »

I have a question. I am using the weathermap cacti plug in I had it working and for some reason started creating new Maps and now i get this error when i try to view the weathermaps.

(thumbnail for map 12 not created yet)
(thumbnail for map 13 not created yet)
qwertz
Cacti User
Posts: 98
Joined: Thu Feb 16, 2006 9:20 am

Post by qwertz »

It looks very very nice.

My goal is to graph custom RRD and datasources and now it seems to be possible.

Thanks

Qwertz
mat
Posts: 3
Joined: Tue Apr 04, 2006 10:26 am
Location: Bayonne, France

Post by mat »

This sounds really interesting! I haven't tried it yet, but it sounds great. How does it know which devices are linked? or is that the Road page? I'll just try it... :D
Hum, ok , I will try to explain it better: So 2 pages are used on network mode.
The 'Device page' , which sync with Cacti database, and look for all Traffic available RRD sources.
Most of the Traffic RRD Template allow us tho get the Interface.

When you have done your selection, the 'Road page' is just a way to create links between nodes.

At generation time, if you have RRD id, it is possible to get the associated graphs using the cacti graph_templates_item table.
Version 0.9 makes some changes to the way datasources are handled that would make it much easier to use CDEFs and 'rrdtool xport' to do this type of stuff. All data is collected through plugins, so you can integrate any datasource that can be accessed from PHP.
Will be nice!
So now, Perl script might be use for getting data? Very powerfull...
...and a different colourscale.
You've found what's wrong!
If you monitor used disk for a partition, a lot of space is available, the arrow is green (or blue) , there isn't any problem.
But, fot the same partition, you've decided to monitor free space... 90% free, so.. red arrow ;)

Interpretation must be done carefully...
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

mat wrote: Will be nice!
So now, Perl script might be use for getting data? Very powerfull...
Not perl - the plugin is a PHP class. Nothing to stop it calling an external script though. One of the default ones should be a cgi-like external script plugin.

TARGET !myscript.pl param1 param2

My intention is that you should be able to use any script that was usable with MRTG's external script target.
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!)
r_chetanjain
Cacti User
Posts: 83
Joined: Fri Aug 22, 2003 4:33 am

Ping Latency Map

Post by r_chetanjain »

It would be gr8 if we could have a map on the Ping Latency....Actually this makes sense.....what you guys suggest.....i have a gr8 map for the Internet bandwidth for all my 30 locations...but was just woundering if Ping Latency could also be added to WeatherMap 0.82

Chetan Jain
hermatize
Cacti User
Posts: 55
Joined: Wed Aug 10, 2005 6:29 pm

Post by hermatize »

Can anyone help me with my previous post.

I am pasting my config as it stands.

http://pastebin.com/765396

Thanks in advance !!
Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests