[Check_mk (english)] bug in notifcations

Spencer Butler spencerb at honeycomb.net
Thu Feb 21 17:20:11 CET 2019


Does anyone have any ideas on a good way to resolve this issue?

From: checkmk-en [mailto:checkmk-en-bounces at lists.mathias-kettner.de] On Behalf Of Spencer Butler
Sent: Saturday, February 16, 2019 17:26
To: checkmk-en at lists.mathias-kettner.de
Subject: [Check_mk (english)] bug in notifcations


Hello,



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?



tl;dr

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',
                                  'abstime',
                                  'longoutput',
                                  'ack_author',
                                  'ack_comment',
                                  'perfdata',
                                  'graph'],
                     '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/20190221/13513d21/attachment-0001.html>


More information about the checkmk-en mailing list