I am using the following perl script as a data input method.
Code: Select all
perl /usr/share/cacti/site/scripts/fhem-getstate.pl -s 'localhost' -d 'Libelium_1'
Now from this I would want to graph the following numbers using the Gauge setting in the graph template (this is the one which is supposed to tolerate floats):01_frame_number:2 01_frame_type:128 01_id:1 01_id_secret:403470039 01_parser_type:1 01_sync:0 01_value:7.16 02_frame_number:2 02_frame_type:128 02_id:2 02_id_secret:403470039 02_parser_type:1 02_sync:0 02_value:66.7 03_frame_number:2 03_frame_type:128 03_id:3 03_id_secret:403470039 03_parser_type:1 03_sync:0 03_value:12.20 04_frame_number:2 04_frame_type:128 04_id:4 04_id_secret:403470039 04_parser_type:1 04_sync:0 04_value:10.30 05_frame_number:2 05_frame_type:128 05_id:5 05_id_secret:403470039 05_parser_type:1 05_sync:0 05_value:8.31 06_frame_number:2 06_frame_type:128 06_id:6 06_id_secret:403470039 06_parser_type:1 06_sync:0 06_value:3436.43 07_frame_number:2 07_frame_type:128 07_id:7 07_id_secret:403470039 07_parser_type:1 07_sync:0 07_value:0.000
02_value:66.7
06_value:3436.43
07_value:0.000
Strange enough only 02_value gives me a curve and numbers. Both 06_value and 07_value appear as NaN in both the graph and in the rrd-file.
This is the RRDTool command:
Code: Select all
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start='-86400' \
--end='-300' \
--pango-markup \
--title='FHEM Libelium Humidity' \
--vertical-label='Relative Humidity (%)' \
--slope-mode \
--base=1000 \
--height=200 \
--width=700 \
--alt-autoscale \
COMMENT:"From 2020/03/12 16\:28\:42 To 2020/03/13 16\:23\:42\c" \
COMMENT:" \n" \
--color BACK#F3F3F3 \
--color CANVAS#FDFDFD \
--color SHADEA#CBCBCB \
--color SHADEB#999999 \
--color FONT#000000 \
--color AXIS#2C4D43 \
--color ARROW#2C4D43 \
--color FRAME#2C4D43 \
--border 1 --font TITLE:11:'Arial' \
--font AXIS:8:'Arial' \
--font LEGEND:8:'Courier' \
--font UNIT:8:'Arial' \
--font WATERMARK:6:'Arial' \
--slope-mode \
--watermark 'Generated by Cacti®' \
DEF:a='/usr/share/cacti/site/rra/local_linux_machine_lw_60.rrd':'HUMB':AVERAGE \
DEF:b='/usr/share/cacti/site/rra/local_linux_machine_lw_60.rrd':'SOIL':AVERAGE \
DEF:c='/usr/share/cacti/site/rra/local_linux_machine_lw_60.rrd':'LW':AVERAGE \
CDEF:cdefh='b,550,-,137.5,/' \
COMMENT:'\t\t\tMinimum\t\t\tCurrent\t\t\tAverage\t\t\tMaximum\n' \
COMMENT:' -------------------------------------------------------------------------------\n' \
LINE1:a#0000FFFF:'Luft\: ' \
GPRINT:a:LAST:'\t%8.2lf%s ' \
GPRINT:a:MIN:'\t%12.2lf' \
GPRINT:a:AVERAGE:'\t%12.2lf' \
GPRINT:a:MAX:'\t%12.2lf\n' \
LINE1:cdefh#A0CFECFF:'Erde\: ' \
GPRINT:cdefh:LAST:'\t%8.2lf%s ' \
GPRINT:cdefh:MIN:'\t%12.2lf' \
GPRINT:cdefh:AVERAGE:'\t%12.2lf' \
GPRINT:cdefh:MAX:'\t%12.2lf\n' \
LINE1:c#3090C7FF:'Blatt\:' \
GPRINT:c:LAST:' \t%8.2lf%s ' \
GPRINT:c:MIN:' \t%12.2lf' \
GPRINT:c:AVERAGE:' \t%12.2lf' \
GPRINT:c:MAX:' \t%12.2lf\n'
RRDtool Says:
OK