Hello @briand
Thank you for your reply
The file in raw is called var/log/notify.log afaics
And sorry for not posting more context, but from my point of view there is not much more enlightening … I post some more context from the log below.
If I can provide more information, just let me know - my problem is that I have no real idea what I can do - especially as I can not trigger the failed notifications, the just occur randomly.
One obscure idea of mine is: as not just the notification rules, but the complete setup has been migrated over years (as far as I remember this setup started at version 1.6.0 ), at some point some setting host/service (PREVIOUSxxxHARDSTATE) has been introduced, but old hosts and their services have got no default for this, and now, after 2.4, each first notification for these will fail, but the next notification will work as during the first failed the missing var is set… but this is just a crude and vague idea …
And yes, as I had the same concerns like you, I really deleted the old rules, not just deactivated them.
But as the error reoccurred, I rechecked everything and realized that the old “Parameters for HTML Email” where still around (but the notification rules used the new parameters). Now I removed the old (auto-migrated) parameters too.
After the last failure with the new rules I set the “Notification log level” to “Full dump of all variables and command” … maybe this will give me more information if the error reoccurs … paradox expectation: in fact I hope the error will not show up again, but I want the error to show up again so I can get more information …
Anyhow, here a log excerpt of a failed notification (some values obfuscated).
There is a marker set by me: XXX: this seems to be notification for the same host, targeting the same users, but a different service, and this succeeds.
If I can provide more information, juts let me know. Thank you for your assistance and help.
2025-08-15 17:37:19,159 [20] [cmk.base.notify] ----------------------------------------------------------------------
2025-08-15 17:37:19,160 [20] [cmk.base.notify] Got raw notification (XXXhoszXXX;HTTP HTTP) context with 54 variables
2025-08-15 17:37:19,160 [15] [cmk.base.notify] Global rule 'Notify all contacts of a host/service by mail for AB - new'...
2025-08-15 17:37:19,160 [15] [cmk.base.notify] -> does not match: The host is only in the groups notAB, but AB is required
2025-08-15 17:37:19,161 [20] [cmk.base.notify] Global rule 'Notify all contacts of a host/service by mail - new'...
2025-08-15 17:37:19,161 [20] [cmk.base.notify] -> matches!
2025-08-15 17:37:19,161 [20] [cmk.base.notify] - adding notification of YYYanotheruser, XXXuserXXX via mail
2025-08-15 17:37:19,161 [20] [cmk.base.notify] Executing 1 notifications:
2025-08-15 17:37:19,161 [20] [cmk.base.notify] * notifying YYYanotheruser, XXXuserXXX via mail, parameters: bulk_sort_order, host_subject, service_subject, url_prefix, graphs_per_notification, notifications
_with_graphs, matching_rule_nr, matching_rule_text, bulk: yes
2025-08-15 17:37:19,161 [20] [cmk.base.notify] --> storing for bulk notification YYYanotheruser|mail|600|1000|host|XXXhoszXXX
2025-08-15 17:37:19,161 [20] [cmk.base.notify] - stored in /omd/sites/SPK8/var/check_mk/notify/bulk/YYYanotheruser/mail/600,1000,host,XXXhoszXXX/7407a652-8a2f-4a8d-9e8d-36bc453fddfc
2025-08-15 17:37:19,161 [20] [cmk.base.notify] --> storing for bulk notification XXXuserXXX|mail|600|1000|host|XXXhoszXXX
2025-08-15 17:37:19,162 [20] [cmk.base.notify] - stored in /omd/sites/SPK8/var/check_mk/notify/bulk/XXXuserXXX/mail/600,1000,host,XXXhoszXXX/e9125196-b560-476b-9fc0-60e3bdff2e18
2025-08-15 17:38:02,857 [20] [cmk.base.notify] Sending out 2 ripe bulk notifications
2025-08-15 17:38:02,857 [20] [cmk.base.notify] -> XXXuserXXX/mail /omd/sites/SPK8/var/check_mk/notify/bulk/XXXuserXXX/mail/600,1000,host,XXXhoszXXX
2025-08-15 17:38:02,859 [20] [cmk.events.log_to_history] sending command LOG;SERVICE NOTIFICATION: XXXuserXXX;XXXhoszXXX;HTTP HTTP;WARNING;bulk mail;HTTP WARNING: HTTP/1.1 403 Forbidden - 129
bytes in 0.004 second response time
2025-08-15 17:38:02,859 [20] [cmk.events.log_to_history] sending command LOG;HOST NOTIFICATION: XXXuserXXX;XXXhoszXXX;UP;bulk mail;OK - XXXipXXX rta 0.469ms lost 0%
2025-08-15 17:38:02,859 [20] [cmk.events.log_to_history] sending command LOG;SERVICE NOTIFICATION: XXXuserXXX;XXXhoszXXX;HTTP HTTP;CRITICAL;bulk mail;CRITICAL - Socket timeout after 10 seconds
2025-08-15 17:38:04,185 [20] [cmk.base.notify] ERROR: script /omd/sites/SPK8/share/check_mk/notifications/mail --bulk returned with exit code 1
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: Traceback (most recent call last):
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: File "/omd/sites/SPK8/share/check_mk/notifications/mail", line 12, in <module>
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: mail.main()
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 747, in main
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: BulkEmailContent(utils.read_bulk_contexts)
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 642, in __init__
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: txt, html, att = construct_content(
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: ^^^^^^^^^^^^^^^^^^
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 482, in construct_content
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: TemplateRenderer().render_template(
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 280, in render_template
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: return template.render(data)
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: ^^^^^^^^^^^^^^^^^^^^^
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: File "/omd/sites/SPK8/lib/python3.12/site-packages/jinja2/environment.py", line 1295, in render
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: self.environment.handle_exception()
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: File "/omd/sites/SPK8/lib/python3.12/site-packages/jinja2/environment.py", line 942, in handle_exception
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: raise rewrite_traceback_stack(source=source)
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: File "/omd/sites/SPK8/share/check_mk/notifications/templates/mail/base.html", line 91, in top-level template code
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: {% include 'bulk.html' %}
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: File "/omd/sites/SPK8/share/check_mk/notifications/templates/mail/bulk.html", line 45, in top-level template code
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: {{ entry.PREVIOUSSERVICEHARDSTATE[:4] }}
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail:
2025-08-15 17:38:04,185 [20] [cmk.base.notify] mail: jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'PREVIOUSSERVICEHARDSTATE'
2025-08-15 17:38:04,186 [20] [cmk.base.notify] -> YYYanotheruser/mail /omd/sites/SPK8/var/check_mk/notify/bulk/YYYanotheruser/mail/600,1000,host,XXXhoszXXX
2025-08-15 17:38:04,188 [20] [cmk.events.log_to_history] sending command LOG;SERVICE NOTIFICATION: YYYanotheruser;XXXhoszXXX;HTTP HTTP;WARNING;bulk mail;HTTP WARNING: HTTP/1.1 403 Forbidden - 129
bytes in 0.004 second response time
2025-08-15 17:38:04,188 [20] [cmk.events.log_to_history] sending command LOG;HOST NOTIFICATION: YYYanotheruser;XXXhoszXXX;UP;bulk mail;OK - XXXipXXX rta 0.469ms lost 0%
2025-08-15 17:38:04,188 [20] [cmk.events.log_to_history] sending command LOG;SERVICE NOTIFICATION: YYYanotheruser;XXXhoszXXX;HTTP HTTP;CRITICAL;bulk mail;CRITICAL - Socket timeout after 10 second
s
2025-08-15 17:38:05,462 [20] [cmk.base.notify] ERROR: script /omd/sites/SPK8/share/check_mk/notifications/mail --bulk returned with exit code 1
2025-08-15 17:38:05,462 [20] [cmk.base.notify] mail: Traceback (most recent call last):
2025-08-15 17:38:05,462 [20] [cmk.base.notify] mail: File "/omd/sites/SPK8/share/check_mk/notifications/mail", line 12, in <module>
2025-08-15 17:38:05,462 [20] [cmk.base.notify] mail: mail.main()
2025-08-15 17:38:05,462 [20] [cmk.base.notify] mail: File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 747, in main
2025-08-15 17:38:05,462 [20] [cmk.base.notify] mail: BulkEmailContent(utils.read_bulk_contexts)
2025-08-15 17:38:05,462 [20] [cmk.base.notify] mail: File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 642, in __init__
2025-08-15 17:38:05,462 [20] [cmk.base.notify] mail: txt, html, att = construct_content(
2025-08-15 17:38:05,462 [20] [cmk.base.notify] mail: ^^^^^^^^^^^^^^^^^^
2025-08-15 17:38:05,462 [20] [cmk.base.notify] mail: File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 482, in construct_content
2025-08-15 17:38:05,463 [20] [cmk.base.notify] mail: TemplateRenderer().render_template(
2025-08-15 17:38:05,463 [20] [cmk.base.notify] mail: File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 280, in render_template
2025-08-15 17:38:05,463 [20] [cmk.base.notify] mail: return template.render(data)
2025-08-15 17:38:05,463 [20] [cmk.base.notify] mail: ^^^^^^^^^^^^^^^^^^^^^
2025-08-15 17:38:05,463 [20] [cmk.base.notify] mail: File "/omd/sites/SPK8/lib/python3.12/site-packages/jinja2/environment.py", line 1295, in render
2025-08-15 17:38:05,463 [20] [cmk.base.notify] mail: self.environment.handle_exception()
2025-08-15 17:38:05,463 [20] [cmk.base.notify] mail: File "/omd/sites/SPK8/lib/python3.12/site-packages/jinja2/environment.py", line 942, in handle_exception
2025-08-15 17:38:05,463 [20] [cmk.base.notify] mail: raise rewrite_traceback_stack(source=source)
2025-08-15 17:38:05,463 [20] [cmk.base.notify] mail: File "/omd/sites/SPK8/share/check_mk/notifications/templates/mail/base.html", line 91, in top-level template code
2025-08-15 17:38:05,463 [20] [cmk.base.notify] mail: {% include 'bulk.html' %}
2025-08-15 17:38:05,463 [20] [cmk.base.notify] mail: File "/omd/sites/SPK8/share/check_mk/notifications/templates/mail/bulk.html", line 45, in top-level template code
2025-08-15 17:38:05,463 [20] [cmk.base.notify] mail: {{ entry.PREVIOUSSERVICEHARDSTATE[:4] }}
2025-08-15 17:38:05,463 [20] [cmk.base.notify] mail:
2025-08-15 17:38:05,463 [20] [cmk.base.notify] mail: jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'PREVIOUSSERVICEHARDSTATE'
2025-08-15 17:38:05,463 [20] [cmk.events.log_to_history] sending command LOG;SERVICE NOTIFICATION RESULT: YYYanotheruser;XXXhoszXXX;HTTP HTTP;WARNING;bulk mail;jinja2.exceptions.UndefinedError: '
dict object' has no attribute 'PREVIOUSSERVICEHARDSTATE';Traceback (most recent call last): -- File "/omd/sites/SPK8/share/check_mk/notifications/mail", line 12, in <module> -- mail.main() -- File "/omd/
sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 747, in main -- BulkEmailContent(utils.read_bulk_contexts) -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 642, i
n __init__ -- txt, html, att = construct_content( -- ^^^^^^^^^^^^^^^^^^ -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 482, in construct_content -- Te
mplateRenderer().render_template( -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 280, in render_template -- return template.render(data) -- ^^^^^^^^^^^^^^^^^^^^^ --
File "/omd/sites/SPK8/lib/python3.12/site-packages/jinja2/environment.py", line 1295, in render -- self.environment.handle_exception() -- File "/omd/sites/SPK8/lib/python3.12/site-packages/jinja2/enviro
nment.py", line 942, in handle_exception -- raise rewrite_traceback_stack(source=source) -- File "/omd/sites/SPK8/share/check_mk/notifications/templates/mail/base.html", line 91, in top-level template code
-- {% include 'bulk.html' %} -- File "/omd/sites/SPK8/share/check_mk/notifications/templates/mail/bulk.html", line 45, in top-level template code -- {{ entry.PREVIOUSSERVICEHARDSTATE[:4] }} -- -- jin
ja2.exceptions.UndefinedError: 'dict object' has no attribute 'PREVIOUSSERVICEHARDSTATE'
2025-08-15 17:38:05,463 [20] [cmk.events.log_to_history] sending command LOG;HOST NOTIFICATION RESULT: YYYanotheruser;XXXhoszXXX;WARNING;bulk mail;jinja2.exceptions.UndefinedError: 'dict object'
has no attribute 'PREVIOUSSERVICEHARDSTATE';Traceback (most recent call last): -- File "/omd/sites/SPK8/share/check_mk/notifications/mail", line 12, in <module> -- mail.main() -- File "/omd/sites/SPK8/li
b/python3/cmk/notification_plugins/mail.py", line 747, in main -- BulkEmailContent(utils.read_bulk_contexts) -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 642, in __init__ --
txt, html, att = construct_content( -- ^^^^^^^^^^^^^^^^^^ -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 482, in construct_content -- TemplateRendere
r().render_template( -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 280, in render_template -- return template.render(data) -- ^^^^^^^^^^^^^^^^^^^^^ -- File "/omd
/sites/SPK8/lib/python3.12/site-packages/jinja2/environment.py", line 1295, in render -- self.environment.handle_exception() -- File "/omd/sites/SPK8/lib/python3.12/site-packages/jinja2/environment.py", li
ne 942, in handle_exception -- raise rewrite_traceback_stack(source=source) -- File "/omd/sites/SPK8/share/check_mk/notifications/templates/mail/base.html", line 91, in top-level template code -- {% include 'bulk.html' %} -- File "/omd/sites/SPK8/share/check_mk/notifications/templates/mail/bulk.html", line 45, in top-level template code -- {{ entry.PREVIOUSSERVICEHARDSTATE[:4] }} -- -- jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'PREVIOUSSERVICEHARDSTATE'
2025-08-15 17:38:05,463 [20] [cmk.events.log_to_history] sending command LOG;SERVICE NOTIFICATION RESULT: YYYanotheruser;XXXhoszXXX;HTTP HTTP;WARNING;bulk mail;jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'PREVIOUSSERVICEHARDSTATE';Traceback (most recent call last): -- File "/omd/sites/SPK8/share/check_mk/notifications/mail", line 12, in <module> -- mail.main() -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 747, in main -- BulkEmailContent(utils.read_bulk_contexts) -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 642, in __init__ -- txt, html, att = construct_content( -- ^^^^^^^^^^^^^^^^^^ -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 482, in construct_content -- TemplateRenderer().render_template( -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 280, in render_template -- return template.render(data) -- ^^^^^^^^^^^^^^^^^^^^^ -- File "/omd/sites/SPK8/lib/python3.12/site-packages/jinja2/environment.py", line 1295, in render -- self.environment.handle_exception() -- File "/omd/sites/SPK8/lib/python3.12/site-packages/jinja2/environment.py", line 942, in handle_exception -- raise rewrite_traceback_stack(source=source) -- File "/omd/sites/SPK8/share/check_mk/notifications/templates/mail/base.html", line 91, in top-level template code -- {% include 'bulk.html' %} -- File "/omd/sites/SPK8/share/check_mk/notifications/templates/mail/bulk.html", line 45, in top-level template code -- {{ entry.PREVIOUSSERVICEHARDSTATE[:4] }} -- -- jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'PREVIOUSSERVICEHARDSTATE'
2025-08-15 17:38:24,163 [20] [cmk.base.notify] ----------------------------------------------------------------------
2025-08-15 17:38:24,163 [20] [cmk.base.notify] Got raw notification (XXXhoszXXX;ExchangeHealth) context with 54 variables
2025-08-15 17:38:24,163 [15] [cmk.base.notify] Global rule 'Notify all contacts of a host/service by mail for AB - new'...
2025-08-15 17:38:24,163 [15] [cmk.base.notify] -> does not match: The host is only in the groups notAB, but AB is required
2025-08-15 17:38:24,164 [20] [cmk.base.notify] Global rule 'Notify all contacts of a host/service by mail - new'...
2025-08-15 17:38:24,164 [20] [cmk.base.notify] -> matches!
2025-08-15 17:38:24,164 [20] [cmk.base.notify] - adding notification of XXXuserXXX, YYYanotheruser via mail
2025-08-15 17:38:24,164 [20] [cmk.base.notify] Executing 1 notifications:
2025-08-15 17:38:24,165 [20] [cmk.base.notify] * notifying XXXuserXXX, YYYanotheruser via mail, parameters: bulk_sort_order, host_subject, service_subject, url_prefix, graphs_per_notification, notifications_with_graphs, matching_rule_nr, matching_rule_text, bulk: yes
2025-08-15 17:38:24,165 [20] [cmk.base.notify] --> storing for bulk notification XXXuserXXX|mail|600|1000|host|XXXhoszXXX
2025-08-15 17:38:24,165 [20] [cmk.base.notify] - created bulk directory /omd/sites/SPK8/var/check_mk/notify/bulk/XXXuserXXX/mail/600,1000,host,XXXhoszXXX
2025-08-15 17:38:24,165 [20] [cmk.base.notify] - stored in /omd/sites/SPK8/var/check_mk/notify/bulk/XXXuserXXX/mail/600,1000,host,XXXhoszXXX/f39185a9-72b3-474b-a826-e5bfc354e732
2025-08-15 17:38:24,165 [20] [cmk.base.notify] --> storing for bulk notification YYYanotheruser|mail|600|1000|host|XXXhoszXXX
2025-08-15 17:38:24,165 [20] [cmk.base.notify] - created bulk directory /omd/sites/SPK8/var/check_mk/notify/bulk/YYYanotheruser/mail/600,1000,host,XXXhoszXXX
2025-08-15 17:38:24,166 [20] [cmk.base.notify] - stored in /omd/sites/SPK8/var/check_mk/notify/bulk/YYYanotheruser/mail/600,1000,host,XXXhoszXXX/60ca5f2b-02eb-4389-bf6c-4a7fdf6d6e7f
2025-08-15 17:38:04,186 [20] [cmk.events.log_to_history] sending command LOG;SERVICE NOTIFICATION RESULT: XXXuserXXX;XXXhoszXXX;HTTP HTTP;WARNING;bulk mail;jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'PREVIOUSSERVICEHARDSTATE';Traceback (most recent call last): -- File "/omd/sites/SPK8/share/check_mk/notifications/mail", line 12, in <module> -- mail.main() -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 747, in main -- BulkEmailContent(utils.read_bulk_contexts) -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 642, in __init__ -- txt, html, att = construct_content( -- ^^^^^^^^^^^^^^^^^^ -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 482, in construct_content -- TemplateRenderer().render_template( -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 280, in render_template -- return template.render(data) -- ^^^^^^^^^^^^^^^^^^^^^ -- File "/omd/sites/SPK8/lib/python3.12/site-packages/jinja2/environment.py", line 1295, in render -- self.environment.handle_exception() -- File "/omd/sites/SPK8/lib/python3.12/site-packages/jinja2/environment.py", line 942, in handle_exception -- raise rewrite_traceback_stack(source=source) -- File "/omd/sites/SPK8/share/check_mk/notifications/templates/mail/base.html", line 91, in top-level template code -- {% include 'bulk.html' %} -- File "/omd/sites/SPK8/share/check_mk/notifications/templates/mail/bulk.html", line 45, in top-level template code -- {{ entry.PREVIOUSSERVICEHARDSTATE[:4] }} -- -- jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'PREVIOUSSERVICEHARDSTATE'
2025-08-15 17:38:04,186 [20] [cmk.events.log_to_history] sending command LOG;HOST NOTIFICATION RESULT: XXXuserXXX;XXXhoszXXX;WARNING;bulk mail;jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'PREVIOUSSERVICEHARDSTATE';Traceback (most recent call last): -- File "/omd/sites/SPK8/share/check_mk/notifications/mail", line 12, in <module> -- mail.main() -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 747, in main -- BulkEmailContent(utils.read_bulk_contexts) -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 642, in __init__ -- txt, html, att = construct_content( -- ^^^^^^^^^^^^^^^^^^ -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 482, in construct_content -- TemplateRenderer().render_template( -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 280, in render_template -- return template.render(data) -- ^^^^^^^^^^^^^^^^^^^^^ -- File "/omd/sites/SPK8/lib/python3.12/site-packages/jinja2/environment.py", line 1295, in render -- self.environment.handle_exception() -- File "/omd/sites/SPK8/lib/python3.12/site-packages/jinja2/environment.py", line 942, in handle_exception -- raise rewrite_traceback_stack(source=source) -- File "/omd/sites/SPK8/share/check_mk/notifications/templates/mail/base.html", line 91, in top-level template code -- {% include 'bulk.html' %} -- File "/omd/sites/SPK8/share/check_mk/notifications/templates/mail/bulk.html", line 45, in top-level template code -- {{ entry.PREVIOUSSERVICEHARDSTATE[:4] }} -- -- jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'PREVIOUSSERVICEHARDSTATE'
2025-08-15 17:38:04,186 [20] [cmk.events.log_to_history] sending command LOG;SERVICE NOTIFICATION RESULT: XXXuserXXX;XXXhoszXXX;HTTP HTTP;WARNING;bulk mail;jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'PREVIOUSSERVICEHARDSTATE';Traceback (most recent call last): -- File "/omd/sites/SPK8/share/check_mk/notifications/mail", line 12, in <module> -- mail.main() -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 747, in main -- BulkEmailContent(utils.read_bulk_contexts) -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 642, in __init__ -- txt, html, att = construct_content( -- ^^^^^^^^^^^^^^^^^^ -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 482, in construct_content -- TemplateRenderer().render_template( -- File "/omd/sites/SPK8/lib/python3/cmk/notification_plugins/mail.py", line 280, in render_template -- return template.render(data) -- ^^^^^^^^^^^^^^^^^^^^^ -- File "/omd/sites/SPK8/lib/python3.12/site-packages/jinja2/environment.py", line 1295, in render -- self.environment.handle_exception() -- File "/omd/sites/SPK8/lib/python3.12/site-packages/jinja2/environment.py", line 942, in handle_exception -- raise rewrite_traceback_stack(source=source) -- File "/omd/sites/SPK8/share/check_mk/notifications/templates/mail/base.html", line 91, in top-level template code -- {% include 'bulk.html' %} -- File "/omd/sites/SPK8/share/check_mk/notifications/templates/mail/bulk.html", line 45, in top-level template code -- {{ entry.PREVIOUSSERVICEHARDSTATE[:4] }} -- -- jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'PREVIOUSSERVICEHARDSTATE'
# XXX: this seems to be notification for the same host, but a different service, and this succeeds
2025-08-15 17:38:24,163 [20] [cmk.base.notify] ----------------------------------------------------------------------
2025-08-15 17:38:24,163 [20] [cmk.base.notify] Got raw notification (XXXhoszXXX;ExchangeHealth) context with 54 variables
2025-08-15 17:38:24,163 [15] [cmk.base.notify] Global rule 'Notify all contacts of a host/service by mail for AB - new'...
2025-08-15 17:38:24,163 [15] [cmk.base.notify] -> does not match: The host is only in the groups notAB, but AB is required
2025-08-15 17:38:24,164 [20] [cmk.base.notify] Global rule 'Notify all contacts of a host/service by mail - new'...
2025-08-15 17:38:24,164 [20] [cmk.base.notify] -> matches!
2025-08-15 17:38:24,164 [20] [cmk.base.notify] - adding notification of XXXuserXXX, YYYanotheruser via mail
2025-08-15 17:38:24,164 [20] [cmk.base.notify] Executing 1 notifications:
2025-08-15 17:38:24,165 [20] [cmk.base.notify] * notifying XXXuserXXX, YYYanotheruser via mail, parameters: bulk_sort_order, host_subject, service_subject, url_prefix, graphs_per_notification, notifications
_with_graphs, matching_rule_nr, matching_rule_text, bulk: yes
2025-08-15 17:38:24,165 [20] [cmk.base.notify] --> storing for bulk notification XXXuserXXX|mail|600|1000|host|XXXhoszXXX
2025-08-15 17:38:24,165 [20] [cmk.base.notify] - created bulk directory /omd/sites/SPK8/var/check_mk/notify/bulk/XXXuserXXX/mail/600,1000,host,XXXhoszXXX
2025-08-15 17:38:24,165 [20] [cmk.base.notify] - stored in /omd/sites/SPK8/var/check_mk/notify/bulk/XXXuserXXX/mail/600,1000,host,XXXhoszXXX/f39185a9-72b3-474b-a826-e5bfc354e732
2025-08-15 17:38:24,165 [20] [cmk.base.notify] --> storing for bulk notification YYYanotheruser|mail|600|1000|host|XXXhoszXXX
2025-08-15 17:38:24,165 [20] [cmk.base.notify] - created bulk directory /omd/sites/SPK8/var/check_mk/notify/bulk/YYYanotheruser/mail/600,1000,host,XXXhoszXXX
2025-08-15 17:38:24,166 [20] [cmk.base.notify] - stored in /omd/sites/SPK8/var/check_mk/notify/bulk/YYYanotheruser/mail/600,1000,host,XXXhoszXXX/60ca5f2b-02eb-4389-bf6c-4a7fdf6d6e7f