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
|
|
|
/**
|
2016-09-08 14:12:23 +01:00
|
|
|
* LibreNMS
|
2011-09-03 15:04:19 +00:00
|
|
|
*
|
2016-09-08 14:12:23 +01:00
|
|
|
* This file is part of LibreNMS.
|
2011-09-03 15:04:19 +00:00
|
|
|
*
|
2013-10-28 12:01:36 -07:00
|
|
|
* @copyright (C) 2006 - 2012 Adam Armstrong
|
2011-09-03 15:04:19 +00:00
|
|
|
*/
|
2020-09-21 14:54:51 +02:00
|
|
|
$init_modules = [];
|
2016-11-21 14:12:59 -06:00
|
|
|
require __DIR__ . '/includes/init.php';
|
2010-02-19 01:40:38 +00:00
|
|
|
|
2020-09-21 15:59:34 +02:00
|
|
|
$i = '1';
|
2010-02-19 01:40:38 +00:00
|
|
|
|
2016-08-28 17:32:55 -05:00
|
|
|
$s = fopen('php://stdin', 'r');
|
2015-07-13 20:10:26 +02:00
|
|
|
while ($line = fgets($s)) {
|
2020-09-21 14:54:51 +02:00
|
|
|
//logfile($line);
|
2020-09-21 15:59:34 +02:00
|
|
|
[$entry['host'],$entry['facility'],$entry['priority'], $entry['level'], $entry['tag'], $entry['timestamp'], $entry['msg'], $entry['program']] = explode('||', trim($line));
|
2015-07-13 20:10:26 +02:00
|
|
|
process_syslog($entry, 1);
|
|
|
|
unset($entry);
|
|
|
|
unset($line);
|
|
|
|
$i++;
|
2010-02-19 01:40:38 +00:00
|
|
|
}
|