mirror of
https://github.com/rsyslog/loganalyzer.git
synced 2025-09-26 11:19:26 +02:00
Changed database layout from winsyslog to monitorware. Added more debug handling
The database layout name was changed from winsyslog to monitorware. Existing configuration won't have a problem, winsyslog is converted into monitorware when the sources are initiated. Added more debug handling in the functions which output readable represantations of the syslog facility, severity and so on.
This commit is contained in:
parent
daa0ef78d0
commit
5a8d08872d
@ -136,19 +136,19 @@ $fields[SYSLOG_MESSAGE]['FieldAlign'] = "left";
|
||||
// ---
|
||||
|
||||
// --- Define default Database field mappings!
|
||||
$dbmapping['winsyslog'][SYSLOG_UID] = "ID";
|
||||
$dbmapping['winsyslog'][SYSLOG_DATE] = "DeviceReportedTime";
|
||||
$dbmapping['winsyslog'][SYSLOG_HOST] = "FromHost";
|
||||
$dbmapping['winsyslog'][SYSLOG_MESSAGETYPE] = "InfoUnitID";
|
||||
$dbmapping['winsyslog'][SYSLOG_MESSAGE] = "Message";
|
||||
$dbmapping['winsyslog'][SYSLOG_FACILITY] = "Facility";
|
||||
$dbmapping['winsyslog'][SYSLOG_SEVERITY] = "Priority";
|
||||
$dbmapping['winsyslog'][SYSLOG_SYSLOGTAG] = "SysLogTag";
|
||||
$dbmapping['winsyslog'][SYSLOG_EVENT_ID] = "EventID";
|
||||
$dbmapping['winsyslog'][SYSLOG_EVENT_LOGTYPE] = "EventLogType";
|
||||
$dbmapping['winsyslog'][SYSLOG_EVENT_SOURCE] = "EventSource";
|
||||
$dbmapping['winsyslog'][SYSLOG_EVENT_CATEGORY] = "EventCategory";
|
||||
$dbmapping['winsyslog'][SYSLOG_EVENT_USER] = "EventUser";
|
||||
$dbmapping['monitorware'][SYSLOG_UID] = "ID";
|
||||
$dbmapping['monitorware'][SYSLOG_DATE] = "DeviceReportedTime";
|
||||
$dbmapping['monitorware'][SYSLOG_HOST] = "FromHost";
|
||||
$dbmapping['monitorware'][SYSLOG_MESSAGETYPE] = "InfoUnitID";
|
||||
$dbmapping['monitorware'][SYSLOG_MESSAGE] = "Message";
|
||||
$dbmapping['monitorware'][SYSLOG_FACILITY] = "Facility";
|
||||
$dbmapping['monitorware'][SYSLOG_SEVERITY] = "Priority";
|
||||
$dbmapping['monitorware'][SYSLOG_SYSLOGTAG] = "SysLogTag";
|
||||
$dbmapping['monitorware'][SYSLOG_EVENT_ID] = "EventID";
|
||||
$dbmapping['monitorware'][SYSLOG_EVENT_LOGTYPE] = "EventLogType";
|
||||
$dbmapping['monitorware'][SYSLOG_EVENT_SOURCE] = "EventSource";
|
||||
$dbmapping['monitorware'][SYSLOG_EVENT_CATEGORY] = "EventCategory";
|
||||
$dbmapping['monitorware'][SYSLOG_EVENT_USER] = "EventUser";
|
||||
|
||||
$dbmapping['syslogng'][SYSLOG_UID] = "seq";
|
||||
$dbmapping['syslogng'][SYSLOG_DATE] = "datetime";
|
||||
|
@ -86,9 +86,14 @@
|
||||
$content['Sources'][$iSourceID]['ObjRef']->DBServer = $mysource['DBServer'];
|
||||
$content['Sources'][$iSourceID]['ObjRef']->DBName = $mysource['DBName'];
|
||||
$content['Sources'][$iSourceID]['ObjRef']->DBType = $mysource['DBType'];
|
||||
$content['Sources'][$iSourceID]['ObjRef']->DBTableType = $mysource['DBTableType'];
|
||||
$content['Sources'][$iSourceID]['ObjRef']->DBTableName = $mysource['DBTableName'];
|
||||
|
||||
// Legacy handling for tabletype!
|
||||
if ( isset($mysource['DBTableType']) && strtolower($mysource['DBTableType']) == "winsyslog" )
|
||||
$content['Sources'][$iSourceID]['ObjRef']->DBTableType = "monitorware"; // Convert to MonitorWare!
|
||||
else
|
||||
$content['Sources'][$iSourceID]['ObjRef']->DBTableType = strtolower($mysource['DBTableType']);
|
||||
|
||||
// Optional parameters!
|
||||
if ( isset($mysource['DBPort']) ) { $content['Sources'][$iSourceID]['ObjRef']->DBPort = $mysource['DBPort']; }
|
||||
if ( isset($mysource['DBUser']) ) { $content['Sources'][$iSourceID]['ObjRef']->DBUser = $mysource['DBUser']; }
|
||||
|
@ -207,7 +207,7 @@ function GetFacilityDisplayName( $nFacilityID )
|
||||
}
|
||||
|
||||
// Default
|
||||
return "Unknown Facility";
|
||||
return "Unknown Facility($nFacilityID)";
|
||||
}
|
||||
|
||||
function GetSeverityDisplayName( $nSeverityID )
|
||||
@ -221,7 +221,7 @@ function GetSeverityDisplayName( $nSeverityID )
|
||||
}
|
||||
|
||||
// Default
|
||||
return "Unknown Severity";
|
||||
return "Unknown Severity($nSeverityID)";
|
||||
}
|
||||
|
||||
function GetMessageTypeDisplayName( $nMsgTypeID )
|
||||
@ -235,7 +235,7 @@ function GetMessageTypeDisplayName( $nMsgTypeID )
|
||||
}
|
||||
|
||||
// Default
|
||||
return "Unknown";
|
||||
return "Unknown MessageType($nMsgTypeID)";
|
||||
}
|
||||
|
||||
|
||||
@ -249,9 +249,8 @@ function GetTimeStampFromTimeString($szTimeString)
|
||||
}
|
||||
else
|
||||
{
|
||||
//WTF?
|
||||
die ("WTF GetTimeStampFromTimeString " . $szTimeString);
|
||||
return 0;
|
||||
OutputDebugMessage("Unparseable Time in GetTimeStampFromTimeString - '" . $szTimeString . "'");
|
||||
return $szTimeString;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user