Another issue with check_nrpe

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
cocoyanouck
Posts: 96
Joined: Fri Apr 08, 2016 3:17 am

Another issue with check_nrpe

Post by cocoyanouck »

Hello,

I have a Debian Nagios server in 431 which is working perfectly. This server is monitoring many windows servers (services, number of files on directory, etc).
This week, my boss asked me to supervise the disk space on our owncloud server (Ubuntu 14.1). This is the first linux we needs to monitor.

Firstly even if i already use the plugin check_nrpe on our nagios server, I've launched the command "# sudo apt-get install nagios-nrpe-plugin" and verified that the command "check_nrpe" wasn't disabled on command.cfg.
Then, on our owncloud server (the target we need to supervise), I've launched :

Code: Select all

# sudo apt-get install nagios-nrpe-server
# sudo apt-get install nagios-plugins
After that, I've edit nrpe.cfg like this :

Code: Select all

allowed_hosts = IP adress of our nagios (I also tried to write 127.0.0.1, IPadressenagiosserver)
Then I launched the daemon :

Code: Select all

# /etc/init.d/nagios-nrpe-server start
The first step was to test the communication (/usr/lib/nagios/plugins) :

Code: Select all

# ./check_nrpe -H IPadresse localhost or owncloud or nagios
At the beginning this was working on our nagios server (version 2.14 nrpe) but not on our owncloud => "CHECK_NRPE: Error - Could not complete SSL handshake"
Then i'd tried some commands (many, ...) and the problem was the same on both servers.

I've checked again the nrpe.cfg on our ubuntu server, and i see the IP adress of our nagios server next to "allowed hosts". But still nothing...

Could you help me ?

Thank you by advance.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Another issue with check_nrpe

Post by mcapra »

Can you share the nrpe configuration file from the Ubuntu machine?

cocoyanouck wrote:At the beginning this was working on our nagios server (version 2.14 nrpe) but not on our owncloud => "CHECK_NRPE: Error - Could not complete SSL handshake"
I would think this is because only the Nagios machine was listed under allowed_hosts. If localhost/127.0.0.1 is not listed, you won't be able to make NRPE connections from the Ubuntu machine to the Ubuntu machine.
Former Nagios employee
https://www.mcapra.com/
cocoyanouck
Posts: 96
Joined: Fri Apr 08, 2016 3:17 am

Re: Another issue with check_nrpe

Post by cocoyanouck »

root@owncloud:/etc/nagios# vi nrpe.cfg
ample NRPE Config File

Code: Select all

# Written by: Ethan Galstad (nagios@nagios.org)
#
# Last Modified: 11-23-2007
#
# NOTES:
# This is a sample configuration file for the NRPE daemon.  It needs to be
# located on the remote host that is running the NRPE daemon, not the host
# from which the check_nrpe client is being executed.
#############################################################################


# LOG FACILITY
# The syslog facility that should be used for logging purposes.

log_facility=daemon



# PID FILE
# The name of the file in which the NRPE daemon should write it's process ID
# number.  The file is only written if the NRPE daemon is started by the root
# user and is running in standalone mode.

pid_file=/var/run/nagios/nrpe.pid



# PORT NUMBER
# Port number we should wait for connections on.
# NOTE: This must be a non-priviledged port (i.e. > 1024).
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd

server_port=5666



# SERVER ADDRESS
# Address that nrpe should bind to in case there are more than one interface
# and you do not want nrpe to bind on all interfaces.
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd

#server_address=127.0.0.1



# NRPE USER
# This determines the effective user that the NRPE daemon should run as.
# You can either supply a username or a UID.
#
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd

nrpe_user=nagios



# NRPE GROUP
# This determines the effective group that the NRPE daemon should run as.
# You can either supply a group name or a GID.
#
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd

nrpe_group=nagios

# LOG FACILITY
# The syslog facility that should be used for logging purposes.

log_facility=daemon



# PID FILE
# The name of the file in which the NRPE daemon should write it's process ID
# number.  The file is only written if the NRPE daemon is started by the root
# user and is running in standalone mode.

pid_file=/var/run/nagios/nrpe.pid



# PORT NUMBER
# Port number we should wait for connections on.
# NOTE: This must be a non-priviledged port (i.e. > 1024).
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd

server_port=5666



# SERVER ADDRESS
# Address that nrpe should bind to in case there are more than one interface
# and you do not want nrpe to bind on all interfaces.
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd

#server_address=127.0.0.1



# NRPE USER
# This determines the effective user that the NRPE daemon should run as.
# You can either supply a username or a UID.
#
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd

nrpe_user=nagios



# NRPE GROUP
# This determines the effective group that the NRPE daemon should run as.
# You can either supply a group name or a GID.
#
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd

nrpe_user=nagios



# NRPE GROUP
# This determines the effective group that the NRPE daemon should run as.
# You can either supply a group name or a GID.
#
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd

nrpe_group=nagios



# ALLOWED HOST ADDRESSES
# This is an optional comma-delimited list of IP address or hostnames
# that are allowed to talk to the NRPE daemon. Network addresses with a bit mask
# (i.e. 192.168.1.0/24) are also supported. Hostname wildcards are not currently
# supported.
#
# Note: The daemon only does rudimentary checking of the client's IP
# address.  I would highly recommend adding entries in your /etc/hosts.allow
# file to allow only the specified host to connect to the port
# you are running this daemon on.
#
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd

allowed_hosts=127.0.0.1,10.0.2.201



# COMMAND ARGUMENT PROCESSING
# This option determines whether or not the NRPE daemon will allow clients
# to specify arguments to commands that are executed.  This option only works
# if the daemon was configured with the --enable-command-args configure script
# option.
#
# *** ENABLING THIS OPTION IS A SECURITY RISK! ***
# Read the SECURITY file for information on some of the security implications
# of enabling this variable.
#
# Values: 0=do not allow arguments, 1=allow command arguments

dont_blame_nrpe=0



# BASH COMMAND SUBTITUTION
# This option determines whether or not the NRPE daemon will allow clients
# to specify arguments that contain bash command substitutions of the form
# $(...).  This option only works if the daemon was configured with both
# the --enable-command-args and --enable-bash-command-substitution configure
# script options.
#
# *** ENABLING THIS OPTION IS A HIGH SECURITY RISK! ***
# Read the SECURITY file for information on some of the security implications
# of enabling this variable.
#
# Values: 0=do not allow bash command substitutions,
#         1=allow bash command substitutions

allow_bash_command_substitution=0



# COMMAND PREFIX
# This option allows you to prefix all commands with a user-defined string.
# A space is automatically added between the specified prefix string and the
# command line from the command definition.
#
# *** THIS EXAMPLE MAY POSE A POTENTIAL SECURITY RISK, SO USE WITH CAUTION! ***
# Usage scenario:
# Execute restricted commmands using sudo.  For this to work, you need to add
# the nagios user to your /etc/sudoers.  An example entry for alllowing
# execution of the plugins from might be:
#
# nagios          ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/
#
# This lets the nagios user run all commands in that directory (and only them)
# without asking for a password.  If you do this, make sure you don't give
# random users write access to that directory or its contents!

