Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


PHP Network Weathermap 0.8 (now 0.9)
Goto page Previous  1, 2, 3 ... 22, 23, 24, 25  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Network Weather Map)
Author Message
stelaras1
Cacti User


Joined: 03 Nov 2004
Posts: 57

PostPosted: Sat Jul 08, 2006 2:35 am    Post subject: Reply with quote

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?
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2162
Location: United Kingdom

PostPosted: Sun Jul 09, 2006 5:24 am    Post subject: Reply with quote

stelaras1 wrote:
Is 0.9 version available?


Not yet. Real Work has been getting in the way, unfortunately
Back to top
stelaras1
Cacti User


Joined: 03 Nov 2004
Posts: 57

PostPosted: Mon Jul 10, 2006 7:01 am    Post subject: Reply with quote

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
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2162
Location: United Kingdom

PostPosted: Mon Jul 10, 2006 7:10 am    Post subject: Reply with quote

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?
Back to top
stelaras1
Cacti User


Joined: 03 Nov 2004
Posts: 57

PostPosted: Mon Jul 10, 2006 8:37 am    Post subject: Reply with quote

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:

Quote:
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?
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2162
Location: United Kingdom

PostPosted: Mon Jul 10, 2006 5:13 pm    Post subject: Reply with quote

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.
Back to top
stelaras1
Cacti User


Joined: 03 Nov 2004
Posts: 57

PostPosted: Tue Jul 11, 2006 4:13 am    Post subject: Reply with quote

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)
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2162
Location: United Kingdom

PostPosted: Tue Jul 11, 2006 7:17 am    Post subject: Reply with quote

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.
Back to top
stelaras1
Cacti User


Joined: 03 Nov 2004
Posts: 57

PostPosted: Tue Jul 11, 2006 7:27 am    Post subject: Reply with quote

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?
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2162
Location: United Kingdom

PostPosted: Tue Jul 11, 2006 8:16 am    Post subject: Reply with quote

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 .
Back to top
stelaras1
Cacti User


Joined: 03 Nov 2004
Posts: 57

PostPosted: Tue Jul 11, 2006 8:29 am    Post subject: Reply with quote

Howie thanx for your valuable contribution to my issue

i 'll try and i hope that i 'll get reasonable results
Back to top
andrew2
Cacti User


Joined: 26 Jul 2004
Posts: 64
Location: Cincinnati, OH

PostPosted: Tue Jul 11, 2006 1:45 pm    Post subject: Quick update on Cron problem Reply with quote

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
Back to top
Howie
Cacti Guru User


Joined: 16 Sep 2004
Posts: 2162
Location: United Kingdom

PostPosted: Tue Jul 11, 2006 2:01 pm    Post subject: Re: Quick update on Cron problem Reply with quote

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
Back to top
stelaras1
Cacti User


Joined: 03 Nov 2004
Posts: 57

PostPosted: Wed Jul 12, 2006 5:37 am    Post subject: Reply with quote

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!
Back to top
flipflap
Cacti User


Joined: 09 Jul 2005
Posts: 137

PostPosted: Fri Aug 11, 2006 9:00 pm    Post subject: Reply with quote

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.



weathermap.JPG
 Description:
weather map error
 Filesize:  68.8 KB
 Viewed:  2556 Time(s)

weathermap.JPG


Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Plugin: (Network Weather Map) All times are GMT - 5 Hours
Goto page Previous  1, 2, 3 ... 22, 23, 24, 25  Next
Page 23 of 25

 



Powered by phpBB © 2001, 2005 phpBB Group