2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CentOS7 Nagios4構築

Last updated at Posted at 2017-04-09

注意事項

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

インストール

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

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?