Page 1 of 1

disk_check HELP!!!!

Posted: Fri Feb 26, 2016 5:10 pm
by spyder13337
on Nagios Server :
NRPE.CFG
# i also enable dont blane nrpe 1.
and add the IP address of the server

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 <--- this be where i select the partion to momitor for a client side
command[check_zombie_procs]=/usr/local/nagios/libexec/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 250 -c 300
command[check_disk]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1 <--- or do i use this one

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$"

command.cfg

define command {
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
}

# 'check_disk' command definition
define command{
command_name check_disk
command_line $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$
}

Servicegroup.cfg

define service{
use local-service
service_description Free Space
check_command check_nrpe!check_disk
max_check_attempts 3
check_interval 5
retry_interval 1
check_period 24x7
notification_interval 60
notification_period 24x7
contacts nagiosadmin
hostgroups *
host_name !localhost

Client Side

# i also enable dont blane nrpe 1.

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_sda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/sda2
command[check_zombie_procs]=/usr/local/nagios/libexec/plugins/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 250 -c 300


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$"


so why do i recieved error

NRPE: Command 'check_disk' not defined what i am missing


Thank you for all your Help

please let me know if there is something else you need form me

Re: disk_check HELP!!!!

Posted: Mon Feb 29, 2016 10:28 am
by rkennedy
Can you post the full syntax you are running to get that result?

Your config looks fine, either one of your commands will work (check_hda1/check_disk). What is the result if you run check_hda1? Did you restart the xinetd / nrpe service after making the changes on the client side?

Re: disk_check HELP!!!!

Posted: Tue Mar 01, 2016 6:55 pm
by spyder13337
thanks for the replay i am still sorta new to nagios where can i get a full syntax

1. on nagios machine i install xinetd with the plugin and NRPE but i cant do the command "service nrpe status" on Debian i can do it on XINETD i do not know if this is an issue my target machine i can do "service NRPE status" either way i restart all service from nagios to NRPE to xinetd
2. on my client side i have NRPE install i can do a "service NRPE status" i restart XINETD and NRPE
3. my server is Debian and my client is OpenSuze

Re: disk_check HELP!!!!

Posted: Tue Mar 01, 2016 10:35 pm
by spyder13337
DISK CRITICAL - /dev/hda1 is not accessible: No such file or directory

Re: disk_check HELP!!!!

Posted: Wed Mar 02, 2016 11:30 am
by rkennedy
spyder13337 wrote:DISK CRITICAL - /dev/hda1 is not accessible: No such file or directory
Was this from running the following command?
command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1 <--- this be where i select the partion to momitor for a client side

On the client machine, what is the output of df -h?

Re: disk_check HELP!!!!

Posted: Tue Mar 22, 2016 10:56 am
by spyder13337
sorry for the long delay it seem to be i was using the wrong nrpe.cfg i should be using /usr/local/nagios/etc/nrpe.cfg i had success on this