Skip to content

Commit ed718c2

Browse files
committed
Resolving Issue #95
Syslog Hosts and Syslog Programs table looses sync with data
1 parent 704c4ac commit ed718c2

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ The sylog plugin has been in development for well over a decade with increasing
8080
--- develop ---
8181
* issue#90: Can not show correct info when choose device filter in Syslog - Alert Log page
8282
* issue#91: Page become blank after collecting multiple host syslog info
83-
* issue#94: Stored XSS in syslog_removal.php
83+
* issue#94: Stored XSS in syslog_removal.php
84+
* issue#95: Syslog Hosts and Syslog Programs table looses sync with data
8485

8586
--- 2.2 ---
8687
* feature: Allow for reprocess message per rule

syslog_process.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,8 +219,8 @@
219219
ON DUPLICATE KEY UPDATE program=VALUES(program), last_updated=NOW()');
220220

221221
syslog_db_execute('INSERT INTO `' . $syslogdb_default . '`.`syslog_hosts`
222-
(host)
223-
SELECT DISTINCT host
222+
(host, last_updated)
223+
SELECT DISTINCT host, NOW() AS last_updated
224224
FROM `' . $syslogdb_default . '`.`syslog_incoming`
225225
WHERE status=' . $uniqueID . '
226226
ON DUPLICATE KEY UPDATE host=VALUES(host), last_updated=NOW()');
@@ -492,7 +492,7 @@
492492
(logtime, priority_id, facility_id, program_id, host_id, message)
493493
SELECT TIMESTAMP(`' . $syslog_incoming_config['dateField'] . '`, `' . $syslog_incoming_config['timeField'] . '`),
494494
priority_id, facility_id, program_id, host_id, message
495-
FROM (SELECT date, time, priority_id, facility_id, program_id, host_id, message
495+
FROM (SELECT date, time, priority_id, facility_id, sp.program_id, sh.host_id, message
496496
FROM syslog_incoming AS si
497497
INNER JOIN syslog_hosts AS sh
498498
ON sh.host=si.host

0 commit comments

Comments
 (0)