Ad blocker detected: Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker on our website.
Post general support questions here that do not specifically fall into the Linux or Windows categories.
Moderators: Developers , Moderators
Neoluddite
Posts: 2 Joined: Sat Jun 13, 2015 7:47 am
Post
by Neoluddite » Sat Jun 13, 2015 8:09 am
I have two data sources that are almost identical. They both only receive either a 1 or a 0. Basically and On/Off script. When the poller runs the scripts they get the correct value but when they write to RRD, the Cooling data is wrong. Why is Cooling writing a value of 2752 when is received a 0?
Code: Select all
06/13/2015 08:56:07 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/lib/cacti/rra/localhost_cooling_18.rrd --template Cooling 1434200166:2752
06/13/2015 08:56:07 AM - CMDPHP: Poller[0] Host[1] DS[18] CMD: python /usr/share/cacti/site/scripts/check-ac.py, output: AC:0
06/13/2015 08:56:06 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/lib/cacti/rra/localhost_heat_13.rrd --template Heat 1434200166:0
06/13/2015 08:56:06 AM - POLLER: Poller[0] Parsed MULTI output field 'Heat:0' [map Heat->Heat]
06/13/2015 08:56:06 AM - CMDPHP: Poller[0] Host[1] DS[13] CMD: python /usr/share/cacti/site/scripts/check-heat.py, output: Heat:0
When the script returns a 1 the RRD writes 2753
Code: Select all
06/13/2015 08:24:07 AM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/lib/cacti/rra/localhost_cooling_18.rrd --template Cooling 1434198245:2753
06/13/2015 08:24:07 AM - CMDPHP: Poller[0] Host[1] DS[18] CMD: python /usr/share/cacti/site/scripts/check-ac.py, output: AC:1
Also, how and why is the poller parsing a MULTI output field for Heat? I don't see anything in my configs that would warrant it.
Thanks
Last edited by
Neoluddite on Fri Jun 19, 2015 7:51 pm, edited 1 time in total.
Neoluddite
Posts: 2 Joined: Sat Jun 13, 2015 7:47 am
Post
by Neoluddite » Fri Jun 19, 2015 7:51 pm
So there seems to be a bug in that when Cacti gets a script value that is not large enough for it to know that is to be parsed, it saves all of it as some sort of numeral value. When my script returned just
AC:1 it thought
AC:1 was the value not the
1 .
Code: Select all
06/19/2015 08:44:07 PM - POLLER: Poller[0] CACTI2RRD: /usr/bin/rrdtool update /var/lib/cacti/rra/localhost_cooling_18.rrd --template Cooling 1434761046:1
06/19/2015 08:44:07 PM - POLLER: Poller[0] Parsed MULTI output field 'AirCon:1' [map AirCon->Cooling]
06/19/2015 08:44:07 PM - CMDPHP: Poller[0] Host[1] DS[18] CMD: python /usr/share/cacti/site/scripts/check-ac.py, output: AirCon:1
I rewrote the script to return
AirCon:1 when the AC was running. Cacti was then able to do the MULTI Parsing to the real value I was looking for.
All is now good.
Users browsing this forum: No registered users and 1 guest