NRPE definition question

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.
Locked
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

NRPE definition question

Post by jbruyet »

Hey all, I've been trying to get a service definition working and after some random changes I finally got it to work. Here's the original definition that doesn't work:

Code: Select all

define service {
	use			generic-service
	hostgroup		win7Group
	service_description	Hard Disk Check
	check_command		check_nrpe2!CheckDriveSize -a ShowAll=long MinWarnFree=10% MinCritFree=5% Drive=c:\
}
and here's the definition that does work:

Code: Select all

define service {
	use			generic-service
	hostgroup		win7Group
	service_description	Hard Disk Check
	check_command		check_nrpe2!CheckDriveSize -a ShowAll=long MinWarnFree=10% MinCritFree=5% Drive=c:\

}
Notice the additional line feed between the closing curly bracket and the check_command. Any idea why this happened? I've spent quite a bit of time working on it.

Thanks,

Joe B
jbruyet
Posts: 235
Joined: Wed Dec 28, 2011 12:14 pm

Re: NRPE definition question

Post by jbruyet »

For what it's worth the check_nrpe2 command is the way it works under FreeBSD.

Thanks,

Joe B
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NRPE definition question

Post by scottwilkerson »

it's hard to say without seeing your check_nrpe2 command definition however I would guess it has something to do with ending the line with the escape char

Code: Select all

 \
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked