how to install plugins

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
kybatman
Posts: 8
Joined: Wed Nov 03, 2010 3:19 pm

how to install plugins

Post by kybatman »

I have downloaded check_hpasm-4.2.1.1.tar and need some help on how to install this on my nagios trial server.

I am a linux novice but can follow directions very well.


Thanks,
Bruce
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: how to install plugins

Post by tonyyarusso »

Plugins should be installed in the /usr/local/nagios/libexec/ directory, and will be single executable files. The plugin you're working with is a bit more complicated than most, as it requires some additional components to be compiled first. You can unpack the tarball under the /tmp directory ('mv check_hpasm-4.2.1.1.tar.gz /tmp/ && cd /tmp && tar zxf check_hpasm-4.2.1.1.tar.gz && cd check_hpasm-4.2.1.1'), and you will see that the authors have provided a README file with instructions for how to install it from there. You will need a few tools installed for the compilation, such as a C compiler (gcc) and the Make utility.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
kybatman
Posts: 8
Joined: Wed Nov 03, 2010 3:19 pm

Re: how to install plugins

Post by kybatman »

Tony,

problem that I had was that without a gui to work from for CentOS, i could not figure out how to unpack or any of the above.

Thanks,

Bruce
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: how to install plugins

Post by tonyyarusso »

Okay, have you managed to get logged in on a shell at least? If you have, then you can use this to download the tarball:

Code: Select all

wget http://labs.consol.de/wp-content/uploads/2010/10/check_hpasm-4.2.1.1.tar.gz
After that succeeds you can just type exactly what I gave before:

Code: Select all

mv check_hpasm-4.2.1.1.tar.gz /tmp/ && cd /tmp && tar zxf check_hpasm-4.2.1.1.tar.gz && cd check_hpasm-4.2.1.1
And an explanation of what those things do:
wget - a file downloading utility, makes a simple HTTP GET request and stores the result in the current working directory by default
mv - file "move", relocates the file to another directory
/tmp - a directory for temporary files, nice for working with things that you'll then throw away after getting a result from them
cd - change directory, relocate yourself to a different location on the filesystem
tar - an archiving/unarchiving utility, also capable of compression. Flags to pass to it include:
- z - pass through gzip compression/decompression (removes the .gz part)
- x - extract (unarchive), pull everything out of the tarball to the current working directory
- f - use the filename given next as the source for doing these operations rather than standard input
&& - a shell shortcut that means "if the command before this finishes successfully, then move on to the one after this"
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
kybatman
Posts: 8
Joined: Wed Nov 03, 2010 3:19 pm

Re: how to install plugins

Post by kybatman »

Thanks Tony.

going to be working on this is a few hours.


Bruce
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: how to install plugins

Post by mguthrie »

For installing *most* new plugins, go to the Admin page, and select Monitoring Config->Manage Plugins. You can use this to uploaded plugins directly to the appropriate directory. However, if you need to test the syntax for the plugin you'll need to do that from the command line. This also doesn't help if you need to compile a plugin from source, but a lot of plugins are simple scripts, and this method will work for most check plugins.

Code: Select all

cd /usr/local/nagios/libexec/
check_something <arguments>  
kybatman
Posts: 8
Joined: Wed Nov 03, 2010 3:19 pm

Re: how to install plugins

Post by kybatman »

Thanks a world mguthrie. I am still trying to wrap my brain around all of the different options and tools inside Nagios.

This one was a huge help..I remebered seeing a manage plugins section but could not remember where it was at.



Thanks again,

Bruce
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: how to install plugins

Post by mguthrie »

You bet, let us know if you need any more help.
sfmblazer
Posts: 2
Joined: Mon Aug 22, 2011 2:05 pm

Re: how to install plugins

Post by sfmblazer »

Using the feature from the web interface, how can I install plugins? I keep getting the following message:

Plugin could not be installed - directory permissions may be incorrect.

The plugin name is: check_all_disks_win.sh

Please help.

- steve -
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: how to install plugins

Post by lmiltchev »

Try running in terminal as root:

Code: Select all

# /usr/local/nagiosxi/scripts/reset_config_perms
Also, review our documentation on managing plugins in Nagios XI:

http://assets.nagios.com/downloads/nagi ... ios_XI.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked