Files
librenms-librenms/syslog.php
T

35 lines
837 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
/**
* Observium
2011-09-03 15:04:19 +00:00
*
* This file is part of Observium.
2011-09-03 15:04:19 +00: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
*
*/
2015-07-13 20:10:26 +02:00
require 'includes/defaults.inc.php';
require 'config.php';
require 'includes/definitions.inc.php';
require_once 'includes/syslog.php';
require_once 'includes/dbFacile.php';
require_once 'includes/common.php';
require_once 'includes/functions.php';
$i = "1";
$s = fopen('php://stdin','r');
2015-07-13 20:10:26 +02:00
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++;
}