0

Got a Cacti instance (CactiEZ with cacti 088a) where I successfully graph with number of bespoke data template and corresponding graph template. Theres one specific however case where the RRAs are simply not written out. The OID is correct. with Realtime It graphs correctly but when looking at the graph anywhere else on Cacti (tree/graph management/editing a host/debug mode on the graph) RRDTool "says" ERROR: opening [..] No such file or directory

/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-60 \
--title='HOSTDESCRIPT - Volts' \
--base=1000 \
--height=120 \
--width=500 \
--alt-autoscale-max \
--lower-limit='0' \
--vertical-label='Volts' \
--slope-mode \
--font TITLE:10: \
--font AXIS:8: \
--font LEGEND:8: \
--font UNIT:8: \
DEF:a="/var/www/html/rra/correctfilename.rrd":'lib_100_v':LAST \
--watermark "bla" \
LINE1:a#4444FFFF:""  \
GPRINT:a:LAST:"Last\:%8.2lf%s"  \
GPRINT:a:AVERAGE:"Average\:%8.2lf%s"  \
GPRINT:a:MIN:"Min\:%8.2lf%s"  \
GPRINT:a:MAX:"Max\:%8.2lf%s\n" 

So: Why fail on only one template (which works btw on an older 087c cacti but I've checked and eyeballed the template for 3 days!). Why would Realtime plugin graph it perfectly?

More importantly - whats the difference between the way normal graphing and polling use of templates and how Realtime uses templates? As I think the difference would point to the cause of the issue.

Recct
  • 370
  • 1
  • 3
  • 22

1 Answers1

1

Realtime doesn't use the standard Cacti rra files. It effectively has it's own poller, and it's own temporary RRDtool files with finer detail settings, to support the faster polling. You can see those files in the realtime-cache folder which you would have set up when installing Realtime.

I'd see what happens if you use that command from a shell (replace that first '-' with 'temp.png' or you will get raw PNG data sent to stdout). If rrdtool does produce a PNG then you know that side is OK.

Also check the cacti.log for the DS ID number (the number in the end of the rrd filename) - usually you'll get some information in there if it's trying to write the file.

The Cacti manual's debugging page is actually pretty good for following through what is going on - there are a lot of moving parts, and it's not all obvious!

AnotherHowie
  • 206
  • 3
  • 13
  • Right well that'll be why it works with realtime something in between is different. The RRDtool command from the regular graph debug Does produce a png though – Recct Oct 25 '13 at 15:23
  • So if command-line rrdtool can read the rrd file, and Cacti thinks it doesn't exist... file permissions? Some strange SElinux thing? (try ls -l --context and see if it matches other rrd files) – AnotherHowie Oct 26 '13 at 07:41
  • Hold on I dont think my comment there makes sense. I've ran commands with the rrd parameters for such graphs into a img file specified by me which worked that is no errors in CDEFs or w/e. There are no .rra files for those graphs they do not exist at all, never created. – Recct Oct 26 '13 at 19:55
  • Then I think you need to delete and recreate the graph in cacti. I believe it only tries to create the rrd once, when you first create the graph (or the poller cycle straight after that, even). – AnotherHowie Oct 27 '13 at 13:39
  • I must've done that more than 10 times, also after changing one parameter at a time in the templates to see get to the cause.. – Recct Oct 28 '13 at 09:42
  • and if you create a new graph with any other template, it works? (thinking about permissions for the rra folder) – AnotherHowie Oct 28 '13 at 12:49
  • yeah yeah every other template works, have been for days, since the start. I had the log level on debug one time when I deleted all of this type of graph, I added a new one looking at the log I don't think there were any errors but there was no rrd update statement as well – Recct Oct 28 '13 at 14:09