2010-09-03 18:26:59 +00:00
|
|
|
#!/usr/bin/env php
|
2010-02-19 01:40:38 +00:00
|
|
|
<?php
|
|
|
|
|
2011-09-03 15:04:19 +00:00
|
|
|
/**
|
2013-10-28 12:01:36 -07:00
|
|
|
* Observium
|
2011-09-03 15:04:19 +00:00
|
|
|
*
|
2013-10-28 12:01:36 -07:00
|
|
|
* This file is part of Observium.
|
2011-09-03 15:04:19 +00:00
|
|
|
*
|
2013-10-28 12:01:36 -07:00
|
|
|
* @package observium
|
|
|
|
* @subpackage syslog
|
|
|
|
* @author Adam Armstrong <adama@memetic.org>
|
|
|
|
* @copyright (C) 2006 - 2012 Adam Armstrong
|
2011-09-03 15:04:19 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2010-02-27 14:44:38 +00:00
|
|
|
include("includes/defaults.inc.php");
|
2010-02-19 01:40:38 +00:00
|
|
|
include("config.php");
|
2012-05-09 10:01:42 +00:00
|
|
|
include("includes/definitions.inc.php");
|
2010-02-19 01:40:38 +00:00
|
|
|
include("includes/syslog.php");
|
2011-05-26 21:27:40 +00:00
|
|
|
include("includes/dbFacile.php");
|
2010-02-25 01:52:32 +00:00
|
|
|
include("includes/common.php");
|
2011-09-02 06:56:21 +00:00
|
|
|
include("includes/functions.php");
|
2010-02-19 01:40:38 +00:00
|
|
|
|
2011-03-15 15:27:14 +00:00
|
|
|
$i = "1";
|
2010-02-19 01:40:38 +00:00
|
|
|
|
2011-03-15 15:27:14 +00:00
|
|
|
$s = fopen('php://stdin','r');
|
|
|
|
while ($line = fgets($s))
|
|
|
|
{
|
2011-09-02 09:01:32 +00:00
|
|
|
#logfile($line);
|
2011-05-13 00:13:57 +00:00
|
|
|
list($entry['host'],$entry['facility'],$entry['priority'], $entry['level'], $entry['tag'], $entry['timestamp'], $entry['msg'], $entry['program']) = explode("||", trim($line));
|
2011-03-15 15:27:14 +00:00
|
|
|
process_syslog($entry, 1);
|
|
|
|
unset($entry); unset($line);
|
|
|
|
$i++;
|
2010-02-19 01:40:38 +00:00
|
|
|
}
|
|
|
|
|
2011-05-13 00:13:57 +00:00
|
|
|
?>
|