Skip to content

Commit

Permalink
Add description to threshold alarms
Browse files Browse the repository at this point in the history
  • Loading branch information
johannaengland committed Nov 2, 2023
1 parent e297772 commit 143ca64
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ Metric: {{ metric }}
Time: {{ time }}
Value: {{ measured_value }}
Threshold: {% firstof clear alert %}
{% if description %}Description: {{ description }}{% endif %}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{ metric }} cleared at {{ measured_value }} {% firstof clear alert %} on {{ time }}.
{{ metric }} cleared at {{ measured_value }} {% firstof clear alert %} on {{ time }}{% if description %} ({{ description }}){% endif %}.
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ Metric: {{ metric }}
Time: {{ time }}
Value: {{ measured_value }}
Threshold: {{ alert|safe }}
{% if description %}Description: {{ description }}{% endif %}
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{{ metric }} exceeded at {{ measured_value }} {{ alert|safe }} on {{ time }}.
{{ metric }} exceeded at {{ measured_value }} {{ alert|safe }} on {{ time }}{% if description %} ({{ description }}){% endif %}.
1 change: 1 addition & 0 deletions python/nav/thresholdmon.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ def make_event(start, rule, metric, value):
metric=metric,
alert=rule.alert,
ruleid=str(rule.id),
description=rule.description,
measured_value=str(value),
)
if rule.clear:
Expand Down

0 comments on commit 143ca64

Please sign in to comment.