我测试通知和升级链的正常方法是通过引起故障(例如阻塞端口)来模拟故障。
但这是完全不令人满意的。我不想在没有的nagios中记录停机时间。我也不想等。
有谁知道一种在不引起中断的情况下测试通知链的方法?例如这样的事情:
$ ./check_notifications_chain <service|host> <time down>
at <x> minutes notification email sent to group <people>
at <2x> minutes notification email sent to group <people>
at <3x> minutes escalated to group <management>
at <200x> rm -rf; shutdown -h now executed.
Run Code Online (Sandbox Code Playgroud)
扩展这种范式,我可能会将通知链本身做为Nagios检查,但是在我的大脑爆炸之前,我将在这里停止。
任何人?