cacti属于轻量级的监控系统,默认只能配置一个报警信箱,为了协同作业,需要增加报警信箱,实现每台主机配置一个报警信箱,详情如下:
环境:Cacti 0.8.7g Monitor1.2.1 Thold 0.4.1
1、cacti.host表增加一个字段 alertMail
ALTER TABLE host ADD alertMail varchar(200) default '' not null AFTER monitor_text;
2、修改脚本/plugins/monitor/setup.php, 设置Host管理表单项,找到monitor_config_form()方法, 在$fields_host_edit3['monitor_text']数组变量下加 入$fields_host_edit3['alertMail']数组,如下:
$fields_host_edit3['alertMail'] = array(
"method" => "textbox",
"friendly_name" => "Alert Email",
"description" => "This is the email address that will be sent when this host is reported as down.",
"value" => "|arg1:alertMail|",
"max_length"