Skip to content

Conversation

@mayrstefan
Copy link
Contributor

General information

When notification variables get truncated we only see "...". The additional text "Attention: Removed remaining content because it was too long." is missing because it is in a new line. Host/Service output uses "\\n" instead of "\n". So the added text needs to escape the slash too.

Bug reports

Please include:

  • Detailed steps to reproduce the bug
  1. use a local check to simulate a service with very long output
#!/bin/bash
cat <<EOF
<<<local>>>
0 "longoutput" - short output\nlong output\n$(for i in {1..128000}; do echo -n "x"; done)
EOF
  1. Use the example script from https://docs.checkmk.com/latest/en/notifications.html?lquery=notifications#scripts
  2. change the notification script to change state
  3. look into the output of the notification script

Proposed changes

Escape the slash to generate "\\n" as output

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants