Merge ~xavpaice/charm-nagios:add_service_timeout into ~nagios-charmers/charm-nagios:master

Proposed by Xav Paice
Status: Merged
Approved by: James Hebden
Approved revision: 4bfd66157c95723ecde332d575de8c82606545a2
Merged at revision: 303283a424a8cb0fef60a9c996c6a1bd8eb57f66
Proposed branch: ~xavpaice/charm-nagios:add_service_timeout
Merge into: ~nagios-charmers/charm-nagios:master
Diff against target: 44 lines (+11/-1)
3 files modified
config.yaml (+9/-0)
hooks/templates/nagios-cfg.tmpl (+1/-1)
hooks/upgrade-charm (+1/-0)
Reviewer Review Type Date Requested Status
James Hebden (community) Approve
Canonical IS Reviewers Pending
Review via email: mp+369630@code.launchpad.net

Commit message

Add service_check_timout config item

To post a comment you must log in.
Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

This merge proposal is being monitored by mergebot. Change the status to Approved to merge.

Revision history for this message
James Hebden (ec0) wrote :

LGMT

review: Approve
Revision history for this message
James Hebden (ec0) wrote :

Err, LGTM

Revision history for this message
🤖 Canonical IS Merge Bot (canonical-is-mergebot) wrote :

Change successfully merged at revision 303283a424a8cb0fef60a9c996c6a1bd8eb57f66

Revision history for this message
James Hebden (ec0) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/config.yaml b/config.yaml
2index 6466324..4ce0f18 100644
3--- a/config.yaml
4+++ b/config.yaml
5@@ -183,6 +183,15 @@ options:
6 A number of seconds before nrpe checks timeout from not being able
7 to connect to the client or finish execution of the command.
8 Raise this value to combat 'CHECK_NRPE Socket timeout alerts'
9+ service_check_timeout:
10+ default: 60
11+ type: int
12+ description: |
13+ Number of seconds Nagios allows for a service check before killing
14+ it off. This ties in with service_check_timeout_state. NRPE will
15+ alert for the lower of this value or check_timeout. Also note that
16+ host_check_timeout is set to 30 seconds, and it's preferred to have
17+ service_check_timout greater than host_check_timeout.
18 service_check_timeout_state:
19 default: c
20 type: string
21diff --git a/hooks/templates/nagios-cfg.tmpl b/hooks/templates/nagios-cfg.tmpl
22index 16284a1..c45ed31 100644
23--- a/hooks/templates/nagios-cfg.tmpl
24+++ b/hooks/templates/nagios-cfg.tmpl
25@@ -616,7 +616,7 @@ sleep_time=0.25
26 # ocsp command, and performance data commands. All values are in
27 # seconds.
28
29-service_check_timeout=60
30+service_check_timeout={{ service_check_timeout }}
31 host_check_timeout=30
32 event_handler_timeout=30
33 notification_timeout=30
34diff --git a/hooks/upgrade-charm b/hooks/upgrade-charm
35index 2871023..19e736c 100755
36--- a/hooks/upgrade-charm
37+++ b/hooks/upgrade-charm
38@@ -263,6 +263,7 @@ def update_config():
39 'nagios_hostname': "{}-{}".format(host_context, local_host_name),
40 'load_monitor': hookenv.config('load_monitor'),
41 'is_container': host.is_container(),
42+ 'service_check_timeout': hookenv.config('service_check_timeout'),
43 'service_check_timeout_state': hookenv.config('service_check_timeout_state'),
44 }
45

Subscribers

People subscribed via source and target branches