我想让Monit检查一个Web应用程序的健康状况,频繁地运行廉价/平凡的检查以及不经常检查(例如1/5分钟)的昂贵/不重要的检查。 我怎么能告诉它检查一个给定的主机比每个监视间隔更频繁?
我在看Monit的文档 ,偶然发现了这个:
check process dynamo with pidfile /etc/dynamo.pid every 2 cycles start program = "/etc/init.d/dynamo start" stop program = "/etc/init.d/dynamo stop" if failed port 8840 then alert
因此,您可以在检查之间指定任意数量的检查周期以进行昂贵的检查。 configurationMonit以获得您想要的检查时间间隔。
两个选项: