forked from librenms/librenms
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsyslog.php
More file actions
executable file
·36 lines (31 loc) · 814 Bytes
/
syslog.php
File metadata and controls
executable file
·36 lines (31 loc) · 814 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env php
<?php
/**
* Observium
*
* This file is part of Observium.
*
* @package observium
* @subpackage syslog
* @author Adam Armstrong <adama@memetic.org>
* @copyright (C) 2006 - 2012 Adam Armstrong
*
*/
include("includes/defaults.inc.php");
include("config.php");
include("includes/definitions.inc.php");
include("includes/syslog.php");
include("includes/dbFacile.php");
include("includes/common.php");
include("includes/functions.php");
$i = "1";
$s = fopen('php://stdin','r');
while ($line = fgets($s))
{
#logfile($line);
list($entry['host'],$entry['facility'],$entry['priority'], $entry['level'], $entry['tag'], $entry['timestamp'], $entry['msg'], $entry['program']) = explode("||", trim($line));
process_syslog($entry, 1);
unset($entry); unset($line);
$i++;
}
?>