mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-25 18:59:12 +02:00
Fixed a bug in Syslog and Eventlog summary report which consolidated wrong events
when the source filter was used in the report.
This commit is contained in:
parent
cf198caf5a
commit
3a85dd917c
@ -348,9 +348,44 @@ abstract class LogStream {
|
||||
// Parse Filters from string
|
||||
$this->ParseFilters($finalfilters);
|
||||
|
||||
// return success
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Append filter definition for the current stream.
|
||||
*
|
||||
* @param filter object in: filter object
|
||||
* @return integer Error state
|
||||
*/
|
||||
public function AppendFilter($szFilters)
|
||||
{
|
||||
OutputDebugMessage("LogStream|AppendFilter: SetFilter combined = '" . $szFilters . "'. ", DEBUG_DEBUG);
|
||||
|
||||
// Parse Filters from string
|
||||
$this->ParseFilters($szFilters);
|
||||
|
||||
// return success
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove filters for a specific Fieldtype
|
||||
*
|
||||
* @param filter object in: FieldID
|
||||
* @return integer Error state
|
||||
*/
|
||||
public function RemoveFilters($szFieldID)
|
||||
{
|
||||
// Removing Filters for this field!
|
||||
if ( isset($this->_filters[$szFieldID]) )
|
||||
unset($this->_filters[$szFieldID]);
|
||||
|
||||
// return success
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the direction the stream should read data.
|
||||
*
|
||||
|
@ -356,7 +356,9 @@ class Report_eventsummary extends Report {
|
||||
{
|
||||
// Set custom filters
|
||||
$this->_streamObj->ResetFilters();
|
||||
$this->_streamObj->SetFilter( $this->_filterString . " " . $fields[SYSLOG_MESSAGETYPE]['SearchField'] . ":=" . IUT_NT_EventReport . ",=" . IUT_WEVTMONV2 . " " . $fields[SYSLOG_HOST]['SearchField'] . ":=" . $myHost );
|
||||
$this->_streamObj->SetFilter( $this->_filterString . " " . $fields[SYSLOG_MESSAGETYPE]['SearchField'] . ":=" . IUT_NT_EventReport . ",=" . IUT_WEVTMONV2 );
|
||||
$this->_streamObj->RemoveFilters( SYSLOG_HOST );
|
||||
$this->_streamObj->AppendFilter( $fields[SYSLOG_HOST]['SearchField'] . ":=" . $myHost );
|
||||
|
||||
// Set Host Item Basics if not set yet
|
||||
$content["report_consdata"][ $myHost ][SYSLOG_HOST] = $myHost;
|
||||
|
@ -353,7 +353,9 @@ class Report_syslogsummary extends Report {
|
||||
{
|
||||
// Set custom filters
|
||||
$this->_streamObj->ResetFilters();
|
||||
$this->_streamObj->SetFilter( $this->_filterString . " " . $fields[SYSLOG_MESSAGETYPE]['SearchField'] . ":=" . IUT_Syslog . " " . $fields[SYSLOG_HOST]['SearchField'] . ":=" . $myHost );
|
||||
$this->_streamObj->SetFilter( $this->_filterString . " " . $fields[SYSLOG_MESSAGETYPE]['SearchField'] . ":=" . IUT_Syslog );
|
||||
$this->_streamObj->RemoveFilters( SYSLOG_HOST );
|
||||
$this->_streamObj->AppendFilter( $fields[SYSLOG_HOST]['SearchField'] . ":=" . $myHost );
|
||||
|
||||
// Set Host Item Basics if not set yet
|
||||
$content["report_consdata"][ $myHost ][SYSLOG_HOST] = $myHost;
|
||||
|
Loading…
x
Reference in New Issue
Block a user