So, today, i've in command.cfg :
Code: Select all
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
}
define command{
command_name CheckNumberFiles
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$
}
Code: Select all
define service{
use generic-service
host_name NAME OF MY SERVER
notification_interval 20
service_description Number of files on Request
check_command CheckNumberFiles!check_files!/path:"c:\\GESTION\\REQUEST" /searchdepth:1 /selage:ignore /warning:5 /critical:10
}
define service{
use generic-service
host_name NAME OF MY SERVER
notification_interval 20
service_description Number of files on Request 2
check_command check_nrpe!check_files!/path:"c:\\GESTION\\REQUEST" /searchdepth:1 /selage:ignore /warning:5 /critical:10
}
Number of files on Request
UNKNOWN 12-04-2016 09:27:19 0d 0h 17m 15s 3/3 Invalid command line: unrecognised option '/path:c:GESTIONREQUEST'
Number of files on Request 2
UNKNOWN 12-04-2016 09:22:12 0d 0h 12m 22s 3/3 Invalid command line: unrecognised option '/path:c:GESTIONREQUEST'
So, when i run the command in /usr/local/nagios/libexec : ./check_nrpe -H @IPofmyserver -c check_files -a path=c:/GESTION/REQUEST
for the FIRST TIME, it works !!! and the output is :
OK: All 2 files are ok.
But i still not understand what I need to wrote on path in the descriptions of the service
![Sad :(](./images/smilies/icon_e_sad.gif)