Hello There, Guest! Login Register
Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5

check_nrpe

#1
Hello,

I'm new to nems and nagios in general. I have 3 raspbery pi's 3b and 2 raspberry pi 2b that do various things that I'm trying to setup monitoring on. Most of the monitoring feature are working fine but I'm having issues with doing things like checking disk space. 

I read the documentation on setting up NPRE on my other pi's and have set them up per the instructions. I added the Advanced Service "/ Disk Space" to my one of my hosts in the Nconf and deployed. When it runs if fails with the follow error "NRPE: Command 'check_disk -w 80 -c 90 -p /' not defined". 

I started looking at the documentation for NPRE on nagios stite and realized that I needed to go to the host machine and modify the /etc/nagios/nrpe.cfg file. 

I see the lines that talks about args and set the blame to. 


Code:
dont_blame_nrpe=1




I also noticed that the command for check_disk was commeted. 


Code:
command[check_disk]=/usr/lib/nagios/plugins/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$



I uncommented the line above and restarted the nagios-nrpe-server. Same error "NRPE: Command 'check_disk -w 80 -c 90 -p /' not defined". 

I modfied the line in the hosts nrpe.cfg file that calls check_hda1 and changed the path from /dev/hda1 because it doesn't exist on the pi to the following.

Code:
command[check_hda1]=/usr/lib/nagios/plugins/check_disk -w 20% -c 10% -p /



Then I modified the Advanced service args "/ Disk Space"  in Nconf to call check_hda1 and it returns as expected. 

I have also tried the following from the terminal on my Nems Server.

Test 1:
call check disk on the remote host.(before I uncomment the check_disk commmand from above)

./check_nrpe -H 192.168.1.120 -c check_disk

NRPE: Command 'check_disk' not defined

Test 2:
call check disk on the remote host.(After I uncomment the check_disk commmand from above) Starting to get somewhere.

./check_nrpe -H 192.168.1.120 -c check_disk
Unknown argument
Usage:
 check_disk -w limit -c limit [-W limit] [-K limit] {-p path | -x device}
[-C] [-E] [-e] [-f] [-g group ] [-k] [-l] [-M] [-m] [-R path ] [-r path ]
[-t timeout] [-u unit] [-v] [-X type] [-N type]


Test 3:
call check disk on the remote host with args.
 ./check_nrpe -H 192.168.1.120 -c  check_disk -a 20 10 /

NRPE: Command 'check_disk!20!10!/' not defined



So I guess I have two questions. 

First one, any idea what I may be doing wrong with the remote commands?

Second, I noticed that in Advanced Services we don't have a way to create one of the check command type check_nrpe in the dropdown. I had to modify one of the existing ones to get the check_hda1 command to fire. Is there a way to make check_nrpe available in the dropdown or a way to clone one of the existing ones and the change the clone?

Any help would be greatly appreciated.

Thanks,
Kris
 
Messages In This Thread
check_nrpe - by Netmonster - 11-27-2018, 04:15 PM
RE: check_nrpe - by Robbie Ferguson - 11-27-2018, 04:30 PM
RE: check_nrpe - by Netmonster - 11-27-2018, 04:42 PM
RE: check_nrpe - by Netmonster - 11-28-2018, 01:26 AM
RE: check_nrpe - by Robbie Ferguson - 11-28-2018, 11:56 AM
RE: check_nrpe - by msveden - 04-01-2019, 04:06 PM
RE: check_nrpe - by msveden - 04-01-2019, 04:50 PM
RE: check_nrpe - by OmegaSeven - 08-25-2019, 11:24 PM
 
Forum Jump:

Users browsing this thread: 1 Guest(s)