|
|
| Author |
Message |
tomate
Joined: 05 Jun 2006 Posts: 48
|
Posted: Thu Nov 27, 2008 9:00 am Post subject: Map generated only manually - SOLVED SEE PAGE 3 |
|
|
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 :
| Quote: | 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 |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2252 Location: United Kingdom
|
Posted: Thu Nov 27, 2008 10:01 am Post subject: |
|
|
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'. |
|
| Back to top |
|
 |
tomate
Joined: 05 Jun 2006 Posts: 48
|
Posted: Thu Nov 27, 2008 11:05 am Post subject: |
|
|
| 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 |
|
| Back to top |
|
 |
tomate
Joined: 05 Jun 2006 Posts: 48
|
Posted: Thu Nov 27, 2008 11:22 am Post subject: |
|
|
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 |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2252 Location: United Kingdom
|
Posted: Thu Nov 27, 2008 11:42 am Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
tomate
Joined: 05 Jun 2006 Posts: 48
|
Posted: Thu Nov 27, 2008 12:00 pm Post subject: |
|
|
| 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 ?
| Quote: | 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 |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2252 Location: United Kingdom
|
Posted: Thu Nov 27, 2008 12:05 pm Post subject: |
|
|
| 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. |
|
| Back to top |
|
 |
tomate
Joined: 05 Jun 2006 Posts: 48
|
Posted: Fri Nov 28, 2008 2:06 am Post subject: |
|
|
| 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 :
| Quote: | 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 |
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2252 Location: United Kingdom
|
Posted: Fri Nov 28, 2008 3:27 am Post subject: |
|
|
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. |
|
| Back to top |
|
 |
tomate
Joined: 05 Jun 2006 Posts: 48
|
Posted: Fri Nov 28, 2008 4:00 am Post subject: |
|
|
ok i ran a manual generation, but i do not have the same logs
nothing about values
only lines like those :
| Quote: | 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] |
|
|
| Back to top |
|
 |
Howie Cacti Guru User
Joined: 16 Sep 2004 Posts: 2252 Location: United Kingdom
|
Posted: Fri Nov 28, 2008 4:28 am Post subject: |
|
|
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 . |
|
| Back to top |
|
 |
tomate
Joined: 05 Jun 2006 Posts: 48
|
Posted: Fri Nov 28, 2008 4:51 am Post subject: |
|
|
| 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  |
|
| Back to top |
|
 |
tomate
Joined: 05 Jun 2006 Posts: 48
|
Posted: Fri Nov 28, 2008 5:04 am Post subject: |
|
|
i only find the line on line 243
i replaced but still the same problem  |
|
| Back to top |
|
 |
tomate
Joined: 05 Jun 2006 Posts: 48
|
Posted: Fri Nov 28, 2008 5:24 am Post subject: |
|
|
i seee now numbers with '.' :
| Quote: | 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 :
| Quote: | 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
|
|
|
| Back to top |
|
 |
tomate
Joined: 05 Jun 2006 Posts: 48
|
Posted: Fri Nov 28, 2008 5:30 am Post subject: |
|
|
| in fact with the code modification, nothing works at all, so i cancelled the modification |
|
| Back to top |
|
 |
|