[SOLVED] Error on PNG files (error in Weathermap.class.php)

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
Livio Zanol
Posts: 37
Joined: Thu Feb 23, 2006 5:59 pm

[SOLVED] Error on PNG files (error in Weathermap.class.php)

Post by Livio Zanol »

Hi,

I'm getting an error while trying to generate de PNG files.

The error is

Code: Select all

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: Select all

.
.
.

================== 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.
Livio Zanol
Posts: 37
Joined: Thu Feb 23, 2006 5:59 pm

Post by Livio Zanol »

CFG File:

Code: Select all

# 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

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

Re: Error generating PNG files (error in Weathermap.class.ph

Post by Howie »

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: Select all

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: Select all

TARGET /var/rrdtool/detran-rt2_22.rrd:ds0:ds1
This error is somewhat clearer in the next release.
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!)
Livio Zanol
Posts: 37
Joined: Thu Feb 23, 2006 5:59 pm

Post by Livio Zanol »

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%
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

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?
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!)
Livio Zanol
Posts: 37
Joined: Thu Feb 23, 2006 5:59 pm

Post by Livio Zanol »

Sorry, I've made a mistake on the rrdtool file :)

It works like you've said! Thank you!

EDIT: Ow!!!!
Real Time support?
hehehehe
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest