OP#483 edit target for nagios
This commit is contained in:
@@ -8,7 +8,7 @@ class confdroid_fail2ban::monitoring::target (
|
|||||||
) inherits confdroid_fail2ban::params {
|
) inherits confdroid_fail2ban::params {
|
||||||
if $fn_incl_target == true {
|
if $fn_incl_target == true {
|
||||||
@@nagios_service { "check_fail2ban_${fqdn}":
|
@@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',
|
use => 'generic-service',
|
||||||
host_name => $fqdn,
|
host_name => $fqdn,
|
||||||
notification_period => '24x7',
|
notification_period => '24x7',
|
||||||
|
|||||||
@@ -106,6 +106,9 @@
|
|||||||
# file to be created if fn_incl_target is set to true.
|
# file to be created if fn_incl_target is set to true.
|
||||||
# @param [String] fn_target_contacts The nagios contacts to be notified for
|
# @param [String] fn_target_contacts The nagios contacts to be notified for
|
||||||
# the service if fn_incl_target is set to true.
|
# 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 (
|
class confdroid_fail2ban::params (
|
||||||
|
|
||||||
@@ -165,6 +168,7 @@ class confdroid_fail2ban::params (
|
|||||||
Boolean $fn_incl_target = false,
|
Boolean $fn_incl_target = false,
|
||||||
String $fn_target_service = '/etc/nagios/conf.d/fail2ban_service.cfg',
|
String $fn_target_service = '/etc/nagios/conf.d/fail2ban_service.cfg',
|
||||||
String $fn_target_contacts = 'nagiosadmin',
|
String $fn_target_contacts = 'nagiosadmin',
|
||||||
|
String $fn_procs_allowed = '1:1',
|
||||||
|
|
||||||
) {
|
) {
|
||||||
# shortcuts
|
# shortcuts
|
||||||
|
|||||||
Reference in New Issue
Block a user