我要在服务器上做一个测试,这需要一些时间。我希望考试在凌晨3小时到5小时之间安排好。
此外,用户可以在白天启动测试。
有可能用Icinga2吗?
发布于 2018-03-05 15:39:22
这应该是可能的。
1.创建一个TimePeriod,例如在timeperiods.conf中
object TimePeriod "3to5" {
display_name = "Icinga 2 3to5 TimePeriod"
ranges = {
"monday" = "03:00-5:00"
"tuesday" = "03:00-5:00"
"wednesday" = "03:00-5:00"
"thursday" = "03:00-5:00"
"friday" = "03:00-5:00"
}
} 2.申请送达
apply Service "some_action" {
import "some_check"
max_check_attempts = 1
check_period = "3to5"
...
}3.要手动执行此服务,只需在web界面中使用“立即检查”按钮即可。
但是..。来自监控门户的人反对它:https://monitoring-portal.org/woltlab/index.php?thread/41080-schedule-check-on-a-specific-time/:我们可以阅读
在特定时间执行检查并不能真正适用于Icinga 2和基于间隔的调度。最好为它创建一个cron作业,并将检查结果输入REST *。
https://serverfault.com/questions/883950
复制相似问题