PHP Network Weathermap 0.8 (now 0.9)

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
stelaras1
Cacti User
Posts: 57
Joined: Wed Nov 03, 2004 10:11 am

Post by stelaras1 »

thanx Howie,

You are right, DS names are in and out and not traffic_in,traffic_out...
I 'll try to modify these settings according to your advice and i tell you about the result...

Is 0.9 version available?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

stelaras1 wrote:Is 0.9 version available?
Not yet. Real Work has been getting in the way, unfortunately :(
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!)
stelaras1
Cacti User
Posts: 57
Joined: Wed Nov 03, 2004 10:11 am

Post by stelaras1 »

Howie,

I added in and out names at the end of TARGET line like you said:
TARGET blah.rrd:in:out but still it doent work :(
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

stelaras1 wrote:I added in and out names at the end of TARGET line like you said:
TARGET blah.rrd:in:out but still it doent work :(
Do you still get the same in the logs?
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!)
stelaras1
Cacti User
Posts: 57
Joined: Wed Nov 03, 2004 10:11 am

Post by stelaras1 »

Howie

i 've change the following code (Weathermap.class.php file) from traffic_in and traffic_out to in and out (my DS names):

function ReadFromRRD($target, $in_ds = "traffic_in", $out_ds = "traffic_out")
{
$inbw=-1;
$outbw=-1;



// we store the original TARGET string, and line number, along with the breakdown, to make nicer error messages later
$newtarget=array
(
$target,
'traffic_in',
'traffic_out',
$linecount,
$target
);


Here is the output of the latest log entries:
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] New Target: /www/htdocs/cacti/rra/2123.rrd (/www/htdocs/cacti/rra/2123.rrd
)
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] ReadData: Updating link node1152168863-node1152110831 from RRD Target /www/htdocs/cacti/rra/2123.rrd
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] ReadFromRRD: Target DS names are in and out
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] ReadFromRRD: Running: /usr/local/rrdtool/bin/rrdtool fetch /www/htdocs/cacti/rra/2123.rr
d AVERAGE --start now-800
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] > 1152539700: 5.9705620444e+03 1.6076545644e+04
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] > 1152540000: 5.6056444825e+03 1.5307574749e+04
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] > 1152540300: 5.4162591157e+03 1.5188659680e+04
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] > 1152540600: 5.9901140462e+03 1.6234593837e+04
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] > 1152540900: NaN NaN
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] >
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] --
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] --1152540900: NaN NaN
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] ReadFromRRD: 1: This isn't a number: [NaN]
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] ReadFromRRD: 2: This isn't a number: [NaN]
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] --1152540600: 5.9901140462e+03 1.6234593837e+04
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] ReadFromRRD: Found a good line: 1152540600: 5.9901140462e+03 1.6234593837e+04
(timestamp out in
)
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] --1152540300: 5.4162591157e+03 1.5188659680e+04
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] --1152540000: 5.6056444825e+03 1.5307574749e+04
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] --1152539700: 5.9705620444e+03 1.6076545644e+04
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] ReadFromRRD: Our line is 1152540600: 5.9901140462e+03 1.6234593837e+04
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] ReadFromRRD: Returning (129876.750696,47920.9123696)
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0] ReadData: Setting 129876.750696,47920.9123696
07/10/2006 05:12:04 PM - WEATHERMAP: Poller[0]
ReadData Completed.


However it would be very efficient to be able to use the syntax you mentioned before in TARGET line :(

and somethine else:
i 'm getting cells and not bits neither kbits/Mbits...
is there a way to use cellsas a measuring unit?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

stelaras1 wrote: However it would be very efficient to be able to use the syntax you mentioned before in TARGET line :(
You should be able to use that syntax. It works fine for other people... :-? Especially since those changes just do what the code does anyway if you specify DS names! I'll see if I can untangle my recent changes into a version I can send you...
stelaras1 wrote: and somethine else:
i 'm getting cells and not bits neither kbits/Mbits...
is there a way to use cellsas a measuring unit?


Well, not really at the moment. It's possible (but not certain) that in 0.9 you could use CDEFs to do this kind of change, via a datasource plugin. The best way at the moment is to use the regular SNMP IF-MIB interfaces, if you can on your device... OR, if you don't mind the arrows showing cell rates, you can try using the 'BWLABEL unformatted' option on your LINKs.
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!)
stelaras1
Cacti User
Posts: 57
Joined: Wed Nov 03, 2004 10:11 am

Post by stelaras1 »

Howie

The syntax you told me which is TARGET path_to_rrd.rrd:DSNAME1:DSNAME2 is correct :)
I have installed Version 0.82 as standalone and not as cacti plugin to control error messages better...and it worked :)

