Inagios 配置(四) : nagios 配置之 nagiosql

1、nagiosql 配置

nagiosql 与 默认 nagios 的手动编辑只能选择一种,所以要先修改nagios.cfg文件中对应内容如下所示:

#cfg_file=/etc/nagios/objects/commands.cfg
#cfg_file=/etc/nagios/objects/contacts.cfg
#cfg_file=/etc/nagios/objects/timeperiods.cfg
#cfg_file=/etc/nagios/objects/templates.cfg

cfg_dir=/etc/nagios/nagiosql

#cfg_dir=/etc/nagios/instance

进入nagiosql web 页面


2、配置导入

选择如下配置进行导入

/etc/nagios/objects/commands.cfg
/etc/nagios/objects/contacts.cfg
/etc/nagios/objects/timeperiods.cfg
/etc/nagios/objects/templates.cfg

/etc/nagios/instance/commands.cfg
/etc/nagios/instance/groups.cfg
/etc/nagios/instance/hosts.cfg
/etc/nagios/instance/services.cfg
/etc/nagios/instance/templates.cfg、

 

3、添加主机
 

点击查看原图

 

4、添加服务

 

点击查看原图

 

 注意上述图中有红色标记的位置,为必选

 

 

5、应用生效

点击查看原图

从上向下依次点击,对存在疑问的进行处理,至重启nagios 后,监控目标生效;

你可能感兴趣的:(nagios,nagiosql,inagios)