OP#483 edit target for nagios

This commit is contained in:
2026-03-12 12:33:00 +01:00
parent c3fe00ecbd
commit f93a349f96
2 changed files with 5 additions and 1 deletions

View File

@@ -8,7 +8,7 @@ class confdroid_fail2ban::monitoring::target (
) inherits confdroid_fail2ban::params {
if $fn_incl_target == true {
@@nagios_service { "check_fail2ban_${fqdn}":
check_command => 'check_nrpe!check_fail2ban!1:1!fail2ban-server',
check_command => "check_nrpe!check_fail2ban!${fn_procs_allowed}!fail2ban-server",
use => 'generic-service',
host_name => $fqdn,
notification_period => '24x7',

View File

@@ -106,6 +106,9 @@
# file to be created if fn_incl_target is set to true.
# @param [String] fn_target_contacts The nagios contacts to be notified for
# the service if fn_incl_target is set to true.
# @param [String] fn_procs_allowed The allowed number of fail2ban processes
# for the nagios check. Default is '1:1', which means exactly one process
# should be running.
###############################################################################
class confdroid_fail2ban::params (
@@ -165,6 +168,7 @@ class confdroid_fail2ban::params (
Boolean $fn_incl_target = false,
String $fn_target_service = '/etc/nagios/conf.d/fail2ban_service.cfg',
String $fn_target_contacts = 'nagiosadmin',
String $fn_procs_allowed = '1:1',
) {
# shortcuts