Skip to content

Conversation

zerwes
Copy link
Contributor

@zerwes zerwes commented Sep 15, 2025

General information

Avoid failing notifications observed in the raw edition after upgrade to 2.4.x

Bug reports

In some cases notifications will fail in the raw edition due to some missing VARs with the error
jinja2.exceptions.UndefinedError: 'dict object' has no attribute 'PREVIOUSSERVICEHARDSTATE'

More details can be found in https://forum.checkmk.com/t/after-upgrade-from-2-3-x-to-2-4-x-raw-sporadically-failing-notifications-with-jinja2-exceptions-undefinederror-dict-object-has-no-attribute-previousservicehardstate/55347

OS used : Debian GNU/Linux 12 (bookworm)

Proposed changes

The proposed changes just assure undefined values for the PREVIOUS[SERVICE|HOST]HARDSTATE in the jinja2 mail notification templates are set to some somehow sane defaults in order to avoid failing notifications.

@Yogibaer75
Copy link
Contributor

I found also a enterprise installation today what is affected from this problem. So it is not only a RAW edition problem.

@zerwes zerwes closed this Sep 22, 2025
@zerwes zerwes force-pushed the fix-for-missing-previousXhardstate branch from 6fecb14 to dc920cc Compare September 22, 2025 06:55
@github-actions github-actions bot locked and limited conversation to collaborators Sep 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants