2010-09-03 20:26:59 +02:00
|
|
|
#!/usr/bin/env php
|
2010-02-19 02:40:38 +01:00
|
|
|
<?php
|
|
|
|
|
2011-09-03 17:04:19 +02:00
|
|
|
/**
|
2016-09-08 15:12:23 +02:00
|
|
|
* LibreNMS
|
2011-09-03 17:04:19 +02:00
|
|
|
*
|
2016-09-08 15:12:23 +02:00
|
|
|
* This file is part of LibreNMS.
|
2011-09-03 17:04:19 +02:00
|
|
|
*
|
2013-10-28 20:01:36 +01:00
|
|
|
* @copyright (C) 2006 - 2012 Adam Armstrong
|
2011-09-03 17:04:19 +02:00
|
|
|
*/
|
2016-11-21 21:12:59 +01:00
|
|
|
$init_modules = [];
|
|
|
|
require __DIR__ . '/includes/init.php';
|
2010-02-19 02:40:38 +01:00
|
|
|
|
2016-08-29 00:32:55 +02:00
|
|
|
$s = fopen('php://stdin', 'r');
|
2011-03-15 16:27:14 +01:00
|
|
|
while ($line = fgets($s)) {
|
2011-09-02 11:01:32 +02:00
|
|
|
//logfile($line);
|
2011-05-13 02:13:57 +02:00
|
|
|
[$entry['host'],$entry['facility'],$entry['priority'], $entry['level'], $entry['tag'], $entry['timestamp'], $entry['msg'], $entry['program']] = explode('||', trim($line));
|
2011-03-15 16:27:14 +01:00
|
|
|
process_syslog($entry, 1);
|
|
|
|
unset($entry);
|
|
|
|
unset($line);
|
2010-02-19 02:40:38 +01:00
|
|
|
}
|