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
@ -344,13 +344,48 @@ abstract class LogStream {
|
|||||||
|
|
||||||
// Reset Filters first to make sure we do not add multiple filters!
|
// Reset Filters first to make sure we do not add multiple filters!
|
||||||
$this->_filters = null;
|
$this->_filters = null;
|
||||||
|
|
||||||
// Parse Filters from string
|
// Parse Filters from string
|
||||||
$this->ParseFilters($finalfilters);
|
$this->ParseFilters($finalfilters);
|
||||||
|
|
||||||
|
// return success
|
||||||
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.
|
* Set the direction the stream should read data.
|
||||||
*
|
*
|
||||||
|
@ -356,7 +356,9 @@ class Report_eventsummary extends Report {
|
|||||||
{
|
{
|
||||||
// Set custom filters
|
// Set custom filters
|
||||||
$this->_streamObj->ResetFilters();
|
$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
|
// Set Host Item Basics if not set yet
|
||||||
$content["report_consdata"][ $myHost ][SYSLOG_HOST] = $myHost;
|
$content["report_consdata"][ $myHost ][SYSLOG_HOST] = $myHost;
|
||||||
|
@ -353,7 +353,9 @@ class Report_syslogsummary extends Report {
|
|||||||
{
|
{
|
||||||
// Set custom filters
|
// Set custom filters
|
||||||
$this->_streamObj->ResetFilters();
|
$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
|
// Set Host Item Basics if not set yet
|
||||||
$content["report_consdata"][ $myHost ][SYSLOG_HOST] = $myHost;
|
$content["report_consdata"][ $myHost ][SYSLOG_HOST] = $myHost;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user