NRPE: Command 'check_disk' not defined

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
MOHANREDDY
Posts: 81
Joined: Tue Apr 10, 2018 4:14 pm

NRPE: Command 'check_disk' not defined

Post by MOHANREDDY »

Hello,

i'm trying to monitor linux server.

i installed by referring to https://assets.nagios.com/downloads/nag ... e/NRPE.pdf

at first i got, SSl handshake failed. i troubleshooted. later i am getting error as "NRPE: Command 'check_disk' not defined"

referred many topics with this error but, but they didn't help.

On the client machine

/usr/local/nagios/libexec/check_nrpe -H localhost -t 30 -c check_users -a '-w 5 -c 10'
USERS OK - 3 users currently logged in |users=3;5;10;0

/usr/local/nagios/libexec/check_nrpe -H localhost -t 30 -c check_disk -a ' -w 85 -c 90 /usr'
NRPE: Command 'check_disk' not defined


on the GUI also the same error exists


I have attached the nrpe.conf file
You do not have the required permissions to view the files attached to this post.
MOHANREDDY
Posts: 81
Joined: Tue Apr 10, 2018 4:14 pm

Re: NRPE: Command 'check_disk' not defined

Post by MOHANREDDY »

when i change the command to monitor root its working, where as its not working on /opt file system


/usr/local/nagios/libexec/check_nrpe -H localhost -t 30 -c check_hda2 -a ' -w 85 -c 90 /dev/mapper/sysvg-lv_opt'
NRPE: Command 'check_hda2' not defined

Code: Select all

command[check_hda2]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/mapper/sysvg-lv_opt

Code: Select all

define service {
	host_name			server
	service_description		/opt Disk Usage
	use				xiwizard_nrpe_service
	check_command			check_nrpe!check_hda2!-a '-w 20% -c 10% -p /dev/mapper/sysvg-lv_opt'!!!!!!
	max_check_attempts		5
	check_interval			5
	retry_interval			1
	check_period			xi_timeperiod_24x7
	notification_interval		60
	notification_period		xi_timeperiod_24x7
	notifications_enabled		1
	contacts			herbert,Mohan Mummadi
	_xiwizard			linux-server
	register			1
	}	
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: NRPE: Command 'check_disk' not defined

Post by npolovenko »

Hello, @MOHANREDDY.

Looks like you do not have a check_disk command defined in your nrpe.cfg file. Edit the file->Find the following paragraph:

Code: Select all

command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[check_load]=/usr/local/nagios/libexec/check_load -r -w .15,.10,.05 -c .30,.25,.20
command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/mapper/sysvg-lv_root
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
And add this line underneath:

Code: Select all

command[check_disk]=/usr/local/nagios/libexec/check_disk $ARG1$
Save the file and restart the nrpe service.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
MOHANREDDY
Posts: 81
Joined: Tue Apr 10, 2018 4:14 pm

Re: NRPE: Command 'check_disk' not defined

Post by MOHANREDDY »

Its working and thanks for the help
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NRPE: Command 'check_disk' not defined

Post by tmcdonald »

Glad to hear it! Are we good to close this up then?
Former Nagios employee
MOHANREDDY
Posts: 81
Joined: Tue Apr 10, 2018 4:14 pm

Re: NRPE: Command 'check_disk' not defined

Post by MOHANREDDY »

yes, you can thanks for the help
Locked