Cacti / cacti

Cacti ™
http://www.cacti.net
GNU General Public License v2.0
1.61k stars 399 forks source link

RRD files not created for several types of graphs #925

Closed Vladontheroad closed 6 years ago

Vladontheroad commented 6 years ago

Hi,

Upgraded to Cacti v1.1.17 a few days ago, some graph template seems to be bugged. I can't say if it was working in a previous version as I never used this graph template until now.

Symptoms No RRD file created when creating some specific new kind of graphs. Concerned graph templates types are the following:

Graph debug mode always say something like:

RRDTool Says: ERROR: opening '/app/cacti-1.1.17/rra/[...]': No such file or directory

This problem does NOT occur if I create a "In/Out Bytes" graph. All tests where done on a single Device and single Interface in Cacti.

Problem reproduction 1) I choose a device, click "Create graph for this device", select the switch interface I want to monitor, then select "In/Out Non-Unicast" graph type, then click Create 2) The graph is created and listed for this device in the Console >Management > Graphs panel, with ID 4943 in my case 3) Click on the item, an turn on "Graph Debug Mode". I get an RRD error:

RRDTool Command: /app/rrdtool/bin/rrdtool graph - \ --imgformat=PNG \ --start='-180000' \ --end='-300' \ --pango-markup \ --title='sr-csb-lan-01-lan - NX-0S - Non-Unicast Packets - port-channel1512' \ --vertical-label='packets/sec' \ --slope-mode \ --base=1000 \ --height=120 \ --width=500 \ --tabwidth '30' \ --rigid \ --alt-autoscale-max \ --lower-limit='0' \ --border 1 --slope-mode \ --watermark 'Generated by Cacti®' \ DEF:a='/app/cacti-1.1.17/rra/sr-csb-lan-01-lan_-_nx-0s_nonunicast_out_5318.rrd':'nonunicastin':AVERAGE \ DEF:b='/app/cacti-1.1.17/rra/sr-csb-lan-01-lan-_nx-0s_nonunicast_out_5318.rrd':'nonunicastout':AVERAGE \ CDEF:cdefj='a,UN,INF,UNKN,IF' \ AREA:a#FFF200FF:'Non-Unicast Packets In ' \ GPRINT:a:LAST:'Current\:%8.2lf %s' \ GPRINT:a:AVERAGE:'Average\:%8.2lf %s' \ GPRINT:a:MAX:'Maximum\:%8.2lf %s\n' \ LINE1:b#FFF200FF:'Non-Unicast Packets Out' \ GPRINT:b:LAST:'Current\:%8.2lf %s' \ GPRINT:b:AVERAGE:'Average\:%8.2lf %s' \ GPRINT:b:MAX:'Maximum\:%8.2lf %s\n' \ COMMENT:'Graph Last Updated\:Wed 23 Aug 15\:44\:02 CEST 2017\n' \ AREA:cdefj#8F9286FF:'' RRDTool Says: ERROR: opening '/app/cacti-1.1.17/rra/sr-csb-lan-01-lan-_nx-0s_nonunicast_out_5318.rrd': No such file or directory

cigamit commented 6 years ago

Was this an upgrade or new install? Also, did you update any Templates from external sources?

Vladontheroad commented 6 years ago

I confirm this doesn't happen on a fresh install. I still wasn't able to pinpoint the root cause so don't know if that entry should be closed.

cigamit commented 6 years ago

Check the data source profile id of the data template and verify that it's something other than zero. Then, if it is something other than zero, take a dump of the database, save the data template, and then take another dump of the database. If saving the data template fixes this, then attach the two dumps to this ticket. You might want to pear things down a little (aka setup a separate server with only on device using your backup).

cigamit commented 6 years ago

Closing due to lack of feedback/updates.