Is it possible to schedule notification tests periodically? I’m not sure if this could be done via API, script, or some other method you might suggest. The goal is to periodically verify that the notification channels are functioning correctly from Checkmk.
Currently, we’re receiving notifications via Telegram. We create a host with an incorrect IP address, wait for the CRIT notification to be sent, and then delete the host, but this method worsens the system’s availability statistics.
we do notification tests with a shell script that does exactly what Robert has proposed
Just instead of a cronjob we run it as a classical nagios plugin (or local check in the checkmk agent; I’d have to check) either way, this way if anything during the execution goes wrong, you easily get the errors in the service state.
Running the notification test itself as a monitored service seems like the cleanest approach.
That way you are not only checking whether the Telegram notification can be sent, but you can also detect failures in the test script or notification plugin and expose them directly in Checkmk. It also avoids creating artificial CRIT states that distort the availability statistics.
For periodic testing, a local check or classical Nagios plugin sounds more useful to me than creating and deleting dummy hosts.
For those cases I like to add a local check to the CheckMK agent on the CheckMK server. This script generates a services that gets critical from time to time. Using piggyback syntax you can also put this service to another host.