Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

CentOS7 Nagios4構築

More than 3 years have passed since last update.

注意事項

本記事は書きかけのただのメモです。

インストール

CentOS7.3

OSインストール省略
epel-release、httpd、php-pecl-apcuインストール省略

Nagios4

# yum install nagios nagios-plugins-all
# systemctl enable nagios
# systemctl start nagios
# systemctl restart httpd

nrpe

# yum install nrpe nagios-plugins-nrpe
# systemctl enable nrpe
# systemctl start nrpe

pnp4nagios

# yum install pnp4nagios
# systemctl enable npcd
# systemctl start npcd
# systemctl restart httpd

bulk_mode_with_npcdで動かす
http://docs.pnp4nagios.org/pnp-0.6/config#bulk_mode_with_npcd

Nagios側設定
https://docs.pnp4nagios.org/pnp-0.6/webfe#nagios_3x
※ホストのaction_urlは
 action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$

rrdcached

以下参考
http://qiita.com/todanano/items/97297ac6652ddefd3695
https://www.andrisoft.com/support/portal/kb/article/speeding-up-ip-graphs-updates-using-rrdcached#redhat7
https://www.agilegroup.co.jp/technote/ganglia-with-rrdcached.html

/usr/lib/systemd/system/rrdcached.service
[Unit]
Description=rrdcached

[Service]
Restart=always
User=nagios
PermissionsStartOnly=yes
ExecStartPre=/bin/mkdir -p /var/rrdtool/rrdcached/ ; /bin/chown nagios:nagios /var/rrdtool/rrdcached
ExecStart=/usr/bin/rrdcached -l unix:/var/rrdtool/rrdcached/rrdcached.sock -s nagios -m 774 -g -p /var/rrdtool/rrdcached/rrdcached.pid -j /var/rrdtool/rrdcached
ExecStartPost=/bin/sh -c "/bin/sleep 4; /bin/chown nagios:nagios /var/rrdtool/rrdcached/rrdcached.sock ; /bin/chown nagios:nagios /var/rrdtool/rrdcached/rrdcached.pid ; /bin/chmod 770 /var/rrdtool/rrdcached/rrdcached.sock"

[Install]
WantedBy=multi-user.target
# systemctl enable rrdcached
# systemctl start rrdcached

pnp4nagios側設定
http://docs.pnp4nagios.org/pnp-0.6/rrdcached

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away