nrpe check_disk help
-
- Posts: 10
- Joined: Thu Feb 23, 2017 2:44 am
Re: nrpe check_disk help
i tried 3 commands
root@nagios:/usr/local/nagios/etc# /usr/local/nagios/libexec/check_nrpe -H 10.50.0.51 -c check_sdb1
NRPE: Command 'check_sdb1' not defined
root@nagios:/usr/local/nagios/etc# /usr/local/nagios/libexec/check_nrpe -H 10.50.0.51 -c check_sda1
NRPE: Command 'check_sda1' not defined
root@nagios:/usr/local/nagios/etc# /usr/local/nagios/libexec/check_nrpe -H 10.50.0.51 -c check_hda1
NRPE: Command 'check_hda1' not defined
same output for all of them
root@nagios:/usr/local/nagios/etc# /usr/local/nagios/libexec/check_nrpe -H 10.50.0.51 -c check_sdb1
NRPE: Command 'check_sdb1' not defined
root@nagios:/usr/local/nagios/etc# /usr/local/nagios/libexec/check_nrpe -H 10.50.0.51 -c check_sda1
NRPE: Command 'check_sda1' not defined
root@nagios:/usr/local/nagios/etc# /usr/local/nagios/libexec/check_nrpe -H 10.50.0.51 -c check_hda1
NRPE: Command 'check_hda1' not defined
same output for all of them
Re: nrpe check_disk help
From the remote machine running NRPE, can you share the outputs of the following:
After all of that, can you also share the output of the following command executed from the Nagios Core machine:
Code: Select all
ip addr
service xinetd restart
service nrpe restart
ps aux
cat /etc/xinetd.d/nrpe
cat /usr/local/nagios/etc/nrpe.cfg | grep command
Code: Select all
/usr/local/nagios/libexec/check_nrpe -H 10.50.0.51 -c check_sdb1
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
- Posts: 10
- Joined: Thu Feb 23, 2017 2:44 am
Re: nrpe check_disk help
Code: Select all
[root@drsrv-telix01 ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether 00:50:56:88:5b:1c brd ff:ff:ff:ff:ff:ff
inet 10.50.0.51/24 brd 10.50.0.255 scope global eth0
[root@drsrv-telix01 ~]#
Code: Select all
[root@drsrv-telix01 ~]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@drsrv-telix01 ~]#
Code: Select all
[root@drsrv-telix01 ~]# service nrpe restart
Shutting down nrpe: [ OK ]
Starting nrpe: [ OK ]
[root@drsrv-telix01 ~]#
Code: Select all
[root@drsrv-telix01 ~]# ps aux
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.0 2904 1300 ? Ss 2016 0:27 /sbin/init
root 2 0.0 0.0 0 0 ? S 2016 0:02 [kthreadd]
root 3 0.0 0.0 0 0 ? S 2016 0:04 [migration/0]
root 4 0.0 0.0 0 0 ? S 2016 1:51 [ksoftirqd/0]
root 5 0.0 0.0 0 0 ? S 2016 0:00 [stopper/0]
root 6 0.0 0.0 0 0 ? S 2016 1:26 [watchdog/0]
root 7 0.0 0.0 0 0 ? S 2016 0:05 [migration/1]
root 8 0.0 0.0 0 0 ? S 2016 0:00 [stopper/1]
root 9 0.0 0.0 0 0 ? S 2016 2:02 [ksoftirqd/1]
root 10 0.0 0.0 0 0 ? S 2016 1:22 [watchdog/1]
root 11 0.0 0.0 0 0 ? S 2016 7:25 [events/0]
root 12 0.0 0.0 0 0 ? S 2016 8:51 [events/1]
root 13 0.0 0.0 0 0 ? S 2016 0:00 [events/0]
root 14 0.0 0.0 0 0 ? S 2016 0:00 [events/1]
root 15 0.0 0.0 0 0 ? S 2016 0:00 [events_long/0]
root 16 0.0 0.0 0 0 ? S 2016 0:00 [events_long/1]
root 17 0.0 0.0 0 0 ? S 2016 0:00 [events_power_ef]
root 18 0.0 0.0 0 0 ? S 2016 0:00 [events_power_ef]
root 19 0.0 0.0 0 0 ? S 2016 0:00 [cgroup]
root 20 0.0 0.0 0 0 ? S 2016 0:00 [khelper]
root 21 0.0 0.0 0 0 ? S 2016 0:00 [netns]
root 22 0.0 0.0 0 0 ? S 2016 0:00 [async/mgr]
root 23 0.0 0.0 0 0 ? S 2016 0:00 [pm]
root 24 0.0 0.0 0 0 ? S 2016 1:01 [sync_supers]
root 25 0.0 0.0 0 0 ? S 2016 1:11 [bdi-default]
root 26 0.0 0.0 0 0 ? S 2016 0:00 [kintegrityd/0]
root 27 0.0 0.0 0 0 ? S 2016 0:00 [kintegrityd/1]
root 28 0.0 0.0 0 0 ? S 2016 13:21 [kblockd/0]
root 29 0.0 0.0 0 0 ? S 2016 12:48 [kblockd/1]
root 30 0.0 0.0 0 0 ? S 2016 0:00 [kacpid]
root 31 0.0 0.0 0 0 ? S 2016 0:00 [kacpi_notify]
root 32 0.0 0.0 0 0 ? S 2016 0:00 [kacpi_hotplug]
root 33 0.0 0.0 0 0 ? S 2016 0:00 [ata_aux]
root 34 0.0 0.0 0 0 ? S 2016 36:16 [ata_sff/0]
root 35 0.0 0.0 0 0 ? S 2016 58:25 [ata_sff/1]
root 36 0.0 0.0 0 0 ? S 2016 0:00 [ksuspend_usbd]
root 37 0.0 0.0 0 0 ? S 2016 0:00 [khubd]
root 38 0.0 0.0 0 0 ? S 2016 0:00 [kseriod]
root 39 0.0 0.0 0 0 ? S 2016 0:00 [md/0]
root 40 0.0 0.0 0 0 ? S 2016 0:00 [md/1]
root 41 0.0 0.0 0 0 ? S 2016 0:00 [md_misc/0]
root 42 0.0 0.0 0 0 ? S 2016 0:00 [md_misc/1]
root 43 0.0 0.0 0 0 ? S 2016 0:00 [linkwatch]
root 44 0.0 0.0 0 0 ? S 2016 0:08 [khungtaskd]
root 45 0.0 0.0 0 0 ? S 2016 58:51 [kswapd0]
root 46 0.0 0.0 0 0 ? SN 2016 0:00 [ksmd]
root 47 0.0 0.0 0 0 ? S 2016 0:00 [aio/0]
root 48 0.0 0.0 0 0 ? S 2016 0:00 [aio/1]
root 49 0.0 0.0 0 0 ? S 2016 0:00 [crypto/0]
root 50 0.0 0.0 0 0 ? S 2016 0:00 [crypto/1]
root 57 0.0 0.0 0 0 ? S 2016 0:00 [kthrotld/0]
root 58 0.0 0.0 0 0 ? S 2016 0:00 [kthrotld/1]
root 59 0.0 0.0 0 0 ? S 2016 0:00 [pciehpd]
root 61 0.0 0.0 0 0 ? S 2016 0:00 [kpsmoused]
root 62 0.0 0.0 0 0 ? S 2016 0:00 [usbhid_resumer]
root 63 0.0 0.0 0 0 ? S 2016 0:00 [deferwq]
root 96 0.0 0.0 0 0 ? S 2016 0:00 [kdmremove]
root 97 0.0 0.0 0 0 ? S 2016 0:00 [kstriped]
root 128 0.0 0.0 0 0 ? S 2016 0:00 [ttm_swap]
root 208 0.0 0.0 3024 1192 ? S 2016 0:01 /bin/plymouthd --attach-to-session
root 267 0.0 0.0 0 0 ? S 2016 5:32 [mpt_poll_0]
root 268 0.0 0.0 0 0 ? S 2016 0:00 [mpt/0]
root 269 0.0 0.0 0 0 ? S 2016 0:00 [scsi_eh_0]
root 274 0.0 0.0 0 0 ? S 2016 0:00 [scsi_eh_1]
root 275 0.0 0.0 0 0 ? S 2016 55:21 [scsi_eh_2]
root 388 0.0 0.0 0 0 ? S 2016 0:00 [kdmflush]
root 390 0.0 0.0 0 0 ? S 2016 0:00 [kdmflush]
root 408 0.0 0.0 0 0 ? S 2016 2:13 [jbd2/dm-0-8]
root 409 0.0 0.0 0 0 ? S 2016 0:00 [ext4-dio-unwrit]
root 501 0.0 0.0 2992 1268 ? S<s 2016 0:00 /sbin/udevd -d
root 682 0.0 0.0 0 0 ? S 2016 3:49 [vmmemctl]
root 967 0.0 0.0 3120 1528 ? S< 2016 0:00 /sbin/udevd -d
root 1014 0.0 0.0 0 0 ? S 2016 0:00 [jbd2/sda1-8]
root 1015 0.0 0.0 0 0 ? S 2016 0:00 [ext4-dio-unwrit]
root 1018 0.0 0.0 0 0 ? S 2016 2:15 [kjournald]
root 1026 0.0 0.0 0 0 ? S 2016 1:53 [flush-253:0]
root 1054 0.0 0.0 0 0 ? S 2016 0:08 [kauditd]
root 1055 0.0 0.0 5264 1636 ? Ss 2016 0:00 /bin/bash /etc/rc.d/rc 3
root 1323 0.0 0.0 13940 828 ? S<sl 2016 0:38 auditd
root 1345 0.0 0.0 38284 3224 ? Sl 2016 0:22 /sbin/rsyslogd -i /var/run/syslogd.pid -c 5
dbus 1375 0.0 0.0 13560 1400 ? Ssl 2016 0:05 dbus-daemon --system
root 1389 0.0 0.3 20656 13500 ? Ss 2016 1:28 NetworkManager --pid-file=/var/run/NetworkManager/NetworkManager.pid
root 1396 0.0 0.0 4856 2100 ? S 2016 0:00 /usr/sbin/modem-manager
68 1428 0.0 0.0 17956 3588 ? Ssl 2016 1:54 hald
root 1429 0.0 0.0 4056 1240 ? S 2016 0:00 hald-runner
root 1484 0.0 0.0 4128 1136 ? S 2016 0:00 hald-addon-input: Listening on /dev/input/event2 /dev/input/event0
68 1511 0.0 0.0 3712 1056 ? S 2016 0:00 hald-addon-acpi: listening on acpi kernel interface /proc/acpi/event
root 1564 0.0 0.0 7612 904 ? Ss 2016 0:00 /usr/sbin/wpa_supplicant -c /etc/wpa_supplicant/wpa_supplicant.conf -B -u -f /var/log/wpa_supplicant.log -P /var/run/wp
root 1646 0.0 0.0 12660 2568 ? Ss 2016 2:05 /usr/libexec/postfix/master
postfix 1659 0.0 0.0 12812 2464 ? S 2016 0:26 qmgr -l -t fifo -u
root 1660 0.0 0.0 5700 1352 ? Ss 2016 2:35 crond
root 1687 0.0 0.3 76300 13196 ? Sl 2016 2:47 /usr/bin/Xvnc :1 -desktop drsrv-telix01.cardiff.local:1 (root) -auth /root/.Xauthority -geometry 1440x900 -rfbwait 3000
root 1691 0.0 0.0 2448 768 ? S 2016 0:00 /usr/bin/ck-xinit-session /usr/bin/ssh-agent /etc/X11/xinit/Xclients
root 1692 0.0 0.0 6776 1384 ? S 2016 0:00 vncconfig -iconic
root 1700 0.0 0.0 5260 1576 ? S 2016 0:00 /bin/bash /etc/rc3.d/S99firstboot start
root 1706 0.0 0.1 19564 5436 ? S 2016 0:00 /usr/bin/python2 /usr/sbin/firstboot
root 1715 0.0 0.0 3648 776 ? S 2016 0:00 dbus-launch --sh-syntax --exit-with-session
root 1716 0.0 0.0 13540 1336 ? Ssl 2016 0:00 /bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
root 1723 0.0 0.0 23764 3108 ? Sl 2016 0:00 /usr/sbin/console-kit-daemon --no-daemon
root 1789 0.0 0.0 5592 1076 ? S 2016 0:00 setup
root 1793 0.0 0.1 49104 7988 ? Sl 2016 0:00 /usr/bin/gnome-session
root 1794 0.0 0.0 8812 568 ? Ss 2016 1:35 /usr/bin/ssh-agent /etc/X11/xinit/Xclients
root 1801 0.0 0.0 6616 2624 ? S 2016 0:01 /usr/libexec/devkit-power-daemon
root 1807 0.0 0.1 8704 4172 ? S 2016 1:59 /usr/libexec/gconfd-2
root 1824 0.0 0.2 142696 9000 ? Ssl 2016 9:37 /usr/libexec/gnome-settings-daemon
root 1828 0.0 0.0 53084 2572 ? Sl 2016 0:00 gnome-keyring-daemon --start
root 1831 0.0 0.1 27024 6336 ? Ss 2016 0:00 seahorse-daemon
root 1836 0.0 0.0 7856 2060 ? S 2016 0:00 /usr/libexec/gvfsd
root 1842 0.0 0.0 40344 2400 ? Ssl 2016 0:00 /usr/libexec//gvfs-fuse-daemon /root/.gvfs
root 1845 0.0 0.0 2988 1196 ? S< 2016 0:00 /sbin/udevd -d
root 1849 0.0 0.1 37260 7704 ? S 2016 0:00 metacity
root 1852 0.0 0.2 45048 9060 ? S 2016 10:35 gnome-panel
root 1862 0.0 0.1 26012 5060 ? S 2016 0:00 nautilus
root 1864 0.0 0.0 42940 2836 ? Ssl 2016 0:00 /usr/libexec/bonobo-activation-server --ac-activate --ior-output-fd=18
root 1870 0.0 0.1 28812 7912 ? S 2016 163:51 /usr/libexec/wnck-applet --oaf-activate-iid=OAFIID:GNOME_Wncklet_Factory --oaf-ior-fd=18
root 1872 0.0 0.1 42948 7588 ? S 2016 0:00 /usr/libexec/trashapplet --oaf-activate-iid=OAFIID:GNOME_Panel_TrashApplet_Factory --oaf-ior-fd=24
root 1874 0.0 0.0 8712 2728 ? S 2016 0:00 /usr/libexec/gvfs-gdu-volume-monitor
root 1878 0.0 0.0 8356 2664 ? S 2016 0:00 /usr/libexec/gvfsd-trash --spawner :1.8 /org/gtk/gvfs/exec_spaw/0
root 1880 0.0 0.0 6628 2724 ? S 2016 0:03 /usr/libexec/udisks-daemon
root 1881 0.0 0.0 6384 804 ? S 2016 70:36 udisks-daemon: polling /dev/sr0
root 1883 0.0 0.0 8764 2180 ? S 2016 0:00 /usr/libexec/gvfs-gphoto2-volume-monitor
root 1885 0.0 0.0 21872 2184 ? Sl 2016 10:18 /usr/libexec/gvfs-afc-volume-monitor
root 1893 0.0 0.2 67020 9052 ? S 2016 0:00 /usr/bin/gnote --panel-applet --oaf-activate-iid=OAFIID:GnoteApplet_Factory --oaf-ior-fd=19
root 1895 0.0 0.2 54440 8508 ? S 2016 0:00 /usr/libexec/gdm-user-switch-applet --oaf-activate-iid=OAFIID:GNOME_FastUserSwitchApplet_Factory --oaf-ior-fd=28
root 1896 0.0 0.2 59184 10752 ? S 2016 8:44 /usr/libexec/clock-applet --oaf-activate-iid=OAFIID:GNOME_ClockApplet_Factory --oaf-ior-fd=34
root 1898 0.0 0.1 27420 6680 ? S 2016 0:00 /usr/libexec/notification-area-applet --oaf-activate-iid=OAFIID:GNOME_NotificationAreaApplet_Factory --oaf-ior-fd=40
root 1906 0.0 0.0 7516 3456 ? S 2016 0:01 /usr/libexec/polkit-1/polkitd
root 3987 0.0 0.0 11724 3804 ? Ss Feb24 0:09 sshd: root@pts/1
root 3992 0.0 0.0 5260 1736 pts/1 Ss+ Feb24 0:00 -bash
root 5076 0.0 0.0 11724 3828 ? Ss Feb24 0:09 sshd: root@pts/0
root 5080 0.0 0.0 5264 1828 pts/0 Ss Feb24 0:00 -bash
root 7919 0.0 0.0 8652 1052 ? Ss 2016 0:10 /usr/sbin/sshd
root 20451 0.0 0.0 2900 880 ? Ss 11:05 0:00 xinetd -stayalive -pidfile /var/run/xinetd.pid
nrpe 20490 0.0 0.0 6340 1164 ? Ss 11:05 0:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
root 20492 5.0 0.0 4936 1072 pts/0 R+ 11:05 0:00 ps aux
[root@drsrv-telix01 ~]#
Code: Select all
[root@drsrv-telix01 ~]# cat /etc/xinetd.d/nrpe
cat: /etc/xinetd.d/nrpe: No such file or directory
Code: Select all
[root@drsrv-telix01 ~]# cat /usr/local/nagios/etc/nrpe.cfg | grep command
# to specify arguments to commands that are executed. This option only works
# if the daemon was configured with the --enable-command-args configure script
# Values: 0=do not allow arguments, 1=allow command arguments
# to specify arguments that contain bash command substitutions of the form
# the --enable-command-args and --enable-bash-command-substitution configure
# Values: 0=do not allow bash command substitutions,
# 1=allow bash command substitutions
allow_bash_command_substitution=0
# This option allows you to prefix all commands with a user-defined string.
# command line from the command definition.
# This lets the nagios user run all commands in that directory (and only them)
# command_prefix=/usr/bin/sudo
command_timeout=60
# 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
# Note: Any plugins that are used in the command lines must reside
# 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
# command arguments *AND* the dont_blame_nrpe directive in 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_sdb1]=/usr/local/nagios/libexec/check_disk -w 20 -c 10 -p /dev/sdb1
command[check_sdb1]=/usr/local/nagios/libexec/check_disk -w $ARG1$ -c $ARG2$ -s $ARG3$
command[check_procs]=/usr/local/nagios/libexec/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$
Code: Select all
root@nagios:/usr/local/nagios/etc# /usr/local/nagios/libexec/check_nrpe -H 10.50.0.51 -c check_sdb1
NRPE: Command 'check_sdb1' not defined
Last edited by tmcdonald on Mon Mar 06, 2017 10:45 am, edited 1 time in total.
Reason: Please use [code][/code] tags around long output
Reason: Please use [code][/code] tags around long output
Re: nrpe check_disk help
Your NRPE isn't running under xinetd -
You'll want to track down /etc/nagios/nrpe.cfg and see what this contains, chances are it's different. Figure out if you want to run NRPE as standalone, or under the xinetd services.
Code: Select all
nrpe 20490 0.0 0.0 6340 1164 ? Ss 11:05 0:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
Former Nagios Employee
-
- Posts: 10
- Joined: Thu Feb 23, 2017 2:44 am
Re: nrpe check_disk help
i prefer standalone...
so if i remove the xinetd service or stop it will be ok?
so if i remove the xinetd service or stop it will be ok?
Re: nrpe check_disk help
xinetd is not needed for NRPE if it is running standalone.
I did notice that your NRPE is using a different configuration than the one we've been looking at:
Can you share the contents of /etc/nagios/nrpe.cfg? I'd like to make sure the commands were defined in there and not the other file.
I did notice that your NRPE is using a different configuration than the one we've been looking at:
Code: Select all
nrpe 20490 0.0 0.0 6340 1164 ? Ss 11:05 0:00 /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg -d
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
- Posts: 10
- Joined: Thu Feb 23, 2017 2:44 am
Re: nrpe check_disk help
Code: Select all
[root@drsrv-telix01 ~]# cat /etc/nagios/nrpe.cfg
#############################################################################
# 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/nrpe/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=nrpe
# 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=nrpe
# 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.140.136
# 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=1
# 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>
# 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$
# 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=/etc/nrpe.d/
Last edited by tmcdonald on Mon Mar 06, 2017 10:44 am, edited 1 time in total.
Reason: Please use [code][/code] tags around long output
Reason: Please use [code][/code] tags around long output
Re: nrpe check_disk help
check_sdb1 does not exist in your /etc/nagios/nrpe.cfg, which is the config file being loaded. You'll either need to add the command definition to that file, or change your NRPE to leverage the previously changed configuration file.
Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
-
- Posts: 10
- Joined: Thu Feb 23, 2017 2:44 am
Re: nrpe check_disk help
i added the command to the specific nrpe.cfg and everything worked like a charm.
thank you guys
thank you guys
Re: nrpe check_disk help
Glad to help!
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.