Files
librenms-librenms/syslog.php
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
523 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
/**
* LibreNMS
2011-09-03 15:04:19 +00:00
*
* This file is part of LibreNMS.
2011-09-03 15:04:19 +00:00
*
* @copyright (C) 2006 - 2012 Adam Armstrong
2011-09-03 15:04:19 +00:00
*/
$init_modules = [];
require __DIR__ . '/includes/init.php';
2016-08-28 17:32:55 -05:00
$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
[$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);
}