I've seem to hit some syslog plugin errors while performing a fresh install of the latest cacti release (0.8.8f) on a CentOS 6.
I'm running cacti on the following environment:
- CentOS 6.7
- Apache 2.2.15
- MariaDB 5.5.47
- PHP 5.4.45 ( 5.4 for compatibility with old plugins)
The cacti install went pretty smooth, so I've started installing the plugins I felt attracted to, and ended up with the following so far:
- Aggregate 0.75
- Monitor 1.3
- Errorimage 0.2
- Settings 0.71
- Loginmod 1.0
- Syslog 1.22
The plugins were grabbed from docs.cacti.net and not the git repositories.
When installing the syslog plugin from the plugin management section, my webserver reports the following error:
Code: Select all
[<obfuscated> 2016] [error] [client <obfuscated>] PHP Notice: Undefined variable: mysqlVersion in <obfuscated>/plugins/syslog/setup.php on line 579, referer: http://<obfuscated>/plugins.php?mode=install&id=syslog
Moving along, everything seems to be in order, syslog is running with syslog-ng, the database gets populated by devices, ok so far.
The problem is, when I try to to create alerts, for example. Whenever I add an alert, everything comes up wrapped in single-quotes, and epoch time set to 0: ...and the following message pops up in my webserver's error log:
Code: Select all
[<obfuscated> 2016] [error] [client <obfuscated>] PHP Notice: Undefined index: 'messagec' in <obfuscated>/plugins/syslog/syslog_alerts.php on line 738, referer: http://<obfuscated>/plugins/syslog/syslog_alerts.php?action=edit
I've also tried to clone the latest syslog plugin from git, but whenever I try to install it, in 0.8.8f the webserver reports:
Code: Select all
[<obfuscated> 2016] [error] [client <obfuscated>] PHP Fatal error: Call to undefined function top_header() in <obfuscated>/plugins/syslog/syslog_alerts.php on line 52, referer: http://<obfuscated>/plugins.php
Thank you!
-tbone
Later edit:
Turning on the cacti logger to debug yields what's going on:
Code: Select all
<obfuscated> PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"INSERT INTO `syslog`.`syslog` (logtime, priority_id, facility_id, host_id, message) SELECT TIMESTAMP(`date`, `time`), priority_id, facility_id, host_id, message FROM (SELECT date, time, priority_id, facility_id, host_id, message FROM syslog_incoming AS si INNER JOIN syslog_facilities AS sf ON sf.facility=si.facility INNER JOIN syslog_priorities AS sp ON sp.priority=si.priority INNER JOIN syslog_hosts AS sh ON sh.host=si.host WHERE status=44) AS merge'
<obfuscated> PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"DELETE FROM `syslog`.`syslog_removed` WHERE logtime < '2015-01-08''
<obfuscated> PM - CMDPHP: Poller[0] ERROR: A DB Exec Failed!, Error:'1146', SQL:"DELETE FROM `syslog`.`syslog` WHERE logtime < '2015-01-08''
<obfuscated> PM - CMDPHP: Poller[0] ERROR: SQL Row Failed!, Error:'1146', SQL:"SHOW CREATE TABLE `syslog`.`syslog`"
Even later edit:
Fixed the missing table, but getting the same behavior without any errors in the webserver or cacti logs. Uninstalling / Reinstalling plugin hasn't helped, truncating tables and choosing normal or partitioned table didn't help either.
Will continue using the same table as cacti, but I'm curious if anyone can find the reason for this behavior.
Cheers,
-tbone