|
|
| Author |
Message |
Livio Zanol
Joined: 23 Feb 2006 Posts: 30
|
Posted: Tue Dec 05, 2006 11:48 am Post subject: [SOLVED] Error on PNG files (error in Weathermap.class.php) |
|
|
Hi,
I'm getting an error while trying to generate de PNG files.
The error is
| Code: |
Notice: Undefined index: traffic_in in /var/www/weathermap/Weathermap.class.php
on line 1762
Notice: Undefined index: traffic_out in /var/www/weathermap/Weathermap.class.ph
p on line 1763
|
The error occurs for all links.
The png is generated but no link activity is shown on the map.
I'm using MRTG to generate the rrd files (using routers2.cgi to monitor links), and have a "standalone" weathermap instalation.
Here is the DEBUG:
| Code: |
.
.
.
================== ReadData: Updating link data for all links
ReadData for Link node1165323723-node1165323959:
New Target: /var/rrdtool/dell_metro_g21.rrd (/var/rrdtool/dell_metro_g21.rrd)
ReadData: Updating link node1165323723-node1165323959 from RRD Target /var/rrdtool/dell_metro_g21.rrd
ReadFromRRD: Target DS names are traffic_in and traffic_out
ReadFromRRD: Running: /usr/bin/rrdtool fetch /var/rrdtool/dell_metro_g21.rrd AVERAGE --start now-800
> 1165335300: 4.2513438995e+05 1.0783833409e+05
> 1165335600: 4.6948385972e+05 8.3468932152e+04
> 1165335900: 3.4331537605e+05 7.6403702322e+04
> 1165336200: 3.8116359889e+05 8.1954930197e+04
> 1165336500: nan nan
> --
--1165336500: nan nan
ReadFromRRD: 1: This isn't a number: [nan]
ReadFromRRD: 2: This isn't a number: [nan]
--1165336200: 3.8116359889e+05 8.1954930197e+04
ReadFromRRD: Found a good line: 1165336200: 3.8116359889e+05 8.1954930197e+04
(timestamp ds0 ds1
)
--1165335900: 3.4331537605e+05 7.6403702322e+04
--1165335600: 4.6948385972e+05 8.3468932152e+04
--1165335300: 4.2513438995e+05 1.0783833409e+05
ReadFromRRD: Our line is 1165336200: 3.8116359889e+05 8.1954930197e+04
Notice: Undefined index: traffic_in in /var/www/weathermap/Weathermap.class.php on line 1762
Notice: Undefined index: traffic_out in /var/www/weathermap/Weathermap.class.php on line 1763
ReadFromRRD: Returning (0,0)
ReadData: Setting 0,0
.
.
.
|
Any clues?
Thanks,
Livio Zanol Puppim
Last edited by Livio Zanol on Thu Dec 07, 2006 6:33 am; edited 1 time in total |
|
| Back to top |
|
 |
Livio Zanol
Joined: 23 Feb 2006 Posts: 30
|
Posted: Tue Dec 05, 2006 12:07 pm Post subject: |
|
|
CFG File:
| Code: |
# Automatically generated by php-weathermap v0.82
BACKGROUND images/LitoralNorte.png
TITLE Ciretrans Litoral Norte
KEYPOS 800 1158 Uso da banda
KEYTEXTCOLOR 0 0 0
KEYBGCOLOR 255 255 255
BGCOLOR 255 255 255
TITLECOLOR 0 0 0
TIMECOLOR 0 0 0
SCALE 1 10 140 0 255
SCALE 10 25 32 32 255
SCALE 25 40 0 192 255
SCALE 40 55 0 240 0
SCALE 55 70 240 240 0
SCALE 70 85 255 192 0
SCALE 85 100 255 0 0
# End of global section
# DEFAULT definitions:
LINK DEFAULT
BANDWIDTH 100M
# End of DEFAULTS section
# Node definitions:
NODE node1165323723
LABEL 10.173.255.29
ICON images/Icone.png
POSITION 79 494
NODE node1165323904
LABEL 10.173.255.28
ICON images/Icone.png
POSITION 808 202
NODE node1165323959
LABEL 10.31.6.58
POSITION 458 265
NODE node1165323974
LABEL 10.31.5.94
POSITION 489 758
NODE node1165323980
LABEL 10.31.5.42
POSITION 415 908
NODE node1165323989
LABEL 10.31.7.138
POSITION 637 560
# Link definitions:
LINK node1165323723-node1165323959
INFOURL http://10.32.12.250/cgi-bin/routers2.cgi?rtr=detran.cfg&bars=Ca$
OVERLIBGRAPH http://10.32.12.250/graphs/detran.cfg-detran-rt2_44-d-l.png
TARGET /var/rrdtool/dell_metro_g21.rrd
NODES node1165323723 node1165323959
BANDWIDTH 64K
LINK node1165323723-node1165323974
TARGET /var/rrdtool/detran-rt2_31.rrd
NODES node1165323723 node1165323974
BANDWIDTH 128K
LINK node1165323723-node1165323980
TARGET /var/rrdtool/detran-rt2_22.rrd
NODES node1165323723 node1165323980
BANDWIDTH 64K
LINK node1165323904-node1165323989
TARGET /var/rrdtool/detran-rt3_40.rrd
NODES node1165323904 node1165323989
BANDWIDTH 64K
|
|
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2162 Location: United Kingdom
|
Posted: Tue Dec 05, 2006 2:45 pm Post subject: Re: Error generating PNG files (error in Weathermap.class.ph |
|
|
| Livio Zanol wrote: |
I'm using MRTG to generate the rrd files (using routers2.cgi to monitor links), and have a "standalone" weathermap instalation.
Here is the DEBUG:
| Code: |
ReadFromRRD: Target DS names are traffic_in and traffic_out
(timestamp ds0 ds1
)
|
Any clues?
|
Yep. If you are using MRTG, then you need to specify DS names in your TARGET lines. The default ones are for Cacti (traffic_in, traffic_out).
Try:
| Code: |
TARGET /var/rrdtool/detran-rt2_22.rrd:ds0:ds1
|
This error is somewhat clearer in the next release. |
|
| Back to top |
|
 |
Livio Zanol
Joined: 23 Feb 2006 Posts: 30
|
Posted: Thu Dec 07, 2006 5:58 am Post subject: |
|
|
I have specified the ds0 and ds1 just like you've said...
The Bandwidth limit is 64K and I'm having about 50bps for in_traffic and 40bps for out_traffic, but weathermap gave me 3000%. What's wrong?
Clipped 3276.26077537% to 100%
Clipped 862.47497145% to 100% |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2162 Location: United Kingdom
|
Posted: Thu Dec 07, 2006 6:01 am Post subject: |
|
|
| Livio Zanol wrote: | I have specified the ds0 and ds1 just like you've said...
The Bandwidth limit is 64K and I'm having about 50bps for in_traffic and 40bps for out_traffic, but weathermap gave me 3000%. What's wrong?
Clipped 3276.26077537% to 100%
Clipped 862.47497145% to 100% |
Can you post a piece of the config (one LINK section) and the output of --debug? |
|
| Back to top |
|
 |
Livio Zanol
Joined: 23 Feb 2006 Posts: 30
|
Posted: Thu Dec 07, 2006 6:05 am Post subject: |
|
|
Sorry, I've made a mistake on the rrdtool file
It works like you've said! Thank you!
EDIT: Ow!!!!
Real Time support?
hehehehe |
|
| Back to top |
|
 |
|