Map generated only manually - SOLVED SEE PAGE 3

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

tomate
Cacti User
Posts: 73
Joined: Mon Jun 05, 2006 5:45 am

Map generated only manually - SOLVED SEE PAGE 3

Post by tomate »

Hello,

When i generate the map manually using the "recalculate all maps now" button, all works fine.

But when it is done by cacti, stats on my links are only 0 and i have this in the logs :
11/27/2008 03:09:15 PM - WEATHERMAP: Poller[0] [Map 2] weathermap.conf: ReadData: LINK plop-new-IP-MPLS, target: /usr/share/cacti/site/rra/plup_traffic_in_1020.rrd on config line 296 had no valid data, according to WeatherMapDataSource_rrd
any idea ?
Last edited by tomate on Tue Dec 02, 2008 11:25 am, edited 1 time in total.
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Turn on DEBUG in Cacti, and let it run for one cycle.

Look in the cacti.log file. You should get a lot more information about what is going on.

Also, check permissions. When you do 'Recalculate Now', it runs as the Apache user, while the poller runs as 'cacti'.
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!)
tomate
Cacti User
Posts: 73
Joined: Mon Jun 05, 2006 5:45 am

Post by tomate »

Howie wrote:Turn on DEBUG in Cacti, and let it run for one cycle.

Look in the cacti.log file. You should get a lot more information about what is going on.

Also, check permissions. When you do 'Recalculate Now', it runs as the Apache user, while the poller runs as 'cacti'.
I run cacti with the root user (for ICMP ping)

i have enabled debug, i will paste the result
tomate
Cacti User
Posts: 73
Joined: Mon Jun 05, 2006 5:45 am

Post by tomate »

well, i have a very huge amount of debug lines :/

is it possible that the problem comes from the fact in my graphs i have some '/' or '-' in titles or legends ?

i read something about escaping some caracters on google but not directly when using weathermap via cacti
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

tomate wrote:well, i have a very huge amount of debug lines :/

is it possible that the problem comes from the fact in my graphs i have some '/' or '-' in titles or legends ?

i read something about escaping some caracters on google but not directly when using weathermap via cacti
No, I don't think so.

Look for your original error (about no valid data), and then look above that in the logs. You should get some info about WHY it thinks there is invalid data.
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!)
tomate
Cacti User
Posts: 73
Joined: Mon Jun 05, 2006 5:45 am

Post by tomate »

Howie wrote:
tomate wrote:well, i have a very huge amount of debug lines :/

is it possible that the problem comes from the fact in my graphs i have some '/' or '-' in titles or legends ?

i read something about escaping some caracters on google but not directly when using weathermap via cacti
No, I don't think so.

Look for your original error (about no valid data), and then look above that in the logs. You should get some info about WHY it thinks there is invalid data.
like this ?
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] [Map 2] weathermap.conf: ReadData: LINK 1-to-2-G1/1, target: /usr/share/cacti/site/rra/
toto_traffic_in_749.rrd on config line 157 had no valid data, according to WeatherMapDataSource_rrd
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:674] [Map 2] weathermap.conf: ReadData complete for LINK 1-to-2-G1/1: 0 0
weird
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

No... in the DEBUG section of the log, there should be something like 20 lines of log per link. It will show what rrdtool command is being run, the output, whether it thinks any of the output is useful, whether the rrd file exists, what value it's going to return etc etc.
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!)
tomate
Cacti User
Posts: 73
Joined: Mon Jun 05, 2006 5:45 am

Post by tomate »

Howie wrote:No... in the DEBUG section of the log, there should be something like 20 lines of log per link. It will show what rrdtool command is being run, the output, whether it thinks any of the output is useful, whether the rrd file exists, what value it's going to return etc etc.
ok, there are debug logs between two errors :
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] [Map 2] weathermap.conf: ReadData: LINK 1-to-2-G2/1, target: /usr/share/cacti/site/rra/
swc_traffic_in_8581.rrd on config line 181 had no valid data, according to WeatherMapDataSource_rrd
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:674] [Map 2] weathermap.conf: ReadData complete for LINK dty-altair-swd-
dty-altair-swc-G2/1: 0 0
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:715] [Map 2] weathermap.conf: ReadData: Setting 0,0
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:599] [Map 2] weathermap.conf:
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:600] [Map 2] weathermap.conf: ReadData for LINK dty-altair-swd-dty-altai
r-swc-G2/2:
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:606] [Map 2] weathermap.conf: ReadData: New Target: /usr/share/cacti/sit
e/rra/swc_traffic_in_8582.rrd
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:637] [Map 2] weathermap.conf: ReadData: Matched for WeatherMapDataSource
_rrd. Calling WeatherMapDataSource_rrd->ReadData()
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@WeatherMapDataSource_rrd.php:332] [Map 2] weathermap.conf: SCALING result by 8
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@WeatherMapDataSource_rrd.php:360] [Map 2] weathermap.conf: RRD ReadData: Target DS names are
traffic_in and traffic_out
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:173] [Map 2] weathermap.conf: RRD ReadData:
traditional style
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:188] [Map 2] weathermap.conf: RRD ReadData:
Running: /usr/bin/rrdtool fetch /usr/share/cacti/site/rra/swc_traffic_in_8582.rrd AVERAGE --start now-800 --end now
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:208] [Map 2] weathermap.conf: > 1227802500:
7,3513763363e+01 1,6193190818e+03
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:208] [Map 2] weathermap.conf: > 1227802800:
4,8368619045e+01 1,6386172470e+03
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:208] [Map 2] weathermap.conf: > 1227803100:
nan nan
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:208] [Map 2] weathermap.conf: >
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:215] [Map 2] weathermap.conf: RRD ReadData:
Read 4 lines from rrdtool
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:216] [Map 2] weathermap.conf: RRD ReadData:
Headings are: traffic_in traffic_out
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:225] [Map 2] weathermap.conf: --
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:225] [Map 2] weathermap.conf: --1227803100:
nan nan
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:225] [Map 2] weathermap.conf: --1227802800:
4,8368619045e+01 1,6386172470e+03
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:225] [Map 2] weathermap.conf: --1227802500:
7,3513763363e+01 1,6193190818e+03
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:280] [Map 2] weathermap.conf: RRD ReadDataFr
omRealRRD: Returning (NULL,NULL,0)
11/27/2008 05:23:25 PM - WEATHERMAP: Poller[0] DEBUG: [ReadData@WeatherMapDataSource_rrd.php:383] [Map 2] weathermap.conf: RRD ReadData: Returning (NULL,NULL
,0)

