Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
gstlal-visualisation
ligo-scald
Commits
8d8ae295
Commit
8d8ae295
authored
Sep 24, 2019
by
Patrick Godwin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
serve.py: fix issue with nagios check when using threshold checks or when showing critical status
parent
a3cd90c4
Pipeline
#81151
failed with stages
in 3 minutes and 1 second
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
ligo/scald/serve.py
ligo/scald/serve.py
+3
-3
No files found.
ligo/scald/serve.py
View file @
8d8ae295
...
...
@@ -429,13 +429,13 @@ def serve_nagios(check):
if
bad_status
:
if
alert_type
==
'heartbeat'
:
text_status
=
"{num_tags} {alert_tag} more than {lookback} seconds behind"
.
format
(
alert_tag
=
nagios_config
[
'alert_settings'
]
[
'tag_key'
],
alert_tag
=
schema
[
'tag_key'
],
num_tags
=
bad_status
,
lookback
=
duration
,
)
elif
alert_type
==
'threshold'
:
text_status
=
"{num_tags} {alert_tag} above {column} threshold = {threshold} {units} from gps times: {start} - {end}"
.
format
(
alert_tag
=
nagios_config
[
'alert_settings'
]
[
'tag_key'
],
alert_tag
=
schema
[
'tag_key'
],
threshold
=
nagios_config
[
'alert_settings'
][
'threshold'
],
units
=
nagios_config
[
'alert_settings'
][
'threshold_units'
],
num_tags
=
bad_status
,
...
...
@@ -449,7 +449,7 @@ def serve_nagios(check):
text_status
=
"OK: Max delay: {delay} seconds"
.
format
(
delay
=
max
(
alert_values
))
elif
alert_type
==
'threshold'
:
text_status
=
"OK: No {alert_tag}s above {column} threshold = {threshold} {units} from gps times: {start} - {end}"
.
format
(
alert_tag
=
nagios_config
[
'alert_settings'
]
[
'tag_key'
],
alert_tag
=
schema
[
'tag_key'
],
threshold
=
nagios_config
[
'alert_settings'
][
'threshold'
],
units
=
nagios_config
[
'alert_settings'
][
'threshold_units'
],
column
=
measurement
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment