Toto je starší verze dokumentu!


Nagios in CentOS

NRPE

Installation

Add sources containing nagios packages:

yum install epel-release

Install NRPE and the plugins that is required to add the services via the function „Add UNIX client services“ when adding a new host in the configuration UI in op5 Monitor

yum install nrpe nagios-plugins-users nagios-plugins-load nagios-plugins-swap nagios-plugins-disk nagios-plugins-procs

Create custom configuration as .cnf file at /etc/nrpe.d/

allowed_hosts=127.0.0.1,10.0.0.10

Restart the nrpe agent on the host, and make sure that nrpe is started at boot: CentOS/RHEL 6:

service nrpe restart
chkconfig nrpe on

CentOS/RHEL 7:

systemctl restart nrpe
systemctl enable nrpe
If the host is behind a firewall, or you have enabled firewall software on the host, you need to open for incoming traffic on TCP port 5666.

Nagios plugins are located at /usr/lib64/nagios/plugins/ folder.

Source

Problems

Nagios check_disk failure in RHEL / CentOS 6.2

If NRPE is responding with

DISK UNKNOWN - free space:|

on CentOS 6 or with

DISK CRITICAL - /sys/kernel/config is not accessible: Permission denied

CentOS 7, there is issue with SElinux policy.

There are also related entries in /var/log/audit/audit.log.

Since version 6.2, the Nagios check_disk plugin is not working with Permission denied errors. This problem is related to the SElinux policy.

Fortunately, there is a simple workaround while we wait for an updated selinux-policy package. As root, do the following:

chcon -t nagios_unconfined_plugin_exec_t /usr/lib64/nagios/plugins/check_disk

If you do not want change SElinux policy, another workaround is to exclude offending file systems using -X flags in check definition.

  1. X configfs -X cgroup -X tmpfs -X selinuxfs -X sysfs -X proc -X mqueue -X binfmt_misc -X devtmpfs

Source:

linux/centos/nagios.1470152302.txt.gz · Poslední úprava: 02.08.2016 17:38 autor: vm

Nástroje pro stránku