注意事項
本記事は書きかけのただのメモです。
インストール
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
[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