Error in Service definition

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
parveenfathima.m
Posts: 5
Joined: Thu Aug 21, 2014 1:54 am

Error in Service definition

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Error in Service definition

Post 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.
Former Nagios employee
Locked