mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fixed fail2ban jails eventlog spam (#10061)
Sort the jails before saving so it always matches. Not sure why it would be different order, but this fixes the spam in any case.
This commit is contained in:
committed by
Neil Lathwood
parent
64897c273c
commit
c305d2b520
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Arr;
|
||||
use LibreNMS\Exceptions\JsonAppParsingFailedException;
|
||||
use LibreNMS\Exceptions\JsonAppException;
|
||||
use LibreNMS\RRD\RrdDefinition;
|
||||
@@ -92,7 +93,7 @@ if (empty($f2b['jails'])) {
|
||||
|
||||
$id = $component->getFirstComponentID($f2bc);
|
||||
$f2bc[$id]['label'] = 'Fail2ban Jails';
|
||||
$f2bc[$id]['jails'] = json_encode(array_keys($f2b['jails']));
|
||||
$f2bc[$id]['jails'] = json_encode(Arr::sort(array_keys($f2b['jails'])));
|
||||
|
||||
$component->setComponentPrefs($device_id, $f2bc);
|
||||
}
|
||||
|
Reference in New Issue
Block a user