when i manually generate the map, all my links have flows, in and out
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

That's weird. Can you get a DEBUG log from the manual run too?

In the one that you posted, rrdtool is producing localised numbers: 4,8368619045e+01 (, instead of .). I've never seen it do that before.

I'd like to see if the manual run has the same style of numbers, or 4.8368619045e+01 instead.
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!)
tomate
Cacti User
Posts: 73
Joined: Mon Jun 05, 2006 5:45 am

Post by tomate »

ok i ran a manual generation, but i do not have the same logs
nothing about values :o

only lines like those :
11/28/2008 10:08:38 AM - WEATHERMAP: Poller[0] [Map 3] 1.conf: ColourFromPercent: Scale DEFAULT doesn't cover 0.00725448280928% for dty-1-swc-dty-12-FA-2/6 [WMWARN29]
11/28/2008 10:08:38 AM - WEATHERMAP: Poller[0] [Map 3] 1.conf: ColourFromPercent: Scale DEFAULT doesn't cover 0.0561822092984% for dty-1-swd-dty-12 [WMWARN29]
11/28/2008 10:08:38 AM - WEATHERMAP: Poller[0] [Map 3] 1.conf: ColourFromPercent: Scale DEFAULT doesn't cover 0.0151418900688% for dty-1-swd-dty-12 [WMWARN29]
11/28/2008 10:08:38 AM - WEATHERMAP: Poller[0] [Map 3] 1.conf: ColourFromPercent: Scale DEFAULT doesn't cover 0.00050631052356% for dty-1-swd-dty-1-75B [WMWARN29]
11/28/2008 10:08:38 AM - WEATHERMAP: Poller[0] [Map 3] 1.conf: ColourFromPercent: Scale DEFAULT doesn't cover 0.000621892592568% for dty-1-swd-dty-1-75B [WMWARN29]
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

OK, well I guess it uses a '.' because it's working :-)

The fix will be in lib/datasources/WeatherMapDataSource_rrd.php

on line 266 and 270 (roughly), change the preg_match() lines to say

/^\-?\d+(,\.)?\d*e?[+-]?\d*:?$/i

instead of
/^\-?\d+\.?\d*e?[+-]?\d*:?$/i

so that it will match a , or a .
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!)
tomate
Cacti User
Posts: 73
Joined: Mon Jun 05, 2006 5:45 am

Post by tomate »

Howie wrote:OK, well I guess it uses a '.' because it's working :-)

The fix will be in lib/datasources/WeatherMapDataSource_rrd.php

on line 266 and 270 (roughly), change the preg_match() lines to say

/^\-?\d+(,\.)?\d*e?[+-]?\d*:?$/i

instead of
/^\-?\d+\.?\d*e?[+-]?\d*:?$/i

so that it will match a , or a .
ok i try this ;)
tomate
Cacti User
Posts: 73
Joined: Mon Jun 05, 2006 5:45 am

Post by tomate »

i only find the line on line 243
i replaced but still the same problem :(
tomate
Cacti User
Posts: 73
Joined: Mon Jun 05, 2006 5:45 am

Post by tomate »

i seee now numbers with '.' :
11/28/2008 11:30:36 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:208] [Map 4] 1.conf: > 1227867600: 3
.3703029149e+06 4.7048584286e+05
but :
11/28/2008 11:30:36 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:225] [Map 4] 2.conf: --1227867600: 3
.0227953220e+05 6.6525416030e+02
11/28/2008 11:30:36 AM - WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:281] [Map 4] 2.conf: RRD ReadDataFro
mRealRRD: Returning (NULL,NULL,0)
11/28/2008 11:30:36 AM - WEATHERMAP: Poller[0] DEBUG: [ReadData@WeatherMapDataSource_rrd.php:384] [Map 4] 2.conf: RRD ReadData: Returning (NULL,NULL,
0)
11/28/2008 11:30:36 AM - WEATHERMAP: Poller[0] [Map 4] 2.conf: ReadData: LINK W2I600-RTR-2, target: /usr/share/cacti/site/rra/w2i600_traffic_in_2940.
rrd on config line 159 had no valid data, according to WeatherMapDataSource_rrd
11/28/2008 11:30:36 AM - WEATHERMAP: Poller[0] DEBUG: [ReadData@Weathermap.class.php:674] [Map 4] 2.conf: ReadData complete for LINK W2I600-RTR-2: 0
0
tomate
Cacti User
Posts: 73
Joined: Mon Jun 05, 2006 5:45 am

Post by tomate »

in fact with the code modification, nothing works at all, so i cancelled the modification
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests