Files
librenms-librenms/syslog.php
T

38 lines
878 B
PHP
Raw Normal View History

2010-09-03 18:26:59 +00:00
#!/usr/bin/env php
<?php
2011-09-03 15:04:19 +00:00
/**
2013-10-28 01:46:59 -07:00
* LibreNMS
2011-09-03 15:04:19 +00:00
*
2013-10-28 01:46:59 -07:00
* This file is part of LibreNMS
2011-09-03 15:04:19 +00:00
*
2013-10-28 01:46:59 -07:00
* @package librenms
* @subpackage cli
* @author LibreNMS Group <[email protected]>
* @copyright (C) 2006 - 2012 Adam Armstrong (as Observium)
* @copyright (C) 2013 LibreNMS Group
2011-09-03 15:04:19 +00:00
*
*/
include("includes/defaults.inc.php");
include("config.php");
include("includes/definitions.inc.php");
include("includes/syslog.php");
2011-05-26 21:27:40 +00:00
include("includes/dbFacile.php");
include("includes/common.php");
2011-09-02 06:56:21 +00:00
include("includes/functions.php");
$i = "1";
$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));
process_syslog($entry, 1);
unset($entry); unset($line);
$i++;
}
2011-05-13 00:13:57 +00:00
?>