* Added Recent Graylog Entries to Device Overview (WIP)
* Improved "Recent Graylog" entries on device overview (WIP)
Added $config['graylog']['device-page']['rowCount'] to set maximum rows shown in "Recent Graylog" on device overview (Default: 10)
Added $config['graylog']['device-page']['maxLevel'] to set the maximum message level shown in "Recent Graylog" on device overview (Default: 7, validates value to be >= 0 and <= 7)
* Fixed code styling issue
* Added Log Level filter to Graylog widget
Added Log Level filter to Graylog pages (device pages and graylog overview)
* Added documentation for new configuration options
* Removed unneccesary (and already commented) using
Renamed "maxLevel" to "loglevel" as suggested by a colleague
* Added doc for $config['graylog']['loglevel']
* Removed includes/html/print-graylog.inc.php and inlined it in includes/html/pages/device/overview/graylog.inc.php
Removed comma in json object in resources/views/widgets/graylog.blade.php
Replaced translation strings in resources/views/widgets/settings/graylog.blade.php with existing translation strings
* log level -> minimum log level
* Use Config::get() default functionality
* Oops
* 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
* Security fix: unauthorized access
Affects nginx users:
Moved php files outside of public html directory (Apache was protected by .htaccess)
Affects all users:
Some files did not check for authentication and could disclose some info.
Better checks before including files from user input
* git mv html/includes/ includes/html
git mv html/pages/ includes/html/