79 Commits

Author SHA1 Message Date
29f45ca352 Apply fixes from StyleCI (#12124) 2020-09-21 15:59:34 +02:00
82f43cb98d Apply fixes from StyleCI (#12120) 2020-09-21 15:40:17 +02:00
217969e140 Update php-codesniffer (#11368)
* PHPCS 3.5+

* Fix newly detected style issues
2020-04-03 08:41:24 -05:00
f3ba8947f7 Use Config helper (#10339)
remove usage of global variable
2019-06-23 00:29:12 -05:00
06d61fc528 For some reason, this is now broken. Accessing the array this way fixes it. I suspect it has something to do with the periods in the host names (#9839) 2019-02-18 22:57:33 -06:00
8617f3e21d Syslog name translation (#9463)
* Check to see if a host exists in a lookup table to translate received name to what LibreNMS knows

* Added some documentation on how this is configured

* Use \LibreNMS\Config instead of accessing $config directly

* Fix codeclimate finding: Additional blank lines after USE statement

* murrant suggested a much cleaner way of doing this!
2018-11-20 16:47:53 -06:00
809c9ea591 feature: Added Syslog hook for ASA support (#7268)
* Added limited support for ASA using emblem logging

* Updated documentation

* Updated ASA support to cover regular and emblem logging

* Gave the variable a more suitable name

* Removed debug output
2017-09-01 18:37:01 +01:00
b8452862af device: Fix for syslog-messages from zywall (USG series) (#6838)
* Fix for syslog-messages from zywall (USG series)

* Adding a test
2017-06-20 12:27:37 -05:00
bcc618a3ad feature: Added Syslog hooks for Oxidized integration (and more) (#6785)
* Creating syslog hooks with example script for Oxidized integration

* Corrected IOS-XR matching and stopped spurious calls to Oxidized
2017-06-17 15:21:21 +01:00
2f924cb47b fix: syslog, pull out pam program source (#5942)
* Clean up syslog integration

* Fix syslog test

* Fix some more tests I missed earlier
2017-02-21 08:40:16 -06:00
9284bc60ff Update code in includes to be PSR-2 compliant (#4220)
refactor: Update code in /includes to be psr2 compliant #4220
2016-08-28 18:32:58 +01:00
b438e94771 reduction, thx an @murrant 2016-08-08 17:36:19 +02:00
330910b4e3 Fix a bug in syslog
since PR #3812 syslog writes to wrong device id in syslog table.
this happens on all devices where inet_pton() returns false.
2016-08-07 17:47:25 +02:00
laf
fdce2d0a28 Added ability to lookup device from IP in syslog 2016-07-09 20:01:35 +01:00
65f929d1f2 Fix log entries with timestamps included and incorrect time (leading * or .)
Issue #3316
2016-04-12 00:05:16 -05:00
d59fc01b61 Another test case for the cisco syslog timestamp prefix. 2016-03-09 10:49:12 -06:00
bca965e2ae Some devices have "logging timestamp" enabled, try to remove that from the start of the message.
Fixes #3199
2016-03-09 08:20:51 -06:00
29066cfcbc Merge pull request #3173 from Ultra2D/syslog-linux-openvpn
Syslog Linux OpenVPN pattern does not match example, remove it
2016-03-05 11:34:04 +00:00
ab67f7870c Merge pull request #3171 from Ultra2D/syslog-trim
Syslog trim whitespace
2016-03-05 11:26:09 +00:00
d74c37ab0e Syslog Linux OpenVPN pattern does not match example, remove it 2016-03-05 12:23:43 +01:00
fb34fb7ab5 Syslog trim whitespace 2016-03-05 11:06:29 +01:00
621d3be05c Merge branch 'master' into issue-3041 2016-03-05 10:05:46 +01:00
25e88f743c Remove dovecot match because of invalid pattern 2016-03-04 17:43:05 +01:00
f969317863 Human readable program, and append event ID to message 2016-03-04 16:14:47 +01:00
488f7f44c4 array_walk does not work like that, apparently input is trimmed later on 2016-03-04 15:51:49 +01:00
2b6439d502 Missing trailing delimiter in original code 2016-03-04 13:45:48 +01:00
4c5701531f Merge branch 'master' into issue-3035 2016-03-04 09:13:15 +01:00
f52954f8a4 The old load included the leading %. Stick with that behavior. 2016-03-03 00:03:17 -06:00
ea491c4a06 move the negation outside of the regular expression for more accurate results 2016-03-02 23:48:07 -06:00
fb9224d507 Keep original behaviour, just prevent false matches 2016-03-02 16:19:32 +01:00
71d88d6975 This should process all of the messages on these sites and if it fails, there should be no data loss
http://www.cisco.com/c/en/us/support/docs/switches/catalyst-6000-series-switches/29804-186.html
http://www.cisco.com/c/en/us/td/docs/ios/system/messages/guide/consol_smg/sm_cnovr.html
2016-02-27 16:00:06 -06:00
d1f44ae1ec Simplify Cisco ios,iosxe,catos log processing.
This should cover the examples I could find on the web, but we could be missing some corner cases.
If we fail, the entire message is in msg, instead of being lost.
2016-02-26 10:19:22 -06:00
9f22b18dc8 Split is removed in PHP7, replace with explode as none were using it as a regex.
Also fix two array keys without quotes in include/syslog.php
Fixes #2205
2016-02-25 14:34:06 -06:00
49be124238 Fixed syslog: only parse messages if program is empty 2016-02-18 12:30:43 +01:00
b79d2906ae Rewrite sender-ip if ::ffff: is prepended because the syslogserver uses IPv6 2015-08-21 16:02:59 +02:00
d8693f05ae Fix coding style part 2 2015-07-15 11:04:22 +02:00
5a7988e2e4 chmod 0644 to php files not directly executed 2015-04-28 22:58:03 +02:00
af1e82ddbb process_syslog: remove debugging statements
Currently, filtered syslog messages (via syslog_filter) are spewed into
stdout (unlike unfiltered ones), presumably for debugging. When
syslog.php has been invoked from rsyslog, writing to stdout results in
an EPIPE which is unhandled and hence syslog.php dies. Remove them, as
they're completely redundant and of dubious gains to debugging.
2014-01-11 17:34:45 +02:00
b273e04241 /// -> //
git-svn-id: http://www.observium.org/svn/observer/trunk@3240 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-25 12:24:34 +00:00
cacf913a55 # -> / for phpdoc
git-svn-id: http://www.observium.org/svn/observer/trunk@3239 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-25 11:29:53 +00:00
4db1454e92 move from port_id to interface_id. make ports discovery only discover. add some cleaner functions. add a tiny bit of alerting infrastructure.
git-svn-id: http://www.observium.org/svn/observer/trunk@3195 61d68cd4-352d-0410-923a-c4978735b2b8
2012-05-16 13:25:50 +00:00
4fad2ccc68 syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@2967 61d68cd4-352d-0410-923a-c4978735b2b8
2012-04-05 16:44:58 +00:00
86248c8bce make sensor_type larger, merge both logs into one tab (ran out of space!)
git-svn-id: http://www.observium.org/svn/observer/trunk@2719 61d68cd4-352d-0410-923a-c4978735b2b8
2011-11-07 19:39:15 +00:00
a369c442eb syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@2643 61d68cd4-352d-0410-923a-c4978735b2b8
2011-10-04 14:38:54 +00:00
2dc8b807e9 syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@2642 61d68cd4-352d-0410-923a-c4978735b2b8
2011-10-04 09:10:21 +00:00
9a1bee1458 more code cleanup (last commit for now)
git-svn-id: http://www.observium.org/svn/observer/trunk@2520 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-20 14:37:54 +00:00
dc0ebc7343 more code cleanup
git-svn-id: http://www.observium.org/svn/observer/trunk@2517 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-20 14:22:34 +00:00
d864ce234f kill a whole bunch of trailing spaces
git-svn-id: http://www.observium.org/svn/observer/trunk@2516 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-20 09:55:11 +00:00
5cb7853b81 fix syslog for openvpn, patch by Yucong Sun
git-svn-id: http://www.observium.org/svn/observer/trunk@2422 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-07 08:31:42 +00:00
bb95ed4dc3 fix syslog a little.
git-svn-id: http://www.observium.org/svn/observer/trunk@2406 61d68cd4-352d-0410-923a-c4978735b2b8
2011-09-02 09:01:32 +00:00