Skip to content

Commit b3508e5

Browse files
committed
refactor(infomaniak-events): return CRIT in case of critical events
1 parent f4e3196 commit b3508e5

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ Monitoring Plugins:
121121
* fail2ban: More compact output (closes #141)
122122
* file-size: fix help text
123123
* fs-inodes: Check inode usage on real and different disks. `--mount` parameter is deprecated.
124+
* infomaniak-events: return CRIT in case of critical events
124125
* keycloak-version: Check Keycloak Version via REST API ([#748](https://github.com/Linuxfabrik/monitoring-plugins/issues/748))
125126
* librenms-alerts, librenms-health: Compact output is the new default and shows non-OK only
126127
* mysql-thread-cache: DB daemon must have been running for an hour before the cache hit rate is measured.

check-plugins/infomaniak-events/infomaniak-events

+6-3
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ import lib.lftest # pylint: disable=C0413
2424
import lib.time # pylint: disable=C0413
2525
import lib.txt # pylint: disable=C0413
2626
from lib.globals import (STATE_OK, STATE_UNKNOWN, # pylint: disable=C0413
27-
STATE_WARN)
27+
STATE_CRIT, STATE_WARN)
2828

2929
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
30-
__version__ = '2025021501'
30+
__version__ = '2025022101'
3131

3232
DESCRIPTION = """Informs you about open events at Infomaniak."""
3333

@@ -179,7 +179,10 @@ def main():
179179
title,
180180
services,
181181
)
182-
state = STATE_WARN
182+
if event.get('type').lower() == 'critical':
183+
state = STATE_CRIT
184+
else:
185+
state = STATE_WARN
183186
perfdata = perfdata.replace('=0', '=1')
184187

185188
table_data.append({

0 commit comments

Comments
 (0)