Skip to content

Commit dd94aab

Browse files
committed
fix(icinga-topflap-services): indexerror
1 parent 13e48b5 commit dd94aab

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

check-plugins/icinga-topflap-services/icinga-topflap-services

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ from lib.globals import (STATE_CRIT, STATE_OK, # pylint: disable=C0413
2929
STATE_UNKNOWN, STATE_WARN)
3030

3131
__author__ = 'Linuxfabrik GmbH, Zurich/Switzerland'
32-
__version__ = '2025030301'
32+
__version__ = '2025031701'
3333

3434
DESCRIPTION = """This check plugin counts the number of state changes per service within a
3535
given lookback interval. This makes it possible to detect fast flapping services.
@@ -246,8 +246,10 @@ def main():
246246

247247
# ignore myself
248248
data['service_display_name'] = event.get('service').get('display_name')
249+
if not data['service_display_name']:
250+
continue
249251
if 'top' in data['service_display_name'].lower() and \
250-
'flap' in data['service_display_name'].lower():
252+
'flap' in data['service_display_name'].lower():
251253
continue
252254

253255
data['host_id'] = event.get('host').get('id')

0 commit comments

Comments
 (0)