?
Solved

Nagios plugins not installed correctly?

Posted on 2011-10-18
8
Medium Priority
?
317 Views
Last Modified: 2012-05-12
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
0
Comment
Question by:xdd-llc
  • 4
  • 3
8 Comments
 
LVL 5

Expert Comment

by:Sebastian Talmon
ID: 36995415

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
 
LVL 41

Expert Comment

by:noci
ID: 36995507
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
 

Author Comment

by:xdd-llc
ID: 36995809
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 41

Expert Comment

by:noci
ID: 36996673
checkcommands.cfg    in the nagios directory.
0
 
LVL 41

Expert Comment

by:noci
ID: 36996674
(or any file, that gets included in the nagios.conf)
0
 

Author Comment

by:xdd-llc
ID: 37034150
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
 
LVL 41

Accepted Solution

by:
noci earned 2000 total points
ID: 37034908
0
 

Author Closing Comment

by:xdd-llc
ID: 37066009
Thanks Noci.  This should get me moving in the right direction again.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month12 days, 21 hours left to enroll

579 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question