Hello,
When you create a rule to remove messages from a 'host', there is a missing precision on a SQL query, that cause an error.
The following message is the error:
28/11/2023 09:47:16 - CMDPHP SQL Backtrace: (/plugins/syslog/syslog_process.php[191]:syslog_remove_items(), /plugins/syslog/functions.php[619]:syslog_db_execute(), /plugins/syslog/database.php[69]:db_execute(), /lib/database.php[362]:db_execute_prepared())
28/11/2023 09:47:16 - CMDPHP ERROR: A DB Exec Failed!, Error: Column 'host' in where clause is ambiguous
The following is just a print of the event during the insert who provoke the previous error message.
28/11/2023 09:47:16 - SYSLOG error mysql: INSERT INTO `syslog`.`syslog_removed` (logtime, priority_id, facility_id, program_id, host_id, message) SELECT logtime, priority_id, facility_id, program_id, host_id, message FROM (SELECT si.logtime, si.priority_id, si.facility_id, spg.program_id, sh.host_id, si.message FROM `syslog`.`syslog_incoming` AS si INNER JOIN `syslog`.`syslog_facilities` AS sf ON sf.facility_id = si.facility_id INNER JOIN `syslog`.`syslog_priorities` AS sp ON sp.priority_id = si.priority_id INNER JOIN `syslog`.`syslog_programs` AS spg ON spg.program = si.program INNER JOIN `syslog`.`syslog_hosts` AS sh ON sh.host = si.host WHERE host = 'lslcacp02' AND `status` = 46 ) AS merge
And the error come on line 418 of function.php where the 'host' after the WHERE should be 'si.host' instead of just 'host'
It's on the current version 4.1, dev branch.
Hello, When you create a rule to remove messages from a 'host', there is a missing precision on a SQL query, that cause an error.
The following message is the error:
The following is just a print of the event during the insert who provoke the previous error message.
And the error come on line 418 of function.php where the 'host' after the WHERE should be 'si.host' instead of just 'host' It's on the current version 4.1, dev branch.