Trying to setup plugin check_numoffiles.sh

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.
joshtate2001
Posts: 29
Joined: Wed Apr 08, 2015 1:55 pm

Re: Trying to setup plugin check_numoffiles.sh

Post by joshtate2001 »

I figured out my syntax. I have it working great! Thanks all for the help!
The key was the systax on the arguments and the allow nasty characters in the nsclient config.

Final Service Code:

Code: Select all

define service{
	use			doceserve-services
	host_name		doc-e-serve
	service_description	Fileage Verification of C:\Doceserve\Active
	check_command		check_nrpe!CheckFiles!path='C:\\DoceServe\Active' pattern=*.* 'master-syntax={%total% Files Found}' MaxWarn=2 MaxCrit=4
	}	
Final Command Code:

Code: Select all

# 'check_nrpe' command definition
define command{
        command_name    check_nrpe
        command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
}
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Trying to setup plugin check_numoffiles.sh

Post by mcapra »

Excellent! Is it alright if we lock this thread and mark the issue as resolved?
Former Nagios employee
https://www.mcapra.com/
Locked