Nagios plugins not installed correctly?

Hi There,
I'm troubleshooting a config error that pops up when ever I add a new service to a .cfg file (like windows.cfg).  The new services are part of the base plugin pack for Nagios.  Stuff like: check_disk, check_dns, check_snmp, and so on.  I can see the files in /usr/local/nagios/libexec.  So I'm guessing either my plugin is installed wrong or I have to add something to a config file somewhere so Nagios can find it.

Here's a few stats on the setup:
-running on Centos
-Nagios seems to be running fine and stable
-using service check_nt without issue

Thanks for any thoughts or help.

James
xdd-llcAsked:
Who is Participating?
 
Sebastian TalmonSystem Engineer Datacenter SolutionsCommented:

you could not use linux executables / plugins / scripts directly in a service definition.

first you have do define a "command" for nagios like that:

# 'check_http' command definition
define command{
    command_name    check_http
    command_line    $USER1$/check_http -I $HOSTADDRESS$ $ARG1$
}

then you could use that "command"  (and not the executable/script) in your service definition.
0
 
nociSoftware EngineerCommented:
by default the $USER1$ variable points to this location and the check_commands are referenced using
$USER1$/check_command ,..,..

like:
define command {
                command_name                    check_cups
                command_line                    $USER1$/check_http -H $HOSTADDRESS$ -p 631
}

0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
xdd-llcAuthor Commented:
TacoTec,

Thanks for responding.

I looked over my commands.cfg and did find that some of the plugins aren't defined.  Where do you get these definitions?

James
0
 
nociSoftware EngineerCommented:
checkcommands.cfg    in the nagios directory.
0
 
nociSoftware EngineerCommented:
(or any file, that gets included in the nagios.conf)
0
 
xdd-llcAuthor Commented:
Let me rephrase.

Is there a doc anywhere that has the "define command" structure for plugins?  How to you create a "define command" if it isn't there?  Just copy the basic structure of another one?

Thanks
0
 
xdd-llcAuthor Commented:
Thanks Noci.  This should get me moving in the right direction again.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.