adding SNMP trap handling capability (yes it is horrible horrible right now!)

git-svn-id: http://www.observium.org/svn/observer/trunk@880 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
Adam Amstrong
2010-02-17 11:02:18 +00:00
parent 115e4103ff
commit 09e22b2f63
6 changed files with 81 additions and 1 deletions
+8
View File
@@ -817,6 +817,14 @@ function eventlog($eventtext,$device_id = "", $interface_id = "")
mysql_query($event_query);
}
function log_event($text, $device = NULL, $type = NULL, $reference = NULL) {
$event_query = "INSERT INTO eventlog (host, reference, type, datetime, message) VALUES (" . ($device['device_id'] ? $device['device_id'] : "NULL");
$event_query .= ", " . ($reference ? $reference : "NULL") . ", " . ($type ? $type : "NULL") . ", NOW(), '" . mres($text) . "')";
echo($event_query . "\n");
mysql_query($event_query);
}
function notify($device,$title,$message)
{
global $config;