filipnet / checkmk-telegram-notify

Get alerted by Check_MK via Telegram bash script
https://www.filipnet.de/checkmk-telegram-notify
BSD 3-Clause "New" or "Revised" License
58 stars 27 forks source link

Fix "no overall checkmk notifications anymore" if curl timeout happens #19

Closed Elompenta closed 3 months ago

Elompenta commented 3 months ago

Curl timeouts (eg. IPv6 Network with non working PMTUD) have the effect for CheckMK that the whole notify process will aborted and not only this single plugin.

Added a timeout to the curl request (if you get no connect in 5 sec. forgot it ;)). With this the other notifications plugins are executed as expected from the CheckMK executor

Sample log output:

2024-07-27 21:05:16,787 [20] [cmk.base.notify] Output: curl: (28) Operation timed out after 5001 milliseconds with 0 out of 0 bytes received 2024-07-27 21:05:16,788 [20] [cmk.base.notify] Output: Not able to send Telegram message 2024-07-27 21:05:16,789 [20] [cmk.base.notify] Output: 2024-07-27 21:05:16,789 [20] [cmk.base.notify] Plugin exited with code 2 .. other notification plugins following and working