centos6 安装icinga2+icinga2web+pnp4nagios
1:关闭selinux
2:使用icinga2的源安装icinga2、icinga2web、pnp4nagios、mysqld、httpd
3:服务icinga2 icinga2web httpd npcd
4:chmod 777 /var/lib/pnp4nagios/(npcd.log要不可能会出现: Executed command exits with return code '6')
5:下载icingaweb2-module-pnp 拷贝到/usr/share/icingaweb2/modules/pnp下
6:然后在icingaweb2里界面启用:pnp
7:修改配置:
/etc/pnp4nagios/npcd.cfg
/etc/icinga2/conf.d/templates.conf
###########
template Host "pnp-hst" {
action_url ="/pnp4nagios/graph?host=$HOSTNAME$'rel='/pnp4nagios/popup?host=$HOSTNAME$&srv=_HOST_"
}
template Service "pnp-svc" {
action_url ="/pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$'rel='/pnp4nagios/popup?host=$HOSTNAME$&srv=$SERVICEDES$"
}
template Host "generic-host" {
max_check_attempts = 3
check_interval = 1m
retry_interval = 30s
check_command = "hostalive"
import "pnp-hst"
}
/**
* Provides default settings for services. By convention
* all services should import this template.
*/
template Service "generic-service" {
action_url = "/pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$"
max_check_attempts = 5
check_interval = 1m
retry_interval = 30s
import "pnp-svc"
}
############
重启所有相关服务:icinga2 icinga2web httpd npcd
基本上OK
阅读(2948) | 评论(0) | 转发(0) |