Let's say i'm interested in representing only the percentage of link utilisation...
RRD holds values from snmpget that is cells...is there a place in code where i can modify and transform the MAX Bandwidth of the link which is given in bytes and transform it automatically to cells (by diving it by 53)and get the correct percent? (1 cell= 53 bytes)
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

stelaras1 wrote:Howie

The syntax you told me which is TARGET path_to_rrd.rrd:DSNAME1:DSNAME2 is correct :)
I have installed Version 0.82 as standalone and not as cacti plugin to control error messages better...and it worked :)
So the same configuration fails in Cacti and works standalone?? Even if you use the full path to each RRD file?
stelaras1 wrote: Let's say i'm interested in representing only the percentage of link utilisation...
RRD holds values from snmpget that is cells...is there a place in code where i can modify and transform the MAX Bandwidth of the link which is given in bytes and transform it automatically to cells (by diving it by 53)and get the correct percent? (1 cell= 53 bytes)
No there isn't. You would need to manually divide by 53 when setting the BANDWIDTH lines. If you are always going to do this, then you could alter the code in ReadConfig, but I'm not going to add it as a feature.

Internally, the PCR/SCR on your PVC will be set as cell-rates anyway, surely? Also, if the device is a router (and not an ATM switch) then you probably also have the IF-MIB interfaces available, which are all in bytes.
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!)
stelaras1
Cacti User
Posts: 57
Joined: Wed Nov 03, 2004 10:11 am

Post by stelaras1 »

as a standalone it works for sure..
In cacti the most likely scenario is that when i used the editor i forgot to add the DSNAME1:DSNAME2 after rrd so it's not application's fault...

I 'm polling an ATM switch so all the results are in cells.In particular i want to graph the ATM trunks between ATM switches..
So i have their maximum bandwidth in cells (353207 - STM-1) and i also have the cells that passed through the interface.
Do you have an idea on how i could take this number as a percentage?
It's easy to take it in Cacti by applying a CDEF function..
Do you think that i could use the max number of cells in the field (in editor) that expects bits?
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

stelaras1 wrote: Do you think that i could use the max number of cells in the field (in editor) that expects bits?
Yes - as long as you stick to percentage usage, I think it should be fine with all values in cells instead of bits. You might need to multiply the maximum value by 8, so that it is in proportion with the value read from the RRD (which I think I might multiply by 8).
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!)
stelaras1
Cacti User
Posts: 57
Joined: Wed Nov 03, 2004 10:11 am

Post by stelaras1 »

Howie thanx for your valuable contribution to my issue :)

i 'll try and i hope that i 'll get reasonable results :)
andrew2
Cacti User
Posts: 64
Joined: Mon Jul 26, 2004 2:50 pm
Location: Cincinnati, OH
Contact:

Quick update on Cron problem

Post by andrew2 »

Just in case anyone runs into the same problem I did (a few posts back) where weathermap works from the commandline, but not through cron:

In my case it was a bit complicated. I have two different versions of PHP installed on the system to deal with some incompatiblities with some applications. In any case, poller.php was set to use one, and weathermap was set use the other. Why that caused an issue, I have no idea. After setting them both the same -- no problems.

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

Re: Quick update on Cron problem

Post by Howie »

andrew2 wrote:Just in case anyone runs into the same problem I did (a few posts back) where weathermap works from the commandline, but not through cron:

In my case it was a bit complicated. I have two different versions of PHP installed on the system to deal with some incompatiblities with some applications. In any case, poller.php was set to use one, and weathermap was set use the other. Why that caused an issue, I have no idea. After setting them both the same -- no problems.

Andrew
If only one of the two had the GD module installed, that would do it... or if one had a different memory_limit. Other than those, I can't think of a reason, either :-)
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!)
stelaras1
Cacti User
Posts: 57
Joined: Wed Nov 03, 2004 10:11 am

Post by stelaras1 »

Hello Howie,

everything works just fine!
The tricky part was to multiply by 8 (thank God you remembered it correctly). Considering bits as cells i get exact the same values as from Cacti with the CDEF function.

Thanx for you help!
flipflap
Cacti User
Posts: 142
Joined: Sat Jul 09, 2005 3:13 pm

Post by flipflap »

hi i'm using cacti 0.8.6h with plugin patch installed. i'm trying to make weathermap editor run but all i get is this (see below) it happens when i try to click on the first page the "simple.conf" file. PHP Weathermap version 0.82 is the one i got.

Fatal error: Call to undefined function imagecreatetruecolor() in c:\Inetpub\wwwroot\cacti\plugins\weathermap\Weathermap.class.php on line 2962

what could be causing it? thanks for the help.
Attachments
weather map error
weather map error
weathermap.JPG (68.8 KiB) Viewed 7821 times
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests