How to install new add ins

Hi
How do you install new Plugins in Nagios?
Do I just have to extract the downloaded plugin?
Or do you need to register them somewhere
For example I have downloaded the plugin:
check_hp_fan.sh
check_hp_mem.sh
check_hp_pwr.sh

Why do these plugins have the ending .sh?

And how do i use the plugins?
If I just add a service looking like this it does not work at all:

define service{
host name blue-vs3
service description Server Fans
check command check_hp_fans.sh
max_check_attempts 3
check interval 60
}

I read you need the switch -h (host) don’t know what to add in there and the switch c (public) no clue either

Sorry to be a pain but I am a absolute newbie and searched the forum for a while but could not find anything.

Thanks for your help guys
Sepp

the usage of a plugin is defined in the commands.cfg file, the service.cfg file calls the command as defined in commands… :slight_smile:

Have a look at the files and run the plugin from the commmand line with the --help switch and you should get it working.

Luca

Hi Luca,
Thanks for your reply, unfortunately it does not answer any of my questions, and i am still stuck at the same place. If you are a Nagios expert it might seem easy. I am not. :cry:

So back to the Question, maybe somebody has a bit more details.

How do I install a new Plugin.
I believe I copy the Plugin into the libexec folder.
How do I define that plugin in the commands.cfg?

And what does the ending .sh mean? (checheck_hp_fan.sh)
Do I have to install the Plugin to get it working or just copy that File into the libex folder?

If i run the command “check_hp_fan.sh --help” from the right folder it says the command could not be found :frowning:

Unfortunately you seem to be missing the basics of linux/unix AND of nagios…

sh is a shell file extension. To run a file in the local directory you have to FIRST make it executable then you need to tell the shell that the file IS in the local directory. In linux the local directory is NOT included in the path variable so you’ll need to use ./my_plugin.sh to execute it.

I suppose from here on you should e able to get on by yourself :slight_smile:

Luca