Hi list,
I’ve encountered a problem with a notification script which I use. This script works in version 1.2.8p20, but it shows an error in 1.5.0p5.
I get an error on some variables, they fail with KeyError: ‘PARAMETER_xxxxxxxx’.
2018-10-08 14:13:05 * notifying via , parameters: field6, field5key,
field1key , errorid, processid, field2key, field4key, checkmaintenance, field2, field3, field1, field2content, field1content, field4, field5, field4content, field3content, concerningprocess, field5content, field6content, checkaffectedmonitoringstate,
field6key, field3key, bulk: no
I’ve got this in /local/share/check_mk/web/plugins/wato/notifications.py (just the part related to this field):
( "field1key",
ListChoice(
title = _(“Field 1 is key field”),
choices = [
( “yes”, _(“Yes”) ),
],
default_value = “yes”,
)
),
I did a ‘print context’ and there is no PARAMETER_FIELD1KEY in context (it just doesn’t exist) so this explains the error.
What I did find in context, was ‘PARAMETER_FIELD5KEYS’: u’’, ‘PARAMETER_FIELD1KEY_1’: u’yes’.
Note the extra ‘S’ at FIELD5KEY and the extra ‘_1’ after FIELD1KEY.
Is this a bug / did I screw up my notifications.py / other?
Can anyone put me on the right track?
Met vriendelijke groeten / Kind regards / Mit freundlichen Grüßen,
Arno Wijnhoven