[Check_mk (english)] bug in notifcations

Spencer Butler spencerb at honeycomb.net
Sun Feb 17 00:26:17 CET 2019


After a recent upgrade from check-mk-raw 1.4.0p11.cre to check-mk-raw 1.5.0p5.cre I noticed that sometimes html email notifications no longer had links. After doing some troubleshooting, I noticed the alerts that were changed after the upgrade, were the ones missing links. I then found the cause of this behavior. What is the best way for me to resolve this issue?


sends proper links: "'url_prefix': 'https://cmk.example.net/hc/check_mk/'})},"

does NOT send links: "'url_prefix': {'manual': 'https://cmk.example.net/hc/check_mk/'}})}, "

manual edit fixes the issue, until the notification is changed.

Rule definition unmodified since upgrade:

 {'allow_disable': True,
  'comment': u'',
  'contact_all': False,
  'contact_all_with_email': False,
  'contact_object': True,
  'description': u'downtime and ack',
  'disabled': False,
  'docu_url': '',
  'match_host_event': ['s', 'x'],
  'match_service_event': ['s', 'x'],
  'notify_plugin': (u'mail',
                    {'from': 'cmk at example.net',
                     'url_prefix': 'https://cmk.example.net/hc/check_mk/'})},

Rule definition modified since upgrade:

 {'allow_disable': True,
  'comment': u'',
  'contact_all': False,
  'contact_all_with_email': False,
  'contact_object': True,
  'description': u'CRIT Infrastructure alerts (custom subject:)',                                                                                                                                                                                                                                                                                                                                                                           'disabled': False,
  'match_host_event': ['?r', '?d', '?u', 's', 'x', 'as', 'af'],
  'match_hosttags': ['critical'],
  'match_service_event': ['?r', '?w', '?c', '?u', 's', 'x', 'as', 'af'],
  'notify_plugin': (u'mail',
                    {'elements': ['address',
                     'from': 'cmk at example.net',
                     'host_subject': u'CRIT Infrastructure :: Check_MK: $HOSTNAME$ - $EVENT_TXT$',
                     'service_subject': u'CRIT Infrastructure :: Check_MK: $HOSTNAME$/$SERVICEDESC$ $EVENT_TXT$',
                     'url_prefix': {'manual': 'https://cmk.example.net/hc/check_mk/'}})},

I was able to enable the links in html email alerts be manually editing the notifications.mk file. However, this is rewritten to the non-working style upon any edits to the notification rule.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mathias-kettner.de/pipermail/checkmk-en/attachments/20190216/d79aab3f/attachment-0001.html>

More information about the checkmk-en mailing list