# command_prefix=/usr/bin/sudo



# DEBUGGING OPTION
# This option determines whether or not debugging messages are logged to the
# syslog facility.
# Values: 0=debugging off, 1=debugging on

debug=0



# COMMAND TIMEOUT
# This specifies the maximum number of seconds that the NRPE daemon will
# allow plugins to finish executing before killing them off.

command_timeout=60



# CONNECTION TIMEOUT
# This specifies the maximum number of seconds that the NRPE daemon will
# wait for a connection to be established before exiting. This is sometimes
# seen where a network problem stops the SSL being established even though
# all network sessions are connected. This causes the nrpe daemons to
# accumulate, eating system resources. Do not set this too low.

connection_timeout=300



# WEEK RANDOM SEED OPTION
# This directive allows you to use SSL even if your system does not have
# a /dev/random or /dev/urandom (on purpose or because the necessary patches
# were not applied). The random number generator will be seeded from a file
# which is either a file pointed to by the environment valiable $RANDFILE
# or $HOME/.rnd. If neither exists, the pseudo random number generator will
# be initialized and a warning will be issued.
# Values: 0=only seed from /dev/[u]random, 1=also seed from weak randomness

#allow_weak_random_seed=1



# INCLUDE CONFIG FILE
# This directive allows you to include definitions from an external config file.

#include=<somefile.cfg>



# INCLUDE CONFIG DIRECTORY
# This directive allows you to include definitions from config files (with a
# .cfg extension) in one or more directories (with recursion).

#include_dir=<somedirectory>
#include_dir=<someotherdirectory>



# COMMAND DEFINITIONS
# Command definitions that this daemon will run.  Definitions
# are in the following format:
#
# command[<command_name>]=<command_line>
#
# When the daemon receives a request to return the results of <command_name>
# it will execute the command specified by the <command_line> argument.
#
# Unlike Nagios, the command line cannot contain macros - it must be
# typed exactly as it should be executed.

#
# Note: Any plugins that are used in the command lines must reside
# on the machine that this daemon is running on!  The examples below
# assume that you have plugins installed in a /usr/local/nagios/libexec
# directory.  Also note that you will have to modify the definitions below
# to match the argument format the plugins expect.  Remember, these are
# examples only!


# The following examples use hardcoded command arguments...

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


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

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

#
# local configuration:
#       if you'd prefer, you can instead place directives here
include=/etc/nagios/nrpe_local.cfg

#
# you can place your config snipplets into nrpe.d/
# only snipplets ending in .cfg will get included
include_dir=/etc/nagios/nrpe.d/
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Another issue with check_nrpe

Post by mcapra »

Do you know if NRPE is running as a stand-alone daemon, or under xinetd/inetd?

Can you share the output of:

Code: Select all

ps -aef
If it's running under xinetd or inetd, there's a different file to change when allowing hosts to connect. Typically it's found in /etc/xinetd.d/nrpe
Former Nagios employee
https://www.mcapra.com/
cocoyanouck
Posts: 96
Joined: Fri Apr 08, 2016 3:17 am

Re: Another issue with check_nrpe

Post by cocoyanouck »

Yes NRPE is running as a stand alone daemon.

Code: Select all

