Skip to content

Conversation

zerwes
Copy link
Contributor

@zerwes zerwes commented Sep 22, 2025

see #852 (closed by accident while trying to rebase to force pushes on master using the github UI)

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'

It seems the bug affects raw and enterprise installations (see #852 (comment))

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant