diff --git a/src/classes/logstream.class.php b/src/classes/logstream.class.php
index ed5f65d..728562c 100644
--- a/src/classes/logstream.class.php
+++ b/src/classes/logstream.class.php
@@ -207,7 +207,7 @@ abstract class LogStream {
*
* @return integer Error stat
*/
- public abstract function ConsolidateDataByField($szConsFieldId, $nRecordLimit, $szSortFieldId, $nSortingOrder, $bIncludeLogStreamFields = false);
+ public abstract function ConsolidateDataByField($szConsFieldId, $nRecordLimit, $szSortFieldId, $nSortingOrder, $bIncludeLogStreamFields = false, $bIncludeMinMaxDateFields = false);
/**
@@ -252,6 +252,11 @@ abstract class LogStream {
public abstract function SaveMessageChecksum( $arrProperitesIn );
+ /*
+ * Helper function for logstream classes to clear filter based stuff
+ */
+ public abstract function ResetFilters( );
+
/*
* Helper functino to trigger initialisation of MsgParsers
*/
@@ -276,6 +281,9 @@ abstract class LogStream {
OutputDebugMessage("SetFilter combined = '" . $finalfilters . "'. ", DEBUG_DEBUG);
+ // Reset Filters first to make sure we do not add multiple filters!
+ $this->_filters = null;
+
// Parse Filters from string
$this->ParseFilters($finalfilters);
@@ -585,6 +593,23 @@ abstract class LogStream {
return null;
}
+ /*
+ * Helper function to get the internal Field ID by database field name!
+ */
+ public function GetFieldIDbyDatabaseMapping($szTableType, $szFieldName)
+ {
+ global $content, $dbmapping;
+
+ foreach( $dbmapping[$szTableType]['DBMAPPINGS'] as $myFieldID => $myDBMapping )
+ {
+ if ( $myDBMapping == $szFieldName )
+ return $myFieldID;
+ }
+
+ // Default return!
+ return $szFieldName;
+ }
+
/*
* --- PIRVATE HELPERS!
*/
@@ -1182,7 +1207,5 @@ abstract class LogStream {
return -1;
}
-
-
}
?>
\ No newline at end of file
diff --git a/src/classes/logstreamdb.class.php b/src/classes/logstreamdb.class.php
index 10e9ca2..598ccca 100644
--- a/src/classes/logstreamdb.class.php
+++ b/src/classes/logstreamdb.class.php
@@ -112,6 +112,15 @@ class LogStreamDB extends LogStream {
return SUCCESS;
}
+ /*
+ * Helper function to clear the current querystring!
+ */
+ public function ResetFilters()
+ {
+ // Clear _SQLwhereClause variable!
+ $this->_SQLwhereClause = "";
+ }
+
/**
* Close the database connection.
*
@@ -744,7 +753,7 @@ class LogStreamDB extends LogStream {
*
* @return integer Error stat
*/
- public function ConsolidateDataByField($szConsFieldId, $nRecordLimit, $szSortFieldId, $nSortingOrder, $aIncludeCustomFields = null, $bIncludeLogStreamFields = false)
+ public function ConsolidateDataByField($szConsFieldId, $nRecordLimit, $szSortFieldId, $nSortingOrder, $aIncludeCustomFields = null, $bIncludeLogStreamFields = false, $bIncludeMinMaxDateFields = false)
{
global $content, $dbmapping, $fields;
@@ -793,13 +802,20 @@ class LogStreamDB extends LogStream {
}
else // Only Include ConsolidateField
$myDBQueryFields = $myDBConsFieldName . ", ";
-
+
+ // Add Min and Max fields for DATE if desired
+ if ( $bIncludeMinMaxDateFields )
+ {
+ $myDBQueryFields .= "Min(" . $dbmapping[$szTableType]['DBMAPPINGS'][SYSLOG_DATE] . ") as FirstOccurrence_Date, ";
+ $myDBQueryFields .= "Max(" . $dbmapping[$szTableType]['DBMAPPINGS'][SYSLOG_DATE] . ") as LastOccurrence_Date, ";
+ }
+
if ( $szConsFieldId == $szSortFieldId )
$myDBSortedFieldName = "ItemCount";
else
$myDBSortedFieldName = $szSortFieldId;
// ---
-
+
// Special handling for date fields
if ( $nConsFieldType == FILTER_TYPE_DATE )
{
@@ -815,7 +831,7 @@ class LogStreamDB extends LogStream {
$szLimitSql = "";
// Create SQL Where Clause!
- if ( $this->_SQLwhereClause == "" )
+ if ( strlen($this->_SQLwhereClause) <= 0 )
{
$res = $this->CreateSQLWhereClause();
if ( $res != SUCCESS )
@@ -832,11 +848,14 @@ class LogStreamDB extends LogStream {
" ORDER BY " . $myDBSortedFieldName . " " . $szSortingOrder .
$szLimitSql ;
+ // Output Debug Informations
+ OutputDebugMessage("LogStreamDB|ConsolidateDataByField: Running Created SQL Query:
" . $szSql, DEBUG_DEBUG);
+
// Perform Database Query
$myquery = mysql_query($szSql, $this->_dbhandle);
if ( !$myquery )
return ERROR_DB_QUERYFAILED;
-
+
// Initialize Array variable
$aResult = array();
@@ -848,12 +867,17 @@ class LogStreamDB extends LogStream {
foreach ( $myRow as $myFieldName => $myFieldValue )
{
- if ( $myFieldName == $dbmapping[$szTableType]['DBMAPPINGS'][$szConsFieldId] )
+ $myFieldID = $this->GetFieldIDbyDatabaseMapping($szTableType, $myFieldName);
+ $aNewRow[ $myFieldID ] = $myFieldValue;
+
+/* if ( $myFieldName == $dbmapping[$szTableType]['DBMAPPINGS'][$szConsFieldId] )
$aNewRow[$szConsFieldId] = $myFieldValue;
else
+ {
$aNewRow[$myFieldName] = $myFieldValue;
+*/
+// }
}
-
// Add new row to result
$aResult[] = $aNewRow;
}
@@ -865,7 +889,6 @@ class LogStreamDB extends LogStream {
return ERROR_NOMORERECORDS;
}
-
/**
* Implementation of GetCountSortedByField
*
@@ -939,6 +962,7 @@ class LogStreamDB extends LogStream {
}
+
/*
* ============= Beginn of private functions =============
*/
diff --git a/src/classes/reports/report.syslog.syslogsummary.class.php b/src/classes/reports/report.syslog.syslogsummary.class.php
index 65386d7..6dd1177 100644
--- a/src/classes/reports/report.syslog.syslogsummary.class.php
+++ b/src/classes/reports/report.syslog.syslogsummary.class.php
@@ -293,148 +293,191 @@ class Report_syslogsummary extends Report {
*/
private function ConsolidateSyslogmessagesPerHost( $arrHosts )
{
- global $content, $gl_starttime;
+ global $content, $gl_starttime, $fields;
// Now open the stream for data processing
$res = $this->_streamObj->Open( $this->_arrProperties, true );
if ( $res == SUCCESS )
{
- // Set reading direction
-// $this->_streamObj->SetReadDirection( EnumReadDirection::Backward );
-
- // Init uid helper
- $uID = UID_UNKNOWN;
-
- // Set position to BEGIN of FILE
- $this->_streamObj->Sseek($uID, EnumSeek::BOS, 0);
-
- // Start reading data
- $ret = $this->_streamObj->Read($uID, $logArray);
-
+ if ( true )
+ {
+ // --- New Method to consolidate data!
// TimeStats
$nowtime = microtime_float();
$content["report_rendertime"] .= number_format($nowtime - $gl_starttime, 2, '.', '') . "s ";
- // Found first data record
- if ( $ret == SUCCESS )
+ foreach ( $arrHosts as $myHost )
{
- do
+ // Set custom filters
+ $this->_streamObj->ResetFilters();
+ $this->_streamObj->SetFilter( $this->_filterString . " " . $fields[SYSLOG_MESSAGETYPE]['SearchField'] . ":=" . IUT_Syslog . " " . $fields[SYSLOG_HOST]['SearchField'] . ":=" . $myHost );
+
+ // Set Host Item Basics if not set yet
+ $content["report_consdata"][ $myHost ][SYSLOG_HOST] = $myHost;
+
+ // Get Data for single host
+ $content["report_consdata"][ $myHost ]['cons_msgs'] = $this->_streamObj->ConsolidateDataByField( MISC_CHECKSUM, $this->_maxMsgsPerHost, MISC_CHECKSUM, SORTING_ORDER_DESC, null, true, true );
+
+ //print_r ($fields[SYSLOG_MESSAGE]);
+ foreach ( $content["report_consdata"][ $myHost ]['cons_msgs'] as &$myConsData )
{
- // Check if Event from host is in our hosts array
- if ( in_array($logArray[SYSLOG_HOST], $arrHosts) )
+ // Set Basic data entries
+ if (!isset( $content['filter_facility_list'][$myConsData[SYSLOG_FACILITY]] ))
+ $myConsData[SYSLOG_FACILITY] = SYSLOG_LOCAL0; // Set default in this case
+ if (!isset( $content['filter_severity_list'][$myConsData[SYSLOG_SEVERITY]] ))
+ $myConsData[SYSLOG_SEVERITY] = SYSLOG_NOTICE; // Set default in this case
+
+ // Set Counter and First/Last Event date
+ $myConsData['FirstOccurrence_Date'] = $myConsData[SYSLOG_DATE];
+ $myConsData['LastOccurrence_Date'] = $myConsData[SYSLOG_DATE];
+ }
+
+ }
+
+ // TimeStats
+ $nowtime = microtime_float();
+ $content["report_rendertime"] .= number_format($nowtime - $gl_starttime, 2, '.', '') . "s ";
+ // ---
+ }
+ else
+ {
+ // --- Old Method!
+ // Init uid helper
+ $uID = UID_UNKNOWN;
+
+ // Set position to BEGIN of FILE
+ $this->_streamObj->Sseek($uID, EnumSeek::BOS, 0);
+
+ // Start reading data
+ $ret = $this->_streamObj->Read($uID, $logArray);
+
+ // TimeStats
+ $nowtime = microtime_float();
+ $content["report_rendertime"] .= number_format($nowtime - $gl_starttime, 2, '.', '') . "s ";
+
+ // Found first data record
+ if ( $ret == SUCCESS )
+ {
+ do
{
- // Set Host Item Basics if not set yet
- if ( !isset($content["report_consdata"][ $logArray[SYSLOG_HOST] ][SYSLOG_HOST]) )
+ // Check if Event from host is in our hosts array
+ if ( in_array($logArray[SYSLOG_HOST], $arrHosts) )
{
- $content["report_consdata"][ $logArray[SYSLOG_HOST] ][SYSLOG_HOST] = $logArray[SYSLOG_HOST];
- }
+ // Set Host Item Basics if not set yet
+ if ( !isset($content["report_consdata"][ $logArray[SYSLOG_HOST] ][SYSLOG_HOST]) )
+ {
+ $content["report_consdata"][ $logArray[SYSLOG_HOST] ][SYSLOG_HOST] = $logArray[SYSLOG_HOST];
+ }
- // Calc checksum
- if ( !isset($logArray[MISC_CHECKSUM]) || $logArray[MISC_CHECKSUM] == 0 )
- {
- // Calc crc32 from message, we use this as index
- $logArray[MISC_CHECKSUM] = crc32( $logArray[SYSLOG_MESSAGE] ); // Maybe useful somewhere else: sprintf( "%u", crc32 ( $logArray[SYSLOG_MESSAGE] ));
- $strChecksum = $logArray[MISC_CHECKSUM];
+ // Calc checksum
+ if ( !isset($logArray[MISC_CHECKSUM]) || $logArray[MISC_CHECKSUM] == 0 )
+ {
+ // Calc crc32 from message, we use this as index
+ $logArray[MISC_CHECKSUM] = crc32( $logArray[SYSLOG_MESSAGE] ); // Maybe useful somewhere else: sprintf( "%u", crc32 ( $logArray[SYSLOG_MESSAGE] ));
+ $strChecksum = $logArray[MISC_CHECKSUM];
- // Save calculated Checksum into DB!
- $this->_streamObj->SaveMessageChecksum($logArray);
- }
- else // Get checksum
- $strChecksum = $logArray[MISC_CHECKSUM];
+ // Save calculated Checksum into DB!
+ $this->_streamObj->SaveMessageChecksum($logArray);
+ }
+ else // Get checksum
+ $strChecksum = $logArray[MISC_CHECKSUM];
- // Check if entry exists in result array
- if ( isset($content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ]) )
- {
- // Increment counter and set First/Last Event date
- $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ]['ItemCount']++;
-
- // Set FirstEvent date if necessary!
- if ( $logArray[SYSLOG_DATE][EVTIME_TIMESTAMP] < $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ]['FirstOccurrence_Date'][EVTIME_TIMESTAMP] )
- $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ]['FirstOccurrence_Date'] = $logArray[SYSLOG_DATE];
+ // Check if entry exists in result array
+ if ( isset($content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ]) )
+ {
+ // Increment counter and set First/Last Event date
+ $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ]['ItemCount']++;
+
+ // Set FirstEvent date if necessary!
+ if ( $logArray[SYSLOG_DATE][EVTIME_TIMESTAMP] < $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ]['FirstOccurrence_Date'][EVTIME_TIMESTAMP] )
+ $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ]['FirstOccurrence_Date'] = $logArray[SYSLOG_DATE];
- // Set LastEvent date if necessary!
- if ( $logArray[SYSLOG_DATE][EVTIME_TIMESTAMP] > $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ]['LastOccurrence_Date'][EVTIME_TIMESTAMP] )
+ // Set LastEvent date if necessary!
+ if ( $logArray[SYSLOG_DATE][EVTIME_TIMESTAMP] > $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ]['LastOccurrence_Date'][EVTIME_TIMESTAMP] )
+ $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ]['LastOccurrence_Date'] = $logArray[SYSLOG_DATE];
+ }
+ else
+ {
+ // Set Basic data entries
+ if (isset( $content['filter_facility_list'][$logArray[SYSLOG_FACILITY]] ))
+ $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ][SYSLOG_FACILITY] = $logArray[SYSLOG_FACILITY];
+ else
+ $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ][SYSLOG_FACILITY] = SYSLOG_LOCAL0; // Set default in this case
+ if (isset( $content['filter_severity_list'][$logArray[SYSLOG_SEVERITY]] ))
+ $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ][SYSLOG_SEVERITY] = $logArray[SYSLOG_SEVERITY];
+ else
+ $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ][SYSLOG_SEVERITY] = SYSLOG_NOTICE; // Set default in this case
+ $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ][SYSLOG_SYSLOGTAG] = $logArray[SYSLOG_SYSLOGTAG];
+ $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ][SYSLOG_MESSAGE] = $logArray[SYSLOG_MESSAGE];
+
+ // Set Counter and First/Last Event date
+ $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ]['ItemCount'] = 1;
+ $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ]['FirstOccurrence_Date'] = $logArray[SYSLOG_DATE];
$content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ]['LastOccurrence_Date'] = $logArray[SYSLOG_DATE];
+ }
}
- else
- {
- // Set Basic data entries
- if (isset( $content['filter_facility_list'][$logArray[SYSLOG_FACILITY]] ))
- $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ][SYSLOG_FACILITY] = $logArray[SYSLOG_FACILITY];
- else
- $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ][SYSLOG_FACILITY] = SYSLOG_LOCAL0; // Set default in this case
- if (isset( $content['filter_severity_list'][$logArray[SYSLOG_SEVERITY]] ))
- $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ][SYSLOG_SEVERITY] = $logArray[SYSLOG_SEVERITY];
- else
- $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ][SYSLOG_SEVERITY] = SYSLOG_NOTICE; // Set default in this case
- $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ][SYSLOG_SYSLOGTAG] = $logArray[SYSLOG_SYSLOGTAG];
- $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ][SYSLOG_MESSAGE] = $logArray[SYSLOG_MESSAGE];
- // Set Counter and First/Last Event date
- $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ]['ItemCount'] = 1;
- $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ]['FirstOccurrence_Date'] = $logArray[SYSLOG_DATE];
- $content["report_consdata"][ $logArray[SYSLOG_HOST] ]['cons_msgs'][ $strChecksum ]['LastOccurrence_Date'] = $logArray[SYSLOG_DATE];
- }
+ // Get next data record
+ $ret = $this->_streamObj->ReadNext($uID, $logArray);
+ } while ( $ret == SUCCESS );
+
+ // TimeStats
+ $nowtime = microtime_float();
+ $content["report_rendertime"] .= number_format($nowtime - $gl_starttime, 2, '.', '') . "s ";
+ }
+ else
+ return $ret;
+ }
+
+
+ // --- Start Postprocessing
+ foreach( $content["report_consdata"] as &$tmpConsolidatedComputer )
+ {
+ // First use callback function to sort array
+ uasort($tmpConsolidatedComputer['cons_msgs'], "MultiSortArrayByItemCountDesc");
+
+ // Remove entries according to _maxMsgsPerHost
+ if ( count($tmpConsolidatedComputer['cons_msgs']) > $this->_maxMsgsPerHost )
+ {
+ $iDropCount = 0;
+
+ do
+ {
+ array_pop($tmpConsolidatedComputer['cons_msgs']);
+ $iDropCount++;
+ } while ( count($tmpConsolidatedComputer['cons_msgs']) > $this->_maxMsgsPerHost );
+
+ // Append a dummy entry which shows count of all other events
+ if ( $iDropCount > 0 )
+ {
+ $lastEntry[SYSLOG_SEVERITY] = SYSLOG_NOTICE;
+ $lastEntry[SYSLOG_FACILITY] = SYSLOG_LOCAL0;
+ $lastEntry[SYSLOG_SYSLOGTAG] = $content['LN_GEN_ALL_OTHER_EVENTS'];
+ $lastEntry[SYSLOG_MESSAGE] = $content['LN_GEN_ALL_OTHER_EVENTS'];
+ $lastEntry['ItemCount'] = $iDropCount;
+ $lastEntry['FirstOccurrence_Date'] = "-";
+ $lastEntry['LastOccurrence_Date'] = "-";
+
+ $tmpConsolidatedComputer['cons_msgs'][] = $lastEntry;
}
-
- // Get next data record
- $ret = $this->_streamObj->ReadNext($uID, $logArray);
- } while ( $ret == SUCCESS );
+ }
// TimeStats
$nowtime = microtime_float();
$content["report_rendertime"] .= number_format($nowtime - $gl_starttime, 2, '.', '') . "s ";
- // Start Postprocessing
- foreach( $content["report_consdata"] as &$tmpConsolidatedComputer )
+ // PostProcess Events!
+ foreach( $tmpConsolidatedComputer["cons_msgs"] as &$tmpMyEvent )
{
- // First use callback function to sort array
- uasort($tmpConsolidatedComputer['cons_msgs'], "MultiSortArrayByItemCountDesc");
-
- // Remove entries according to _maxMsgsPerHost
- if ( count($tmpConsolidatedComputer['cons_msgs']) > $this->_maxMsgsPerHost )
- {
- $iDropCount = 0;
-
- do
- {
- array_pop($tmpConsolidatedComputer['cons_msgs']);
- $iDropCount++;
- } while ( count($tmpConsolidatedComputer['cons_msgs']) > $this->_maxMsgsPerHost );
-
- // Append a dummy entry which shows count of all other events
- if ( $iDropCount > 0 )
- {
- $lastEntry[SYSLOG_SEVERITY] = SYSLOG_NOTICE;
- $lastEntry[SYSLOG_FACILITY] = SYSLOG_LOCAL0;
- $lastEntry[SYSLOG_SYSLOGTAG] = $content['LN_GEN_ALL_OTHER_EVENTS'];
- $lastEntry[SYSLOG_MESSAGE] = $content['LN_GEN_ALL_OTHER_EVENTS'];
- $lastEntry['ItemCount'] = $iDropCount;
- $lastEntry['FirstOccurrence_Date'] = "-";
- $lastEntry['LastOccurrence_Date'] = "-";
-
- $tmpConsolidatedComputer['cons_msgs'][] = $lastEntry;
- }
- }
-
- // TimeStats
- $nowtime = microtime_float();
- $content["report_rendertime"] .= number_format($nowtime - $gl_starttime, 2, '.', '') . "s ";
-
- // PostProcess Events!
- foreach( $tmpConsolidatedComputer["cons_msgs"] as &$tmpMyEvent )
- {
- $tmpMyEvent['FirstOccurrence_Date_Formatted'] = GetFormatedDate( $tmpMyEvent['FirstOccurrence_Date'] );
- $tmpMyEvent['LastOccurrence_Date_Formatted'] = GetFormatedDate( $tmpMyEvent['LastOccurrence_Date'] );
- $tmpMyEvent['syslogseverity_text'] = $this->GetSeverityDisplayName($tmpMyEvent['syslogseverity']); //$content['filter_severity_list'][ $tmpMyEvent['syslogseverity'] ]["DisplayName"];
- $tmpMyEvent['syslogfacility_text'] = $this->GetFacilityDisplayName($tmpMyEvent['syslogfacility']); //$content['filter_facility_list'][ $tmpMyEvent['syslogfacility'] ]["DisplayName"];
- $tmpMyEvent['syslogseverity_bgcolor'] = $this->GetSeverityBGColor($tmpMyEvent['syslogseverity']);
- $tmpMyEvent['syslogfacility_bgcolor'] = $this->GetSeverityBGColor($tmpMyEvent['syslogfacility']);
- }
+ $tmpMyEvent['FirstOccurrence_Date_Formatted'] = GetFormatedDate( $tmpMyEvent['FirstOccurrence_Date'] );
+ $tmpMyEvent['LastOccurrence_Date_Formatted'] = GetFormatedDate( $tmpMyEvent['LastOccurrence_Date'] );
+ $tmpMyEvent['syslogseverity_text'] = $this->GetSeverityDisplayName($tmpMyEvent['syslogseverity']); //$content['filter_severity_list'][ $tmpMyEvent['syslogseverity'] ]["DisplayName"];
+ $tmpMyEvent['syslogfacility_text'] = $this->GetFacilityDisplayName($tmpMyEvent['syslogfacility']); //$content['filter_facility_list'][ $tmpMyEvent['syslogfacility'] ]["DisplayName"];
+ $tmpMyEvent['syslogseverity_bgcolor'] = $this->GetSeverityBGColor($tmpMyEvent['syslogseverity']);
+ $tmpMyEvent['syslogfacility_bgcolor'] = $this->GetSeverityBGColor($tmpMyEvent['syslogfacility']);
}
}
- else
- return $ret;
+ // ---
}
// Work done!
diff --git a/src/classes/reports/report.syslog.syslogsummary/report.syslog.syslogsummary.template.html b/src/classes/reports/report.syslog.syslogsummary/report.syslog.syslogsummary.template.html
index 766b4e2..1587356 100644
--- a/src/classes/reports/report.syslog.syslogsummary/report.syslog.syslogsummary.template.html
+++ b/src/classes/reports/report.syslog.syslogsummary/report.syslog.syslogsummary.template.html
@@ -95,30 +95,29 @@
+
-
{ZAEHLER} |
- {FirstOccurrence_Date_Formatted} |
- {LastOccurrence_Date_Formatted} |
- {syslogseverity_text} |
- {syslogfacility_text} |
- {syslogtag} |
- {msg} |
{ItemCount} |
{ItemCount} |
-
+ {FirstOccurrence_Date_Formatted} |
+ {LastOccurrence_Date_Formatted} |
+ {syslogseverity_text} |
+ {syslogfacility_text} |
+ {syslogtag} |
+ {msg} |
diff --git a/src/classes/reports/report.syslog.syslogsummary/report.syslog.syslogsummary.template.pdf b/src/classes/reports/report.syslog.syslogsummary/report.syslog.syslogsummary.template.pdf
index 6daa3c9..021a379 100644
--- a/src/classes/reports/report.syslog.syslogsummary/report.syslog.syslogsummary.template.pdf
+++ b/src/classes/reports/report.syslog.syslogsummary/report.syslog.syslogsummary.template.pdf
@@ -68,27 +68,27 @@
+
-
{ZAEHLER} |
- {FirstOccurrence_Date_Formatted} |
- {LastOccurrence_Date_Formatted} |
- {syslogseverity_text} |
- {syslogfacility_text} |
- {syslogtag} |
{ItemCount} |
{ItemCount} |
+ {FirstOccurrence_Date_Formatted} |
+ {LastOccurrence_Date_Formatted} |
+ {syslogseverity_text} |
+ {syslogfacility_text} |
+ {syslogtag} |
diff --git a/src/include/functions_common.php b/src/include/functions_common.php
index d0d56d5..fa90ce3 100644
--- a/src/include/functions_common.php
+++ b/src/include/functions_common.php
@@ -566,8 +566,8 @@ function CheckAndSetRunMode()
// Define and Inits Syslog variables now!
// DEPRECIATED! define_syslog_variables();
// Syslog Constants are defined by default anyway!
- openlog("LogAnalyzer", LOG_PID, LOG_USER);
-
+ $syslogOpened = openlog("LogAnalyzer", LOG_PID, LOG_USER);
+
// --- Check necessary PHP Extensions!
$loadedExtensions = get_loaded_extensions();
@@ -1347,7 +1347,7 @@ function OutputDebugMessage($szDbg, $szDbgLevel = DEBUG_INFO)
// Check if the user wants to syslog the error!
if ( GetConfigSetting("MiscDebugToSyslog", 0, CFGLEVEL_GLOBAL) == 1 )
{
- syslog(GetPriorityFromDebugLevel($szDbgLevel), $szDbg);
+ $syslogSend = syslog(GetPriorityFromDebugLevel($szDbgLevel), $szDbg);
}
}