centos7下安装adagios

adagios使用Djang框架,界面比原生的nagios好看,并集成了绘图,web配置nagios等多个功能。
它有个在线的demo:
http://demo.adagios.org/status
安装步骤:
https://github.com/opinkerfi/adagios/wiki/Install-guide

1.增加yum源

rpm -ihv http://opensource.is/repo/ok-release.rpm
yum update -y ok-release
yum install -y epel-release

安装epel源后,如无法使用yum,提示One of the configured repositories failed epel,需修改下epel.repo

vi /etc/yum.repos.d/epel-testing.repo
删除里面的内容,增加如下配置
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=http://download.fedoraproject.org/pub/epel/7/$basearch
#mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-7&arch=$basearch
priority=10
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7

2.安装adagios

yum --enablerepo=ok-testing install -y pnp4nagios mk-livestatus nagios git adagios okconfig acl python-setuptools nagios-plugins-all

3.配置adagios

添加你的github账号,也可以任意写个,O(∩_∩)O
cd /etc/nagios/
git init
git config user.name "yourname"
git config user.email "yourname@yourdomain.com"
git add *
git commit -m "Initial commit"
chown -R nagios /etc/nagios/* /etc/nagios/.git
setfacl -R -m group:nagios:rwx /etc/nagios/
setfacl -R -m d:group:nagios:rwx /etc/nagios/
mkdir -p /etc/nagios/adagios
pynag config --append cfg_dir=/etc/nagios/adagios
pynag config --append "broker_module=/usr/lib64/nagios/brokers/npcdmod.o config_file=/etc/pnp4nagios/npcd.cfg"
pynag config --append "broker_module=/usr/lib64/mk-livestatus/livestatus.o /var/spool/nagios/cmd/livestatus"
pynag config --set "process_performance_data=1"
usermod -G apache nagios
关闭selinux
sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/sysconfig/selinux
setenforce 0

4.使用nagios

设置web登录密码
htpasswd -c /etc/nagios/passwd nagiosadmin
修改nagios账号权限
visudo
在末尾添加
Defaults:nagios !requiretty
nagios ALL = (root) NOPASSWD: /etc/init.d/nagios
开启服务
service nagios restart ; chkconfig nagios on
service httpd restart ; chkconfig httpd on
service npcd restart ; chkconfig npcd on

打开浏览器,输入http://ip/adagios 即可访问了

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值