daspossum
Goto Top

NRPE Client (CentOS 7)

Hallo zusammen,

ich habe eine Frage zu NRPE für Nagios. Ich habe diesen auf einen Cent OS 7 installiert.
danach habe ich mir die vi /etc/xinetd.d/nrpe angeschaut.
Inhalt:
  1. default: on
  2. description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = erlaubte IP-Adressen
}
Danach habe ich mir den inhalt der vi etc/nrpe.cfg angeschaut und bei commands die Raute entfernt:
  1. The following examples use hardcoded command arguments...

command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200


  1. The following examples allow user-supplied arguments and can
  2. only be used if the NRPE daemon was compiled with support for
  3. command arguments *AND* the dont_blame_nrpe directive in this
  4. config file is set to '1'. This poses a potential security risk, so
  5. make sure you read the SECURITY file before doing this.

command[check_users]=/usr/local/nagios/libexec/check_users -w $ARG1$ -c $ARG2$
command[check_load]=/usr/local/nagios/libexec/check_load -w $ARG1$ -c $ARG2$
command[check_disk]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
command[check_procs]=/usr/local/nagios/libexec/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$

Funktionstest ergab folgendes:
[local@localhost etc]#sudo /usr/local/nagios/libexec/check_nrpe -H 10.41.15.74
NRPE v2.15
und
[local@localhost libexec]# file check_nrpe
check_nrpe: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=0x653ab90c9cd121bcf3e9a3f16c0a994f55f4c74d, not stripped

Auf den Nagios habe ich folgenden Test /usr/local/nagios/bin/nagios -v /usr/ local/nagios/etc/nagios.cfg durchgeführt. Die Ausgabe ergab:
Running pre-flight check on configuration data...

Checking objects...
Checked 44 services.
Checked 7 hosts.
Checked 2 host groups.
Checked 0 service groups.
Checked 1 contacts.
Checked 1 contact groups.
Checked 55 commands.
Checked 5 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 7 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 5 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors: 0

Wenn ich jetzt aber auf die Weboberfläche gehe erhalte ich folgende Meldung:

Current Status:
CRITICAL (for 0d 1h 11m 31s)
Status Information: (No output on stdout) stderr: execvp(/usr/local/nagios/libexec/check_nrpe, ...) failed. errno is 2: No such file or directory
Performance Data:
Current Attempt: 3/3 (HARD state)
Last Check Time: 11-10-2015 12:31:27
Check Type: ACTIVE
Check Latency / Duration: 0.000 / 0.001 seconds
Next Scheduled Check: 11-10-2015 12:41:27
Last State Change: 11-10-2015 11:28:06
Last Notification: 11-10-2015 11:32:06 (notification 1)

Also ich bekomme keine Richtige ausgabe da er das File oder directory nicht findet. Allerdings habe ich die installation als root durchgeführt und endsprechend ist root der Besitzer z.B.
-rwxr-xr-x. 1 root root 176877 10. Nov 09:51 check_load

Kann das zu diesen Fehler führen?

Content-Key: 287976

Url: https://administrator.de/contentid/287976

Printed on: April 23, 2024 at 07:04 o'clock