Cacti not creating the RRD file

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
fhalsema
Posts: 2
Joined: Fri Mar 24, 2023 6:26 pm

Cacti not creating the RRD file

Post by fhalsema »

I have read a number of postings on Cacti not creating an RRD file. None of them seem applicable. I have Cacti version 1.2.23 running for some time. I added a new data input method based on a local bash shell script. I added a data source Template, a graph template and a new graph. When I use manage->Graph to look at the graph I get the information at the end of this post.

Cacti runs a www-data. I ran my custom script as www-data and it runs fine.

The script is

#!/bin/bash
result=$( /usr/local/nagios/libexec/check_nrpe -H ec2-3-136-4-208.us-east-2.compute.amazonaws.com -c check_jvm_heap)
#echo $result
resultarray=($result)
echo ${resultarray[2]}


The script has 755 permissions and check_nrpe has 777 permissions. The script returns a single number. I have another data source based on a custom script and it works fine.

I have compared the two data sources and I don't see anything missing. In case I missed something, I have deleted and recreated the data source twice. Same problem. I ran with DEBUG on. The only this I see is

"'/var/www/html/cacti/rra/aftercare_prod_afheap_176.rrd': No such file or directory".

I am stuck. Any help would be appreciated. Thank You.


RRDtool Command:
/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start='-86400' \
--end='-300' \
--pango-markup \
--title='Aftercare JVM Free Heap' \
--vertical-label='MB' \
--slope-mode \
--base=1024 \
--height=150 \
--width=500 \
--alt-autoscale \
--upper-limit='100' \
--lower-limit='0' \
COMMENT:"From 2023-03-24 00\:34\:58 To 2023-03-25 00\:29\:58\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='/var/www/html/cacti/rra/aftercare_prod_afheap_176.rrd':'afheap':AVERAGE \
LINE1:a#0000FFFF:
RRDtool Command lengths = 803 characters.
RRDtool Says:
ERROR: opening '/var/www/html/cacti/rra/aftercare_prod_afheap_176.rrd': No such file or directory
fhalsema
Posts: 2
Joined: Fri Mar 24, 2023 6:26 pm

Re: Cacti not creating the RRD file

Post by fhalsema »

I changed owner of /var/www to www-data.www-data. I user the script

Data Source Debug
/usr/bin/rrdtool create \
/var/www/html/cacti/rra/aftercare_prod_acheap3_178.rrd \
--start 0 --step 300 \
DS:acheap3:GAUGE:600:0:U \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MIN:0.5:1:600 \
RRA:MIN:0.5:6:700 \
RRA:MIN:0.5:24:775 \
RRA:MIN:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:600 \
RRA:LAST:0.5:6:700 \
RRA:LAST:0.5:24:775 \
RRA:LAST:0.5:288:797 \


i also found that the Downed device wasn't working so I changed it to none. The file is there and I see data when I manage the data source. Nothing on the graph yet. I will look at that tomorrow
User avatar
TheWitness
Developer
Posts: 16897
Joined: Tue May 14, 2002 5:08 pm
Location: MI, USA
Contact:

Re: Cacti not creating the RRD file

Post by TheWitness »

Under Console > Configuration > Settings > Poller there is a setting to show data collection errors, enable it in Detail level and you will start seeing errors in your Cacti log that should give you a clue.
True understanding begins only when we realize how little we truly understand...

Life is an adventure, let yours begin with Cacti!

Author of dozens of Cacti plugins and customization's. Advocate of LAMP, MariaDB, IBM Spectrum LSF and the world of batch. Creator of IBM Spectrum RTM, author of quite a bit of unpublished work and most of Cacti's bugs.
_________________
Official Cacti Documentation
GitHub Repository with Supported Plugins
Percona Device Packages (no support)
Interesting Device Packages


For those wondering, I'm still here, but lost in the shadows. Yearning for less bugs. Who want's a Cacti 1.3/2.0? Streams anyone?
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests