Page 1 of 1

Error in Service definition

Posted: Mon Sep 01, 2014 6:36 am
by parveenfathima.m
Hi guys,


I am new to nagios plugin development. I tried to create my custom plugin using shell script named as "check_open_files.sh". After that i put that file into nagios/plugin folder. And also set the configuration file for defining a service and host.

My service definition are,

define service {
use generic-service
host_name parveen-HP-Compaq-6200-Pro-MT-PC
service_description Currently-Opened-files
check_command check_open_files!192.168.8.68
}

My nrpe.cfg file is,

command[check_open_files]=/usr/lib/nagios/plugins/check_open_files.sh apache 150 200

After that i start the both nagios-nrpe-server and nagios3

Error occurred in nagios3 server start . following error messages are shown at server starting.

"Error: Service check command 'check_open_files' specified in service 'Currently-Opened-files' for host 'parveen-HP-Compaq-6200-Pro-MT-PC' not defined anywhere!"

Please help me to figure out the issues.

Re: Error in Service definition

Posted: Tue Sep 02, 2014 10:21 am
by tmcdonald
If you are trying to run this through NRPE, you will need to use the "check_nrpe" command in your nagios configs.

If you are trying to run this directly through nagios, you need to define "check_open_files" in your nagios configs.