Hi Deklan,
Shout out to Eric Griepsma https://forum.checkmk.com/u/egriepsma for the solution!
It would appear this has been an issue for over a year with no fix from the CMK side.
Here is what I ended up doing.
+++ lib/check_mk/notification_plugins/opsgenie_issues.py 2024-04-03 01:00:20.293262255 +0000
@@ -163,6 +163,8 @@
desc = context.get("PARAMETER_HOST_DESC") or tmpl_host_desc
msg = context.get("PARAMETER_HOST_MSG") or tmpl_host_msg
alias = "HOST_PROBLEM_ID: %s" % context["HOSTPROBLEMID"]
+ if alias == 'HOST_PROBLEM_ID: 0':
+ alias = 'HOST_PROBLEM_ID: %s' % context['LASTHOSTPROBLEMID']
ack_author = context["HOSTACKAUTHOR"]
ack_comment = context["HOSTACKCOMMENT"]
else:
@@ -177,6 +179,8 @@
desc = context.get("PARAMETER_SVC_DESC") or tmpl_svc_desc
msg = context.get("PARAMETER_SVC_MSG") or tmpl_svc_msg
alias = "SVC_PROBLEM_ID: %s" % context["SERVICEPROBLEMID"]
+ if alias == 'SVC_PROBLEM_ID: 0':
+ alias = 'SVC_PROBLEM_ID: %s' % context['LASTSERVICEPROBLEMID']
ack_author = context["SERVICEACKAUTHOR"]
ack_comment = context["SERVICEACKCOMMENT"]
--- etc/nagios/conf.d/check_mk_templates.cfg.org 2024-04-03 00:02:02.013982778 +0000
+++ etc/nagios/conf.d/check_mk_templates.cfg 2024-04-03 00:04:49.521740025 +0000
@@ -355,6 +355,8 @@
NOTIFY_LASTSERVICESTATEID='$LASTSERVICESTATEID$' \
NOTIFY_LASTSERVICESTATECHANGE='$LASTSERVICESTATECHANGE$' \
NOTIFY_LASTSERVICEOK='$LASTSERVICEOK$' \
+ NOTIFY_LASTHOSTPROBLEMID='$LASTHOSTPROBLEMID$' \
+ NOTIFY_LASTSERVICEPROBLEMID='$LASTSERVICEPROBLEMID$' \
NOTIFY_SERVICEATTEMPT='$SERVICEATTEMPT$' \
NOTIFY_SERVICESTATE='$SERVICESTATE$' \
NOTIFY_SERVICESTATEID='$SERVICESTATEID$' \