mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
35 lines
837 B
PHP
Executable File
35 lines
837 B
PHP
Executable File
#!/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
|
|
*
|
|
*/
|
|
|
|
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');
|
|
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++;
|
|
}
|