このようには書けぬ
そのままではBasic認証を通過できぬ。
check host WEBSERVER_production with address www.example.com if failed port 80 protocol http for 3 cycles then alert alert admin@example.com
当然monitのログに、以下のように「401だわー!」と出力される。
[JST Jul 11 11:45:14] error : 'WEBSERVER_production' failed protocol test [HTTP] at [169.254.169.254]:80/login [TCP/IP] -- HTTP error: Server returned status 401
/loginになってるのは監視先がRailsで作ってあってリダイレクトしておりますゆえ。
のでこのように書く
check host WEBSERVER_production with address www.example.com if failed url http://USER:PASS@169.254.169.254/login for 3 cycles then alert alert admin@example.com
Basic認証で邪魔されるのはPort80か443を監視したい場合だろうし、まあ大体同じもんだからこれで我慢しようって感じですわ。