Cacti / plugin_syslog

Syslog Plugin for Cacti
GNU General Public License v2.0
21 stars 16 forks source link

Export of rules does not work when using db other than Cacti. #117

Closed jdcoats closed 4 years ago

jdcoats commented 4 years ago
2020/03/09 14:32:17 - CMDPHP SQL Backtrace: (/plugins/syslog/syslog_removal.php[67]:removal_export(), /plugins/syslog/syslog_removal.php[261]:db_fetch_row_prepared(), /lib/database.php[445]:db_execute_prepared())
--
2020/03/09 14:32:17 - CMDPHP ERROR: A DB Row Failed!, Error: Table 'cacti.syslog_remove' doesn't exist

2020/03/09 14:30:28 - CMDPHP SQL Backtrace: (/plugins/syslog/syslog_alerts.php[57]:alert_export(), /plugins/syslog/syslog_alerts.php[238]:db_fetch_row_prepared(), /lib/database.php[445]:db_execute_prepared())
--
2020/03/09 14:30:28 - CMDPHP ERROR: A DB Row Failed!, Error: Table 'cacti.syslog_alert' doesn't exist
TheWitness commented 4 years ago

I've fixed this. Please confirm, and then we will push another release.

jdcoats commented 4 years ago

Confirmed to be working now. There are 2 new errors thrown though.


2020/03/10 09:26:51 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/syslog/syslog_removal.php[26]:include(), /include/auth.php[28]:require_once(), /include/global.php[496]:include_once(), /include/csrf.php[31]:include_once(), /include/vendor/csrf/csrf-magic.php[580]:csrf_check(), /include/vendor/csrf/csrf-magic.php[88]:CactiErrorHandler())
--
2020/03/10 09:26:51 - ERROR PHP NOTICE: Array to string conversion in file: /var/www/localhost/htdocs/cacti/include/vendor/csrf/csrf-magic.php on line: 88

and


2020/03/10 09:25:28 - CMDPHP SQL Backtrace: (/plugins/syslog/syslog_process.php[501]:syslog_db_execute(), /plugins/syslog/database.php[57]:db_execute(), /lib/database.php[210]:db_execute_prepared())
--
2020/03/10 09:25:28 - CMDPHP ERROR: A DB Exec Failed!, Error: Unknown column 'date' in 'field list'
TheWitness commented 4 years ago

The first you need to update the entire csrf vendor library from branch 1.2.x, and the second, your syslog_process.php is out of date. Might as well take the whole syslog plugin directory. BTW, test the latest hmib too.

jdcoats commented 4 years ago

I am running 1.2.10, It does not appear that CSF has updated since? I did pull the entire develop.zip of syslog


2020/03/10 09:53:49 - CMDPHP PHP ERROR NOTICE Backtrace: (/plugins/syslog/syslog_removal.php[26]:include(), /include/auth.php[28]:require_once(), /include/global.php[496]:include_once(), /include/csrf.php[31]:include_once(), /include/vendor/csrf/csrf-magic.php[580]:csrf_check(), /include/vendor/csrf/csrf-magic.php[88]:CactiErrorHandler())
--
2020/03/10 09:53:49 - ERROR PHP NOTICE: Array to string conversion in file: /var/www/localhost/htdocs/cacti/include/vendor/csrf/csrf-magic.php on line: 88
TheWitness commented 4 years ago

@jdcoats, csrf-magic.php was updated two days ago.

jdcoats commented 4 years ago

Thanks! All fixed up. As for the hmib plugin, the export works but filtering for Unknown still does not function.

TheWitness commented 4 years ago

Upload a screen2gif of the unknown issue.

jdcoats commented 4 years ago

Couldn’t re-open hmib issue 19 so I created new hmib issue 23 with screenshots.

Thanks! Dan