Sometime recently (possibly with 1.3?) rrdtool appears to have started to honour the locale set on the host computer. This results in numbers being output as 4,5 instead of 4.5, for example. Weathermap 0.96 had a couple of changes to allow for this format in the regexp that looks for valid output from rrdtool.
However, it turns out that PHP doesn't honour the locale settings in floatval() even though it does in sprintf(). There will need to be another patch to make Weathermap work properly on locales that use a comma as a decimal point. A temporary fix is to for the local for the process that runs weathermap (either the cacti poller, or the weathermap command-line), by setting some environment variables. In bash, you do this:
LC_ALL=en_US LANG=en_US php poller.php (or your normal commandline)
and that command only will run in the US locale.
- Howie's blog
- Login or register to post comments