root@nagios-debian:/etc# ps -aef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 avril13 ?      00:00:03 /sbin/init
root         2     0  0 avril13 ?      00:00:00 [kthreadd]
root         3     2  0 avril13 ?      00:00:41 [ksoftirqd/0]
root         5     2  0 avril13 ?      00:00:00 [kworker/0:0H]
root         6     2  0 avril13 ?      00:00:00 [kworker/u2:0]
root         7     2  0 avril13 ?      00:02:05 [rcu_sched]
root         8     2  0 avril13 ?      00:00:00 [rcu_bh]
root         9     2  0 avril13 ?      00:00:00 [migration/0]
root        10     2  0 avril13 ?      00:00:02 [watchdog/0]
root        11     2  0 avril13 ?      00:00:00 [khelper]
root        12     2  0 avril13 ?      00:00:00 [kdevtmpfs]
root        13     2  0 avril13 ?      00:00:00 [netns]
root        14     2  0 avril13 ?      00:00:00 [khungtaskd]
root        15     2  0 avril13 ?      00:00:00 [writeback]
root        16     2  0 avril13 ?      00:00:00 [ksmd]
root        17     2  0 avril13 ?      00:00:00 [khugepaged]
root        18     2  0 avril13 ?      00:00:00 [crypto]
root        19     2  0 avril13 ?      00:00:00 [kintegrityd]
root        20     2  0 avril13 ?      00:00:00 [bioset]
root        21     2  0 avril13 ?      00:00:00 [kblockd]
root        23     2  0 avril13 ?      00:00:00 [kswapd0]
root        24     2  0 avril13 ?      00:00:00 [vmstat]
root        25     2  0 avril13 ?      00:00:00 [fsnotify_mark]
root        31     2  0 avril13 ?      00:00:00 [kthrotld]
root        32     2  0 avril13 ?      00:00:00 [ipv6_addrconf]
root        33     2  0 avril13 ?      00:00:00 [deferwq]
root        34     2  0 avril13 ?      00:21:15 [kworker/u2:1]
root        67     2  0 avril13 ?      00:00:00 [scsi_eh_0]
root        68     2  0 avril13 ?      00:00:00 [scsi_tmf_0]
root        69     2  0 avril13 ?      00:00:00 [ata_sff]
root        70     2  0 avril13 ?      00:00:00 [vmw_pvscsi_wq_0]
root        71     2  0 avril13 ?      00:00:00 [scsi_eh_1]
root        72     2  0 avril13 ?      00:00:00 [scsi_tmf_1]
root        73     2  0 avril13 ?      00:00:00 [scsi_eh_2]
root        74     2  0 avril13 ?      00:00:00 [scsi_tmf_2]
root        77     2  0 avril13 ?      00:00:00 [kpsmoused]
root        83     2  0 avril13 ?      00:01:09 [kworker/0:1H]
root        99     2  0 avril13 ?      00:00:00 [kdmflush]
root       100     2  0 avril13 ?      00:00:00 [bioset]
root       106     2  0 avril13 ?      00:00:00 [kdmflush]
root       107     2  0 avril13 ?      00:00:00 [bioset]
root       129     2  0 avril13 ?      00:01:14 [jbd2/dm-0-8]
root       130     2  0 avril13 ?      00:00:00 [ext4-rsv-conver]
root       162     2  0 avril13 ?      00:00:00 [kauditd]
root       169     1  0 avril13 ?      00:00:00 /lib/systemd/systemd-udevd
root       172     1  0 avril13 ?      00:00:42 /lib/systemd/systemd-journald
root       226     2  0 avril13 ?      00:00:00 [ttm_swap]
root       287     2  0 avril13 ?      00:00:00 [ext4-rsv-conver]
root       492     1  0 avril13 ?      00:02:18 /usr/sbin/vmtoolsd
root       514     1  0 avril13 ?      00:00:00 /usr/lib/vmware-vgauth/VGAuthSer
root       628     1  0 avril13 ?      00:00:05 /usr/sbin/NetworkManager --no-da
root       629     1  0 avril13 ?      00:00:08 /usr/sbin/rsyslogd -n
avahi      631     1  0 avril13 ?      00:02:02 avahi-daemon: running [nagios-de
root       632     1  0 avril13 ?      00:00:00 /usr/sbin/sshd -D
root       633     1  0 avril13 ?      00:00:00 /usr/sbin/cron -f
daemon     634     1  0 avril13 ?      00:00:00 /usr/sbin/atd -f
root       635     1  0 avril13 ?      00:00:00 /usr/sbin/ModemManager
root       639     1  0 avril13 ?      00:00:00 /lib/systemd/systemd-logind
message+   640     1  0 avril13 ?      00:00:00 /usr/bin/dbus-daemon --system --
avahi      643   631  0 avril13 ?      00:00:00 avahi-daemon: chroot helper
root       655     1  0 avril13 ?      00:00:00 /usr/sbin/acpid
root       656     1  0 avril13 ?      00:00:05 /usr/lib/accountsservice/account
root       670     1  0 avril13 tty1   00:00:00 /sbin/agetty --noclear tty1 linu
root       678     1  0 avril13 ?      00:00:00 /usr/lib/policykit-1/polkitd --n
root       680     1  0 avril13 ?      00:00:00 /usr/sbin/gdm3
root       686     2  0 avril13 ?      00:00:00 [cfg80211]
nagios     691     1  0 avril13 ?      00:00:13 /usr/local/pnp4nagios/bin/npcd -
root       706   680  0 avril13 tty7   00:00:07 /usr/bin/Xorg :0 -novtswitch -ba
root       775     1  0 avril13 ?      00:00:00 /sbin/rpcbind -w
root       779     1  0 avril13 ?      00:00:22 /usr/sbin/minissdpd -i 0.0.0.0
root       869     1  0 avril13 ?      00:00:00 /usr/lib/postfix/master
postfix    871   869  0 avril13 ?      00:00:00 qmgr -l -t unix -u
root       873     1  0 avril13 ?      00:09:12 /opt/teamviewer/tv_bin/teamviewe
root       911     1  0 avril13 ?      00:00:06 /usr/sbin/apache2 -k start
www-data   914   911  0 avril13 ?      00:00:00 /usr/sbin/apache2 -k start
nagios     915   911  0 avril13 ?      00:00:13 /usr/sbin/apache2 -k start
root       982     1  0 avril13 ?      00:00:00 /usr/lib/upower/upowerd
colord     999     1  0 avril13 ?      00:00:00 /usr/lib/colord/colord
rtkit     1006     1  0 avril13 ?      00:00:01 /usr/lib/rtkit/rtkit-daemon
root      1038     1  0 avril13 ?      00:00:00 /sbin/wpa_supplicant -u -s -O /r
root      1039     1  0 avril13 ?      00:00:00 /usr/lib/packagekit/packagekitd
root      1066   680  0 avril13 ?      00:00:00 gdm-session-worker [pam/gdm-pass
nagios    1069     1  0 avril13 ?      00:00:00 /lib/systemd/systemd --user
nagios    1072  1069  0 avril13 ?      00:00:00 (sd-pam)  
nagios    1076     1  0 avril13 ?      00:00:00 /usr/bin/gnome-keyring-daemon --
nagios    1079  1066  0 avril13 ?      00:00:00 x-session-manager
nagios    1117  1079  0 avril13 ?      00:00:00 [Xsession] <defunct>
nagios    1120  1079  0 avril13 ?      00:00:00 /usr/bin/ssh-agent /usr/bin/dbus
nagios    1123     1  0 avril13 ?      00:00:00 /usr/bin/dbus-launch --exit-with
nagios    1124     1  0 avril13 ?      00:00:00 /usr/bin/dbus-daemon --fork --pr
nagios    1127     1  0 avril13 ?      00:00:00 /usr/lib/at-spi2-core/at-spi-bus
nagios    1131  1127  0 avril13 ?      00:00:00 /usr/bin/dbus-daemon --config-fi
nagios    1135     1  0 avril13 ?      00:00:00 /usr/lib/at-spi2-core/at-spi2-re
nagios    1141  1079  0 avril13 ?      00:00:07 /usr/lib/gnome-settings-daemon/g
nagios    1162     1  0 avril13 ?      00:00:00 /usr/bin/pulseaudio --start
nagios    1165   873  0 avril13 ?      00:02:16 c:\TeamViewer\TeamViewer.exe    
nagios    1169     1  0 avril13 ?      00:00:00 /usr/lib/gvfs/gvfsd
nagios    1178     1  0 avril13 ?      00:00:00 /bin/sh /usr/bin/start-pulseaudi
nagios    1179  1178  0 avril13 ?      00:00:00 /usr/bin/xprop -root -spy
nagios    1198     1  0 avril13 ?      00:00:00 /usr/lib/gvfs/gvfsd-fuse /run/us
nagios    1235     1  0 avril13 ?      00:00:00 /usr/lib/gvfs/gvfs-udisks2-volum
root      1237     1  0 avril13 ?      00:00:00 /usr/lib/udisks2/udisksd --no-de
nagios    1246     1  0 avril13 ?      00:00:00 /usr/lib/gvfs/gvfs-gphoto2-volum
nagios    1250     1  0 avril13 ?      00:00:00 /usr/lib/gvfs/gvfs-afc-volume-mo
nagios    1255     1  0 avril13 ?      00:00:00 /usr/lib/gvfs/gvfs-mtp-volume-mo
nagios    1259     1  0 avril13 ?      00:00:00 /usr/lib/gvfs/gvfs-goa-volume-mo
nagios    1262     1  0 avril13 ?      00:00:00 /usr/lib/gnome-online-accounts/g
nagios    1270  1079  0 avril13 ?      00:00:50 /usr/bin/gnome-shell
nagios    1272     1  0 avril13 ?      00:00:00 /usr/lib/telepathy/mission-contr
nagios    1278     1  0 avril13 ?      00:00:00 /usr/lib/gnome-settings-daemon/g
nagios    1317     1  0 avril13 ?      00:00:00 /usr/lib/gnome-shell/gnome-shell
nagios    1324     1  0 avril13 ?      00:00:00 /usr/lib/evolution/evolution-sou
nagios    1378     1  0 avril13 ?      00:00:59 /opt/teamviewer/tv_bin/wine/bin/
nagios    1397     1  0 avril13 ?      00:00:00 C:\windows\system32\services.exe
nagios    1398  1079  0 avril13 ?      00:00:00 /usr/lib/evolution/3.12/evolutio
nagios    1401  1079  0 avril13 ?      00:00:00 nm-applet
nagios    1403  1079  0 avril13 ?      00:00:00 /usr/bin/python /usr/share/syste
nagios    1404  1079  0 avril13 ?      00:00:01 /usr/lib/tracker/tracker-miner-f
nagios    1407  1079  0 avril13 ?      00:00:00 /usr/lib/tracker/tracker-miner-u
nagios    1414     1  0 avril13 ?      00:00:00 /usr/lib/evolution/evolution-cal
nagios    1415  1079  0 avril13 ?      00:00:00 /usr/lib/tracker/tracker-miner-a
nagios    1417  1079  0 avril13 ?      00:00:01 /usr/lib/tracker/tracker-extract
nagios    1424  1079  0 avril13 ?      00:00:02 zeitgeist-datahub
nagios    1431     1  0 avril13 ?      00:00:00 /usr/lib/i386-linux-gnu/gconf/gc
nagios    1437     1  0 avril13 ?      00:00:00 /usr/lib/tracker/tracker-store
nagios    1438     1  0 avril13 ?      00:00:00 /usr/bin/zeitgeist-daemon
nagios    1457     1  0 avril13 ?      00:00:00 /usr/lib/i386-linux-gnu/zeitgeis
nagios    1471  1457  0 avril13 ?      00:00:00 /bin/cat
nagios    1486     1  0 avril13 ?      00:00:00 C:\windows\system32\explorer.exe
nagios    1504  1165  0 avril13 ?      00:00:00 [TeamViewer.exe] <defunct>
nagios    1505  1165  0 avril13 ?      00:00:46 /opt/teamviewer//tv_bin/TVGuiSla
nagios    1508  1165  0 avril13 ?      00:00:43 /opt/teamviewer//tv_bin/TVGuiDel
nagios    1564     1  0 avril13 ?      00:00:01 /usr/lib/gnome-terminal/gnome-te
nagios    1567  1564  0 avril13 ?      00:00:00 gnome-pty-helper
nagios    1568  1564  0 avril13 pts/0  00:00:00 bash
root      1574  1568  0 avril13 pts/0  00:00:00 su
nagios    1578     1  0 avril13 ?      00:00:00 /usr/lib/gvfs/gvfsd-metadata
root      1581  1574  0 avril13 pts/0  00:00:00 bash
nagios    1582     1  0 avril13 ?      00:05:22 /usr/lib/vmware-tools/sbin32/vmt
nagios    1706     1  0 avril13 ?      00:13:08 /usr/local/nagios/bin/nagios -d 
nagios    1710  1706  0 avril13 ?      00:01:14 /usr/local/nagios/bin/nagios --w
nagios    1711  1706  0 avril13 ?      00:01:18 /usr/local/nagios/bin/nagios --w
nagios    1712  1706  0 avril13 ?      00:01:22 /usr/local/nagios/bin/nagios --w
nagios    1713  1706  0 avril13 ?      00:01:21 /usr/local/nagios/bin/nagios --w
nagios    1729  1706  0 avril13 ?      00:00:08 /usr/local/nagios/bin/nagios -d 
www-data  3233   911  0 avril13 ?      00:00:00 /usr/sbin/apache2 -k start
www-data  6488   911  0 avril13 ?      00:00:00 /usr/sbin/apache2 -k start
postfix   8094   869  0 09:36 ?        00:00:00 pickup -l -t unix -u -c
root      8474     2  0 09:36 ?        00:00:00 [kworker/0:1]
www-data 10302   911  0 avril13 ?      00:00:00 /usr/sbin/apache2 -k start
root     11021     2  0 09:41 ?        00:00:00 [kworker/0:0]
www-data 11083   911  0 avril13 ?      00:00:00 /usr/sbin/apache2 -k start
nagios   11327  1713  0 09:42 ?        00:00:00 /usr/local/nagios/libexec/check_
nagios   11328 11327  0 09:42 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.
nagios   11329  1712  0 09:42 ?        00:00:00 /usr/local/nagios/libexec/check_
nagios   11330 11329  0 09:42 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.
nagios   11331  1711  0 09:42 ?        00:00:00 /usr/local/nagios/libexec/check_
nagios   11332  1710  0 09:42 ?        00:00:00 /usr/local/nagios/libexec/check_
nagios   11333 11331  0 09:42 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.
nagios   11334 11332  0 09:42 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.
nagios   11335  1713  0 09:42 ?        00:00:00 /usr/local/nagios/libexec/check_
nagios   11336 11335  0 09:42 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.
nagios   11337  1712  0 09:42 ?        00:00:00 /usr/local/nagios/libexec/check_
nagios   11338 11337  0 09:42 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.
nagios   11339  1711  0 09:42 ?        00:00:00 /usr/local/nagios/libexec/check_
nagios   11340 11339  0 09:42 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.
nagios   11341  1710  0 09:42 ?        00:00:00 /usr/local/nagios/libexec/check_
nagios   11342 11341  0 09:42 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.
nagios   11343  1713  0 09:42 ?        00:00:00 /usr/local/nagios/libexec/check_
nagios   11344 11343  0 09:42 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.
nagios   11346  1711  0 09:42 ?        00:00:00 /usr/local/nagios/libexec/check_
nagios   11347 11346  0 09:42 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.
nagios   11349  1713  0 09:42 ?        00:00:00 /usr/local/nagios/libexec/check_
nagios   11350 11349  0 09:42 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.
nagios   11352  1711  0 09:42 ?        00:00:00 /usr/local/nagios/libexec/check_
nagios   11353 11352  0 09:42 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.
nagios   11360  1710  0 09:42 ?        00:00:00 /usr/local/nagios/libexec/check_
nagios   11361 11360  0 09:42 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.
nagios   11363  1712  0 09:42 ?        00:00:00 /usr/local/nagios/libexec/check_
nagios   11364 11363  0 09:42 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.
nagios   11365  1711  0 09:42 ?        00:00:00 /usr/local/nagios/libexec/check_
nagios   11366 11365  0 09:42 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.
nagios   11368  1713  0 09:42 ?        00:00:00 /usr/local/nagios/libexec/check_
nagios   11369 11368  0 09:42 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.
nagios   11371  1711  0 09:42 ?        00:00:00 /usr/local/nagios/libexec/check_
nagios   11372 11371  0 09:42 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.
nagios   11373  1710  0 09:42 ?        00:00:00 /usr/local/nagios/libexec/check_
nagios   11374 11373  0 09:42 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.
nagios   11375  1713  0 09:42 ?        00:00:00 /usr/local/nagios/libexec/check_
nagios   11376 11375  0 09:42 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.1.
root     11377  1581  0 09:42 pts/0    00:00:00 ps -aef
www-data 12621   911  0 avril13 ?      00:00:00 /usr/sbin/apache2 -k start
www-data 13350   911  0 avril13 ?      00:00:00 /usr/sbin/apache2 -k start
www-data 14942   911  0 avril13 ?      00:00:00 /usr/sbin/apache2 -k start
www-data 14953   911  0 avril13 ?      00:00:00 /usr/sbin/apache2 -k start
www-data 15725   911  0 avril13 ?      00:00:00 /usr/sbin/apache2 -k start
root     16087     2  0 avril13 ?      00:00:30 [kworker/0:3]
nagios   16089     1  0 avril13 ?      00:00:00 /usr/sbin/nrpe -c /etc/nagios/nr
www-data 18738   911  0 avril14 ?      00:00:00 /usr/sbin/apache2 -k start
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Another issue with check_nrpe

Post by mcapra »

Can you share the full ps output? It looks like it was cut off. Example:

Code: Select all

    nagios   11343  1713  0 09:42 ?        00:00:00 /usr/local/nagios/libexec/check_
    nagios   11344 11343  0 09:42 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.
Former Nagios employee
https://www.mcapra.com/
cocoyanouck
Posts: 96
Joined: Fri Apr 08, 2016 3:17 am

Re: Another issue with check_nrpe

Post by cocoyanouck »

Oh sorry...

root@nagios-debian:/home/nagios# ps -aef

Code: Select all

UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 avril13 ?      00:00:04 /sbin/init
root         2     0  0 avril13 ?      00:00:00 [kthreadd]
root         3     2  0 avril13 ?      00:00:50 [ksoftirqd/0]
root         5     2  0 avril13 ?      00:00:00 [kworker/0:0H]
root         6     2  0 avril13 ?      00:04:19 [kworker/u2:0]
root         7     2  0 avril13 ?      00:02:32 [rcu_sched]
root         8     2  0 avril13 ?      00:00:00 [rcu_bh]
root         9     2  0 avril13 ?      00:00:00 [migration/0]
root        10     2  0 avril13 ?      00:00:02 [watchdog/0]
root        11     2  0 avril13 ?      00:00:00 [khelper]
root        12     2  0 avril13 ?      00:00:00 [kdevtmpfs]
root        13     2  0 avril13 ?      00:00:00 [netns]
root        14     2  0 avril13 ?      00:00:00 [khungtaskd]
root        15     2  0 avril13 ?      00:00:00 [writeback]
root        16     2  0 avril13 ?      00:00:00 [ksmd]
root        17     2  0 avril13 ?      00:00:00 [khugepaged]
root        18     2  0 avril13 ?      00:00:00 [crypto]
root        19     2  0 avril13 ?      00:00:00 [kintegrityd]
root        20     2  0 avril13 ?      00:00:00 [bioset]
root        21     2  0 avril13 ?      00:00:00 [kblockd]
root        23     2  0 avril13 ?      00:00:00 [kswapd0]
root        24     2  0 avril13 ?      00:00:00 [vmstat]
root        25     2  0 avril13 ?      00:00:00 [fsnotify_mark]
root        31     2  0 avril13 ?      00:00:00 [kthrotld]
root        32     2  0 avril13 ?      00:00:00 [ipv6_addrconf]
root        33     2  0 avril13 ?      00:00:00 [deferwq]
root        34     2  0 avril13 ?      00:21:17 [kworker/u2:1]
root        67     2  0 avril13 ?      00:00:00 [scsi_eh_0]
root        68     2  0 avril13 ?      00:00:00 [scsi_tmf_0]
root        69     2  0 avril13 ?      00:00:00 [ata_sff]
root        70     2  0 avril13 ?      00:00:00 [vmw_pvscsi_wq_0]
root        71     2  0 avril13 ?      00:00:00 [scsi_eh_1]
root        72     2  0 avril13 ?      00:00:00 [scsi_tmf_1]
root        73     2  0 avril13 ?      00:00:00 [scsi_eh_2]
root        74     2  0 avril13 ?      00:00:00 [scsi_tmf_2]
root        77     2  0 avril13 ?      00:00:00 [kpsmoused]
root        83     2  0 avril13 ?      00:01:17 [kworker/0:1H]
root        99     2  0 avril13 ?      00:00:00 [kdmflush]
root       100     2  0 avril13 ?      00:00:00 [bioset]
root       106     2  0 avril13 ?      00:00:00 [kdmflush]
root       107     2  0 avril13 ?      00:00:00 [bioset]
root       129     2  0 avril13 ?      00:01:29 [jbd2/dm-0-8]
root       130     2  0 avril13 ?      00:00:00 [ext4-rsv-conver]
root       162     2  0 avril13 ?      00:00:00 [kauditd]
root       169     1  0 avril13 ?      00:00:00 /lib/systemd/systemd-udevd
root       172     1  0 avril13 ?      00:00:56 /lib/systemd/systemd-journald
root       226     2  0 avril13 ?      00:00:00 [ttm_swap]
root       287     2  0 avril13 ?      00:00:00 [ext4-rsv-conver]
root       492     1  0 avril13 ?      00:02:46 /usr/sbin/vmtoolsd
root       514     1  0 avril13 ?      00:00:00 /usr/lib/vmware-vgauth/VGAuthService -s
root       628     1  0 avril13 ?      00:00:06 /usr/sbin/NetworkManager --no-daemon
root       629     1  0 avril13 ?      00:00:11 /usr/sbin/rsyslogd -n
avahi      631     1  0 avril13 ?      00:02:51 avahi-daemon: running [nagios-debian.local]
root       632     1  0 avril13 ?      00:00:00 /usr/sbin/sshd -D
root       633     1  0 avril13 ?      00:00:00 /usr/sbin/cron -f
daemon     634     1  0 avril13 ?      00:00:00 /usr/sbin/atd -f
root       635     1  0 avril13 ?      00:00:00 /usr/sbin/ModemManager
root       639     1  0 avril13 ?      00:00:00 /lib/systemd/systemd-logind
message+   640     1  0 avril13 ?      00:00:00 /usr/bin/dbus-daemon --system --address=systemd: --nofork --nopidfile --systemd-activation
avahi      643   631  0 avril13 ?      00:00:00 avahi-daemon: chroot helper
root       655     1  0 avril13 ?      00:00:00 /usr/sbin/acpid
root       656     1  0 avril13 ?      00:00:08 /usr/lib/accountsservice/accounts-daemon
root       670     1  0 avril13 tty1   00:00:00 /sbin/agetty --noclear tty1 linux
root       678     1  0 avril13 ?      00:00:00 /usr/lib/policykit-1/polkitd --no-debug
root       680     1  0 avril13 ?      00:00:00 /usr/sbin/gdm3
root       686     2  0 avril13 ?      00:00:00 [cfg80211]
nagios     691     1  0 avril13 ?      00:00:15 /usr/local/pnp4nagios/bin/npcd -d -f /usr/local/pnp4nagios/etc/npcd.cfg
root       706   680  0 avril13 tty7   00:00:24 /usr/bin/Xorg :0 -novtswitch -background none -noreset -verbose 3 -auth /var/run/gdm3/auth-for-Debian-gdm-qIMdFl/database -seat seat0 -nolisten tcp vt7
root       775     1  0 avril13 ?      00:00:00 /sbin/rpcbind -w
root       779     1  0 avril13 ?      00:00:29 /usr/sbin/minissdpd -i 0.0.0.0
root       869     1  0 avril13 ?      00:00:00 /usr/lib/postfix/master
postfix    871   869  0 avril13 ?      00:00:00 qmgr -l -t unix -u
root       873     1  0 avril13 ?      00:11:04 /opt/teamviewer/tv_bin/teamviewerd -d
root       911     1  0 avril13 ?      00:00:08 /usr/sbin/apache2 -k start
www-data   914   911  0 avril13 ?      00:00:00 /usr/sbin/apache2 -k start
nagios     915   911  0 avril13 ?      00:00:14 /usr/sbin/apache2 -k start
root       982     1  0 avril13 ?      00:00:00 /usr/lib/upower/upowerd
colord     999     1  0 avril13 ?      00:00:00 /usr/lib/colord/colord
rtkit     1006     1  0 avril13 ?      00:00:01 /usr/lib/rtkit/rtkit-daemon
root      1038     1  0 avril13 ?      00:00:00 /sbin/wpa_supplicant -u -s -O /run/wpa_supplicant
root      1039     1  0 avril13 ?      00:00:01 /usr/lib/packagekit/packagekitd
root      1066   680  0 avril13 ?      00:00:00 gdm-session-worker [pam/gdm-password]
nagios    1069     1  0 avril13 ?      00:00:00 /lib/systemd/systemd --user
nagios    1072  1069  0 avril13 ?      00:00:00 (sd-pam)
nagios    1076     1  0 avril13 ?      00:00:00 /usr/bin/gnome-keyring-daemon --daemonize --login
nagios    1079  1066  0 avril13 ?      00:00:00 x-session-manager
nagios    1117  1079  0 avril13 ?      00:00:00 [Xsession] <defunct>
nagios    1120  1079  0 avril13 ?      00:00:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session x-session-manager
nagios    1123     1  0 avril13 ?      00:00:00 /usr/bin/dbus-launch --exit-with-session x-session-manager
nagios    1124     1  0 avril13 ?      00:00:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
nagios    1127     1  0 avril13 ?      00:00:00 /usr/lib/at-spi2-core/at-spi-bus-launcher
nagios    1131  1127  0 avril13 ?      00:00:00 /usr/bin/dbus-daemon --config-file=/etc/at-spi2/accessibility.conf --nofork --print-address 3
nagios    1135     1  0 avril13 ?      00:00:00 /usr/lib/at-spi2-core/at-spi2-registryd --use-gnome-session
nagios    1141  1079  0 avril13 ?      00:00:08 /usr/lib/gnome-settings-daemon/gnome-settings-daemon
nagios    1162     1  0 avril13 ?      00:00:00 /usr/bin/pulseaudio --start
nagios    1165   873  0 avril13 ?      00:02:44 c:\TeamViewer\TeamViewer.exe
nagios    1169     1  0 avril13 ?      00:00:00 /usr/lib/gvfs/gvfsd
nagios    1178     1  0 avril13 ?      00:00:00 /bin/sh /usr/bin/start-pulseaudio-x11
nagios    1179  1178  0 avril13 ?      00:00:00 /usr/bin/xprop -root -spy
nagios    1198     1  0 avril13 ?      00:00:00 /usr/lib/gvfs/gvfsd-fuse /run/user/1000/gvfs -f -o big_writes
nagios    1235     1  0 avril13 ?      00:00:00 /usr/lib/gvfs/gvfs-udisks2-volume-monitor
root      1237     1  0 avril13 ?      00:00:00 /usr/lib/udisks2/udisksd --no-debug
nagios    1246     1  0 avril13 ?      00:00:00 /usr/lib/gvfs/gvfs-gphoto2-volume-monitor
nagios    1250     1  0 avril13 ?      00:00:00 /usr/lib/gvfs/gvfs-afc-volume-monitor
nagios    1255     1  0 avril13 ?      00:00:00 /usr/lib/gvfs/gvfs-mtp-volume-monitor
nagios    1259     1  0 avril13 ?      00:00:00 /usr/lib/gvfs/gvfs-goa-volume-monitor
nagios    1262     1  0 avril13 ?      00:00:00 /usr/lib/gnome-online-accounts/goa-daemon
nagios    1270  1079  0 avril13 ?      00:01:48 /usr/bin/gnome-shell
nagios    1272     1  0 avril13 ?      00:00:00 /usr/lib/telepathy/mission-control-5
nagios    1278     1  0 avril13 ?      00:00:00 /usr/lib/gnome-settings-daemon/gsd-printer
nagios    1317     1  0 avril13 ?      00:00:00 /usr/lib/gnome-shell/gnome-shell-calendar-server
nagios    1324     1  0 avril13 ?      00:00:00 /usr/lib/evolution/evolution-source-registry
nagios    1378     1  0 avril13 ?      00:01:11 /opt/teamviewer/tv_bin/wine/bin/wineserver
nagios    1397     1  0 avril13 ?      00:00:00 C:\windows\system32\services.exe
nagios    1398  1079  0 avril13 ?      00:00:00 /usr/lib/evolution/3.12/evolution-alarm-notify
nagios    1401  1079  0 avril13 ?      00:00:00 nm-applet
nagios    1403  1079  0 avril13 ?      00:00:00 /usr/bin/python /usr/share/system-config-printer/applet.py
nagios    1404  1079  0 avril13 ?      00:00:01 /usr/lib/tracker/tracker-miner-fs
nagios    1407  1079  0 avril13 ?      00:00:00 /usr/lib/tracker/tracker-miner-user-guides
nagios    1414     1  0 avril13 ?      00:00:00 /usr/lib/evolution/evolution-calendar-factory
nagios    1415  1079  0 avril13 ?      00:00:00 /usr/lib/tracker/tracker-miner-apps
nagios    1417  1079  0 avril13 ?      00:00:01 /usr/lib/tracker/tracker-extract
nagios    1424  1079  0 avril13 ?      00:00:03 zeitgeist-datahub
nagios    1431     1  0 avril13 ?      00:00:00 /usr/lib/i386-linux-gnu/gconf/gconfd-2
nagios    1437     1  0 avril13 ?      00:00:00 /usr/lib/tracker/tracker-store
nagios    1438     1  0 avril13 ?      00:00:00 /usr/bin/zeitgeist-daemon
nagios    1457     1  0 avril13 ?      00:00:00 /usr/lib/i386-linux-gnu/zeitgeist-fts
nagios    1471  1457  0 avril13 ?      00:00:00 /bin/cat
nagios    1486     1  0 avril13 ?      00:00:00 C:\windows\system32\explorer.exe /desktop
nagios    1504  1165  0 avril13 ?      00:00:00 [TeamViewer.exe] <defunct>
nagios    1505  1165  0 avril13 ?      00:00:55 /opt/teamviewer//tv_bin/TVGuiSlave.32 16 1
nagios    1508  1165  0 avril13 ?      00:00:52 /opt/teamviewer//tv_bin/TVGuiDelegate 16 1
nagios    1578     1  0 avril13 ?      00:00:00 /usr/lib/gvfs/gvfsd-metadata
nagios    1582     1  0 avril13 ?      00:06:29 /usr/lib/vmware-tools/sbin32/vmtoolsd -n vmusr
nagios    1706     1  0 avril13 ?      00:15:48 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios    1710  1706  0 avril13 ?      00:01:29 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios    1711  1706  0 avril13 ?      00:01:35 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios    1712  1706  0 avril13 ?      00:01:39 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios    1713  1706  0 avril13 ?      00:01:38 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios    1729  1706  0 avril13 ?      00:00:10 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
postfix   2154   869  0 08:41 ?        00:00:00 pickup -l -t unix -u -c
www-data  3233   911  0 avril13 ?      00:00:00 /usr/sbin/apache2 -k start
www-data  6488   911  0 avril13 ?      00:00:00 /usr/sbin/apache2 -k start
nagios    9290     1  0 08:55 ?        00:00:00 /usr/lib/gnome-terminal/gnome-terminal-server
nagios    9293  9290  0 08:55 ?        00:00:00 gnome-pty-helper
nagios    9294  9290  0 08:55 pts/0    00:00:00 bash
root      9348  9294  0 08:55 pts/0    00:00:00 su
root      9361  9348  0 08:55 pts/0    00:00:00 bash
www-data 10302   911  0 avril13 ?      00:00:00 /usr/sbin/apache2 -k start
www-data 11083   911  0 avril13 ?      00:00:00 /usr/sbin/apache2 -k start
www-data 12621   911  0 avril13 ?      00:00:00 /usr/sbin/apache2 -k start
www-data 13350   911  0 avril13 ?      00:00:00 /usr/sbin/apache2 -k start
www-data 14942   911  0 avril13 ?      00:00:00 /usr/sbin/apache2 -k start
www-data 14953   911  0 avril13 ?      00:00:00 /usr/sbin/apache2 -k start
nagios   15305     1  0 avril18 ?      00:00:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.9 /org/gtk/gvfs/exec_spaw/0
nagios   15322     1  0 avril18 ?      00:00:00 /usr/lib/gvfs/gvfsd-burn --spawner :1.9 /org/gtk/gvfs/exec_spaw/1
nagios   15384     1  0 avril18 ?      00:00:00 /usr/lib/gvfs/gvfsd-smb --spawner :1.9 /org/gtk/gvfs/exec_spaw/2
nagios   15707     1  0 avril18 ?      00:00:00 /usr/lib/dconf/dconf-service
www-data 15725   911  0 avril13 ?      00:00:00 /usr/sbin/apache2 -k start
root     16087     2  0 avril13 ?      00:00:36 [kworker/0:3]
nagios   16089     1  0 avril13 ?      00:00:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
www-data 18738   911  0 avril14 ?      00:00:00 /usr/sbin/apache2 -k start
root     22847     2  0 09:22 ?        00:00:00 [kworker/0:1]
root     25133   632  0 09:25 ?        00:00:00 sshd: nagios [priv]
nagios   25252 25133  0 09:26 ?        00:00:00 sshd: nagios@pts/1
nagios   25253 25252  0 09:26 pts/1    00:00:00 -bash
root     25271 25253  0 09:26 pts/1    00:00:00 su
root     25283 25271  0 09:26 pts/1    00:00:00 bash
root     25792     2  0 09:27 ?        00:00:00 [kworker/0:0]
nagios   26990  1712  0 09:29 ?        00:00:00 /usr/local/nagios/libexec/check_ping -H 10.1.0.14 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   26991 26990  0 09:29 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.1.0.14
nagios   27022  1710  0 09:29 ?        00:00:00 /usr/local/nagios/libexec/check_ping -H 10.0.4.25 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   27023 27022  0 09:29 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.4.25
nagios   27024  1713  0 09:29 ?        00:00:00 /usr/local/nagios/libexec/check_ping -H 10.1.0.11 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   27025 27024  0 09:29 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.1.0.11
nagios   27026  1712  0 09:29 ?        00:00:00 /usr/local/nagios/libexec/check_ping -H 10.0.0.7 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   27027 27026  0 09:29 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.0.7
nagios   27028  1711  0 09:29 ?        00:00:00 /usr/local/nagios/libexec/check_ping -H 10.0.2.134 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   27029 27028  0 09:29 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.2.134
nagios   27030  1710  0 09:29 ?        00:00:00 /usr/local/nagios/libexec/check_ping -H 10.0.4.10 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   27031 27030  0 09:29 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.4.10
nagios   27032  1713  0 09:29 ?        00:00:00 /usr/local/nagios/libexec/check_ping -H 10.1.4.4 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   27033 27032  0 09:29 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.1.4.4
nagios   27034  1712  0 09:29 ?        00:00:00 /usr/local/nagios/libexec/check_ping -H 10.0.4.12 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   27035 27034  0 09:29 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.4.12
nagios   27036  1711  0 09:29 ?        00:00:00 /usr/local/nagios/libexec/check_ping -H 10.0.0.8 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   27037 27036  0 09:29 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.0.8
nagios   27038  1710  0 09:29 ?        00:00:00 /usr/local/nagios/libexec/check_ping -H 10.0.4.2 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   27039 27038  0 09:29 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.4.2
nagios   27040  1713  0 09:29 ?        00:00:00 /usr/local/nagios/libexec/check_ping -H 10.1.4.7 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   27041 27040  0 09:29 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.1.4.7
nagios   27042  1712  0 09:29 ?        00:00:00 /usr/local/nagios/libexec/check_ping -H 10.0.4.24 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   27043 27042  0 09:29 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.4.24
nagios   27044  1711  0 09:29 ?        00:00:00 /usr/local/nagios/libexec/check_ping -H 10.0.4.35 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   27045 27044  0 09:29 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.4.35
nagios   27046  1710  0 09:29 ?        00:00:00 /usr/local/nagios/libexec/check_ping -H 10.0.4.32 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   27047 27046  0 09:29 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.4.32
nagios   27048  1713  0 09:29 ?        00:00:00 /usr/local/nagios/libexec/check_ping -H 10.0.4.28 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   27049 27048  0 09:29 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.4.28
nagios   27050  1712  0 09:29 ?        00:00:00 /usr/local/nagios/libexec/check_ping -H 10.0.4.29 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   27051 27050  0 09:29 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.4.29
nagios   27052  1711  0 09:29 ?        00:00:00 /usr/local/nagios/libexec/check_ping -H 10.0.4.5 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   27053 27052  0 09:29 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.4.5
nagios   27054  1710  0 09:29 ?        00:00:00 /usr/local/nagios/libexec/check_ping -H 10.0.4.19 -w 3000.0,80% -c 5000.0,100% -p 5
nagios   27055 27054  0 09:29 ?        00:00:00 /bin/ping -n -U -w 30 -c 5 10.0.4.19
root     27056 25283  0 09:29 pts/1    00:00:00 ps -aef

User avatar
tacolover101
Posts: 432
Joined: Mon Apr 10, 2017 11:55 am

Re: Another issue with check_nrpe

Post by tacolover101 »

post your nrpe.cfg - /etc/nagios/nrpe.cfg - from the CLIENT machine you're attempting to check (i think the owncloud server?)

also, i have no idea what error messages you're actually seeing - can you show us and label what machines you're attempting to run which commands from so we can see the outputs?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Another issue with check_nrpe

Post by tmcdonald »

Thanks for the assist, @tacolover101!
Former Nagios employee
cocoyanouck
Posts: 96
Joined: Fri Apr 08, 2016 3:17 am

Re: Another issue with check_nrpe

Post by cocoyanouck »

Nrpe.cfg of the client machine (Yes it's our owncloud server) :

Code: Select all

#############################################################################
# Sample NRPE Config File
# Written by: Ethan Galstad (nagios@nagios.org)
#
# Last Modified: 11-23-2007
#
# NOTES:
# This is a sample configuration file for the NRPE daemon.  It needs to be
# located on the remote host that is running the NRPE daemon, not the host
# from which the check_nrpe client is being executed.
#############################################################################


# LOG FACILITY
# The syslog facility that should be used for logging purposes.

log_facility=daemon



# PID FILE
# The name of the file in which the NRPE daemon should write it's process ID
# number.  The file is only written if the NRPE daemon is started by the root
# user and is running in standalone mode.

pid_file=/var/run/nagios/nrpe.pid



# PORT NUMBER
# Port number we should wait for connections on.
# NOTE: This must be a non-priviledged port (i.e. > 1024).
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd

server_port=5666



# SERVER ADDRESS
# Address that nrpe should bind to in case there are more than one interface
# and you do not want nrpe to bind on all interfaces.
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd

#server_address=127.0.0.1



# NRPE USER
# This determines the effective user that the NRPE daemon should run as.
# You can either supply a username or a UID.
#
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd

nrpe_user=nagios



# NRPE GROUP
# This determines the effective group that the NRPE daemon should run as.
# You can either supply a group name or a GID.
#
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd
nrpe_group=nagios



# ALLOWED HOST ADDRESSES
# This is an optional comma-delimited list of IP address or hostnames
# that are allowed to talk to the NRPE daemon. Network addresses with a bit mask
# (i.e. 192.168.1.0/24) are also supported. Hostname wildcards are not currently
# supported.
#
# Note: The daemon only does rudimentary checking of the client's IP
# address.  I would highly recommend adding entries in your /etc/hosts.allow
# file to allow only the specified host to connect to the port
# you are running this daemon on.
#
# NOTE: This option is ignored if NRPE is running under either inetd or xinetd

allowed_hosts=127.0.0.1,10.0.2.201



# COMMAND ARGUMENT PROCESSING
# This option determines whether or not the NRPE daemon will allow clients
# to specify arguments to commands that are executed.  This option only works
# if the daemon was configured with the --enable-command-args configure script
# option.
#
# *** ENABLING THIS OPTION IS A SECURITY RISK! ***
# Read the SECURITY file for information on some of the security implications
# of enabling this variable.
#
# Values: 0=do not allow arguments, 1=allow command arguments

dont_blame_nrpe=0



# BASH COMMAND SUBTITUTION
# This option determines whether or not the NRPE daemon will allow clients
# to specify arguments that contain bash command substitutions of the form
# $(...).  This option only works if the daemon was configured with both
# the --enable-command-args and --enable-bash-command-substitution configure
# script options.
#
# *** ENABLING THIS OPTION IS A HIGH SECURITY RISK! ***
# Read the SECURITY file for information on some of the security implications
# of enabling this variable.
#
# Values: 0=do not allow bash command substitutions,
#         1=allow bash command substitutions

allow_bash_command_substitution=0
# COMMAND PREFIX
# This option allows you to prefix all commands with a user-defined string.
# A space is automatically added between the specified prefix string and the
# command line from the command definition.
#
# *** THIS EXAMPLE MAY POSE A POTENTIAL SECURITY RISK, SO USE WITH CAUTION! ***
# Usage scenario:
# Execute restricted commmands using sudo.  For this to work, you need to add
# the nagios user to your /etc/sudoers.  An example entry for alllowing
# execution of the plugins from might be:
#
# nagios          ALL=(ALL) NOPASSWD: /usr/lib/nagios/plugins/
#
# This lets the nagios user run all commands in that directory (and only them)
# without asking for a password.  If you do this, make sure you don't give
# random users write access to that directory or its contents!

# command_prefix=/usr/bin/sudo



# DEBUGGING OPTION
# This option determines whether or not debugging messages are logged to the
# syslog facility.
# Values: 0=debugging off, 1=debugging on

debug=0



# COMMAND TIMEOUT
# This specifies the maximum number of seconds that the NRPE daemon will
# allow plugins to finish executing before killing them off.

command_timeout=60



# CONNECTION TIMEOUT
# This specifies the maximum number of seconds that the NRPE daemon will
# wait for a connection to be established before exiting. This is sometimes
# seen where a network problem stops the SSL being established even though
# all network sessions are connected. This causes the nrpe daemons to
# accumulate, eating system resources. Do not set this too low.

connection_timeout=300



# WEEK RANDOM SEED OPTION
# This directive allows you to use SSL even if your system does not have
# a /dev/random or /dev/urandom (on purpose or because the necessary patches
# were not applied). The random number generator will be seeded from a file
# which is either a file pointed to by the environment valiable $RANDFILE
# or $HOME/.rnd. If neither exists, the pseudo random number generator will
# be initialized and a warning will be issued.
# Values: 0=only seed from /dev/[u]random, 1=also seed from weak randomness

#allow_weak_random_seed=1
# INCLUDE CONFIG FILE
# This directive allows you to include definitions from an external config file.

#include=<somefile.cfg>



# INCLUDE CONFIG DIRECTORY
# This directive allows you to include definitions from config files (with a
# .cfg extension) in one or more directories (with recursion).

#include_dir=<somedirectory>
#include_dir=<someotherdirectory>



# COMMAND DEFINITIONS
# Command definitions that this daemon will run.  Definitions
# are in the following format:
#
# command[<command_name>]=<command_line>
#
# When the daemon receives a request to return the results of <command_name>
# it will execute the command specified by the <command_line> argument.
#
# Unlike Nagios, the command line cannot contain macros - it must be
# typed exactly as it should be executed.
#
# Note: Any plugins that are used in the command lines must reside
# on the machine that this daemon is running on!  The examples below
# assume that you have plugins installed in a /usr/local/nagios/libexec
# directory.  Also note that you will have to modify the definitions below
# to match the argument format the plugins expect.  Remember, these are
# examples only!


# The following examples use hardcoded command arguments...

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


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

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

#
# local configuration:
#       if you'd prefer, you can instead place directives here
include=/etc/nagios/nrpe_local.cfg


#
# you can place your config snipplets into nrpe.d/
# only snipplets ending in .cfg will get included
include_dir=/etc/nagios/nrpe.d/

My goal is to supervise disk partitions of the owncloud server thanks to Nagios.
The problem is that I checked if nrpe worked correctly on owncloud server, but seem's not :

ocadmin@owncloud:/usr/lib/nagios/plugins$ ./check_nrpe -H 10.0.2.201 #10.0.2.201 is the IP Adresse of our Nagios
CHECK_NRPE: Error - Could not complete SSL handshake.
Last edited by cocoyanouck on Thu Apr 20, 2017 2:46 am, edited 1 time in total.
Locked