Skip to content

Commit

Permalink
Resolving Issue #95
Browse files Browse the repository at this point in the history
Syslog Hosts and Syslog Programs table looses sync with data
  • Loading branch information
cigamit committed Jun 30, 2019
1 parent 704c4ac commit ed718c2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ The sylog plugin has been in development for well over a decade with increasing
--- develop ---
* issue#90: Can not show correct info when choose device filter in Syslog - Alert Log page
* issue#91: Page become blank after collecting multiple host syslog info
* issue#94: Stored XSS in syslog_removal.php
* issue#94: Stored XSS in syslog_removal.php
* issue#95: Syslog Hosts and Syslog Programs table looses sync with data

--- 2.2 ---
* feature: Allow for reprocess message per rule
Expand Down
6 changes: 3 additions & 3 deletions syslog_process.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,8 +219,8 @@
ON DUPLICATE KEY UPDATE program=VALUES(program), last_updated=NOW()');

syslog_db_execute('INSERT INTO `' . $syslogdb_default . '`.`syslog_hosts`
(host)
SELECT DISTINCT host
(host, last_updated)
SELECT DISTINCT host, NOW() AS last_updated
FROM `' . $syslogdb_default . '`.`syslog_incoming`
WHERE status=' . $uniqueID . '
ON DUPLICATE KEY UPDATE host=VALUES(host), last_updated=NOW()');
Expand Down Expand Up @@ -492,7 +492,7 @@
(logtime, priority_id, facility_id, program_id, host_id, message)
SELECT TIMESTAMP(`' . $syslog_incoming_config['dateField'] . '`, `' . $syslog_incoming_config['timeField'] . '`),
priority_id, facility_id, program_id, host_id, message
FROM (SELECT date, time, priority_id, facility_id, program_id, host_id, message
FROM (SELECT date, time, priority_id, facility_id, sp.program_id, sh.host_id, message
FROM syslog_incoming AS si
INNER JOIN syslog_hosts AS sh
ON sh.host=si.host
Expand Down

0 comments on commit ed718c2

Please sign in to comment.