如何自定义特定主机告警值及配置

  • 1.下载hostWarnDiy.json
  • 2.将hostWarnDiy.json存到/server/config/下,仿照修改里面的配置项即可,里面配置项和application.yml告警配置项一致,可以只填写个性化配置项,不用全部填写
  • 3.修改完成后,重启server
hostWarnDiy.json是在公共application.yml告警配置基础上,进行主机自定义配置,因此application.yml中告警开关开启后,才会执行hostWarnDiy.json格式如下:

[
	{
		"hostname":"127.0.0.1",
		"upSpeedMail":"yes",
		"upSpeedVal":10240,
		"downSpeedMail":"yes",
		"downSpeedVal":10240,
		"memWarnMail":"yes",
		"memWarnVal":99,
		"cpuWarnMail":"yes",
		"cpuWarnVal":99,
		"cpuTemperatureWarnMail":"no",
		"cpuTemperatureWarnVal":92,
		"diskWarnVal":99,
		"diskBlock":"",
		"diskWarnMail":"yes"
	},
	{
		"hostname":"127.0.0.2",
		"upSpeedMail":"yes",
		"upSpeedVal":10240,
		"downSpeedMail":"yes",
		"downSpeedVal":10240,
		"memWarnMail":"yes",
		"memWarnVal":99,
		"cpuWarnMail":"yes",
		"cpuWarnVal":99,
		"cpuTemperatureWarnMail":"no",
		"cpuTemperatureWarnVal":92,
		"diskWarnVal":99,
		"diskBlock":"",
		"diskWarnMail":"yes"
	}
]