Unable to add graphs to cacti host

I’m installing the Cacti monitoring plugins. I’ve installed them before without issue, not entirely sure what’s going on this time. In any case, the server is RHEL6, installing both cacti and percona-cacti-templates via RPM. The database is on a separate box, running Percona-Server 5.6.13. I’ve run import_template.php to import the templates, everything passed. I can create a host in cacti. But when I go to add graphs, I get the following message:

Created graph: authdb1 - CPU Usage
ERROR: no Data Source associated. Check Template

At the same time, in my apache error_log, I see:

PHP Notice: Undefined index: local_data_id in /usr/share/cacti/lib/template.php on line 869
PHP Notice: Undefined index: local_data_id in /usr/share/cacti/graphs_new.php on line 206

Any ideas?


Norman Elton

Solved. It wasn’t even specific to the Percona plugins, I noticed that the templates bundled into Cacti also failed. Turns out, there are SQL queries inside Cacti that do not play nicely with ONLY_FULL_GROUP_BY. Ironically, it doesn’t log the query failure anywhere.

I actually whipped up a little Cacti plugin that converts the MySQL connection to a different mode. Alternatively, change the global sql_mode in your my.cnf file.