nagios-charmers team mailing list archive
-
nagios-charmers team
-
Mailing list archive
-
Message #00553
[Merge] ~xavpaice/nagios-charm:add_service_timeout into nagios-charm:master
Xav Paice has proposed merging ~xavpaice/nagios-charm:add_service_timeout into nagios-charm:master.
Requested reviews:
Nagios Charm developers (nagios-charmers)
For more details, see:
https://code.launchpad.net/~xavpaice/nagios-charm/+git/nagios-charm/+merge/369630
--
Your team Nagios Charm developers is requested to review the proposed merge of ~xavpaice/nagios-charm:add_service_timeout into nagios-charm:master.
diff --git a/config.yaml b/config.yaml
index 6466324..4ce0f18 100644
--- a/config.yaml
+++ b/config.yaml
@@ -183,6 +183,15 @@ options:
A number of seconds before nrpe checks timeout from not being able
to connect to the client or finish execution of the command.
Raise this value to combat 'CHECK_NRPE Socket timeout alerts'
+ service_check_timeout:
+ default: 60
+ type: int
+ description: |
+ Number of seconds Nagios allows for a service check before killing
+ it off. This ties in with service_check_timeout_state. NRPE will
+ alert for the lower of this value or check_timeout. Also note that
+ host_check_timeout is set to 30 seconds, and it's preferred to have
+ service_check_timout greater than host_check_timeout.
service_check_timeout_state:
default: c
type: string
diff --git a/hooks/templates/nagios-cfg.tmpl b/hooks/templates/nagios-cfg.tmpl
index 16284a1..c45ed31 100644
--- a/hooks/templates/nagios-cfg.tmpl
+++ b/hooks/templates/nagios-cfg.tmpl
@@ -616,7 +616,7 @@ sleep_time=0.25
# ocsp command, and performance data commands. All values are in
# seconds.
-service_check_timeout=60
+service_check_timeout={{ service_check_timeout }}
host_check_timeout=30
event_handler_timeout=30
notification_timeout=30
diff --git a/hooks/upgrade-charm b/hooks/upgrade-charm
index 2871023..19e736c 100755
--- a/hooks/upgrade-charm
+++ b/hooks/upgrade-charm
@@ -263,6 +263,7 @@ def update_config():
'nagios_hostname': "{}-{}".format(host_context, local_host_name),
'load_monitor': hookenv.config('load_monitor'),
'is_container': host.is_container(),
+ 'service_check_timeout': hookenv.config('service_check_timeout'),
'service_check_timeout_state': hookenv.config('service_check_timeout_state'),
}
Follow ups