Files
librenms-librenms/lang/en/syslog.php

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

42 lines
1.2 KiB
PHP
Raw Normal View History

Graylog entry matching device if source is not hostname or primary ip (#10458) * Added findByHostnameOrIp($hostnameOrIp) for devices. Returns Device or null Fixed Graylog device links, "device" parameter in URL was IP or Hostname instead of device id before Added Severity number to name conversion. Can be activated by setting $config['graylog']['severity-names'] = "true" in config Added Facility number to name conversion. Can be activated by setting $config['graylog']['facility-names'] = "true" in config * Added $config['graylog']['match-any-address']. To enable matching Graylog entries by any interface address set to "true" Added code to match Graylog entries by any interface address instead of only hostname or primary address * Fixed missing quotation marks in <script> block in includes/html/common/graylog.inc.php:46, causing graylog page only load header with empty table. Introduced in https://github.com/librenms/librenms/pull/10447 * Modified code to reduce complexity as mentioned by codeclimate * Changed findByHostnameOrIp($hostnameOrIp) as mentioned by https://github.com/murrant * Added Language File "syslog.php" for Syslog Severity and Facility Merged functions "levelName($level)" and "facilityName($facility)" to "syslogPrioParser($type, $value)" where $type should be "facility" or "severity" and $value the numeric or text facility or severity. Returns "NUMBER (NAME)" if possible, otherwhise returns $value * Shortened findByHostnameOrIp($hostnameOrIp) as mentioned by https://github.com/murrant * Add shortcut ipv4 and ipv6 device relationships Better code for adding source addresses Only translate level and facility if they are numeric Allow level and facility to be sortable No need for device link if we know it won't work. Before the code was punting to save sql queries. * Cache devices Took queries from 69 to 6 in my quick test. * Added Documentation for $config['graylog']['match-any-address'] * Fixed missing quotation marks in app/ApiClients/GraylogApi.php:125
2019-07-26 22:13:35 +02:00
<?php
return [
'title' => 'Syslog',
Graylog entry matching device if source is not hostname or primary ip (#10458) * Added findByHostnameOrIp($hostnameOrIp) for devices. Returns Device or null Fixed Graylog device links, "device" parameter in URL was IP or Hostname instead of device id before Added Severity number to name conversion. Can be activated by setting $config['graylog']['severity-names'] = "true" in config Added Facility number to name conversion. Can be activated by setting $config['graylog']['facility-names'] = "true" in config * Added $config['graylog']['match-any-address']. To enable matching Graylog entries by any interface address set to "true" Added code to match Graylog entries by any interface address instead of only hostname or primary address * Fixed missing quotation marks in <script> block in includes/html/common/graylog.inc.php:46, causing graylog page only load header with empty table. Introduced in https://github.com/librenms/librenms/pull/10447 * Modified code to reduce complexity as mentioned by codeclimate * Changed findByHostnameOrIp($hostnameOrIp) as mentioned by https://github.com/murrant * Added Language File "syslog.php" for Syslog Severity and Facility Merged functions "levelName($level)" and "facilityName($facility)" to "syslogPrioParser($type, $value)" where $type should be "facility" or "severity" and $value the numeric or text facility or severity. Returns "NUMBER (NAME)" if possible, otherwhise returns $value * Shortened findByHostnameOrIp($hostnameOrIp) as mentioned by https://github.com/murrant * Add shortcut ipv4 and ipv6 device relationships Better code for adding source addresses Only translate level and facility if they are numeric Allow level and facility to be sortable No need for device link if we know it won't work. Before the code was punting to save sql queries. * Cache devices Took queries from 69 to 6 in my quick test. * Added Documentation for $config['graylog']['match-any-address'] * Fixed missing quotation marks in app/ApiClients/GraylogApi.php:125
2019-07-26 22:13:35 +02:00
'severity' => [
'0' => 'Emergency',
'1' => 'Alert',
'2' => 'Critical',
'3' => 'Error',
'4' => 'Warning',
'5' => 'Notice',
'6' => 'Informational',
'7' => 'Debug',
],
'facility' => [
'0' => 'kernel messages',
'1' => 'user-level messages',
'2' => 'mail-system',
'3' => 'system daemons',
'4' => 'security/authorization messages',
'5' => 'messages generated internally by syslogd',
'6' => 'line printer subsystem',
'7' => 'network news subsystem',
'8' => 'UUCP subsystem',
'9' => 'clock daemon',
'10' => 'security/authorization messages',
'11' => 'FTP daemon',
'12' => 'NTP subsystem',
'13' => 'log audit',
'14' => 'log alert',
'15' => 'clock daemon (note 2)',
'16' => 'local use 0 (local0)',
'17' => 'local use 1 (local1)',
'18' => 'local use 2 (local2)',
'19' => 'local use 3 (local3)',
'20' => 'local use 4 (local4)',
'21' => 'local use 5 (local5)',
'22' => 'local use 6 (local6)',
'23' => 'local use 7 (local7)',
],
];