RRDTool and locale - problem and solution

Support questions about the Network Weather Map plugin

Moderators: Developers, Moderators

Post Reply
wredniak
Posts: 5
Joined: Tue Jul 05, 2005 3:49 am

RRDTool and locale - problem and solution

Post by wredniak »

After upgrading cacti to 0.8.7.d and adding plugin architecture with weathermap I spotted some strange behavior.
Map created had on everyone link value 0

after some digging here is the reason (machine is debian)

Code: Select all

WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:188] [Map 3] internal.conf: RRD ReadData: Running: /usr/bin/rrdtool fetch /var/www/cacti/rra/some_device.rrd AVERAGE --start now-800 --end now
WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:208] [Map 3] internal.conf: > 1235126700: 5,4684722222e+01 8,9018465889e+03
WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:208] [Map 3] internal.conf: > 1235127000: 5,5728321705e+01 7,5843472522e+03
WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:208] [Map 3] internal.conf: > 1235127300: 5,0495422739e+01 7,6813132367e+03
WEATHERMAP: Poller[0] DEBUG: [wmrrd_read_from_real_rrdtool@WeatherMapDataSource_rrd.php:208] [Map 3] internal.conf: > 1235127600: nan nan
rdd returns data "5,0495422739e+01" - 'comma', not the 'dot' as required decimal separator separator

locale used at this system is PL_pl. Problem was resolved after small change in crontab:

Code: Select all

*/5 * * * * cactiuser export LC_NUMERIC=C;php /var/www/cacti/poller.php > /dev/null 2>&1
User avatar
Howie
Cacti Guru User
Posts: 5508
Joined: Thu Sep 16, 2004 5:53 am
Location: United Kingdom
Contact:

Post by Howie »

Someone else had this a while ago. Thanks for the neat solution.

You could also skip rrdtool altogether and use poller_output, which also would avoid the problem.
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!)
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest