Check_HP plugin installation and use
Check_HP plugin installation and use
Hi All,
Having finally managed to get the latest version Nagios Core installed on a VM and have it monitor server windows servers both local and remote, I am now looking to have it monitor a bit more in-depth on each host.
I chose the HP_Check plugin which looks like it will do everything I need it to but am having some trouble getting it to work. I have extracted and placed the plugin in my Nagios plugins folder (\usr\local\nagios\libexec), added a service definition and a command definition and added these to a host. I then restarted Nagios which didn't throw up any errors but when I check the server in Nagios I have an error: "(Return code of 13 is out of bounds)" - I'm clearly missing something but I just don't know what it is!
I have configured SMNP on the windows host that I am trying to monitor and pretty sure I've forwarded the ports correctly - not sure if there is a way to confirm this?
Let me know if you need me to paste any of my service, command definitions etc.
If it helps I'm running the latest version of Ubuntu along with the latest version of Nagios.
If it helps I get the same error message when I try to run the plugin from the terminal. Even as "Sudo" I get a permissions error.
I've tried setting the permissions on the file but it doesn't seem to make any difference.
Having finally managed to get the latest version Nagios Core installed on a VM and have it monitor server windows servers both local and remote, I am now looking to have it monitor a bit more in-depth on each host.
I chose the HP_Check plugin which looks like it will do everything I need it to but am having some trouble getting it to work. I have extracted and placed the plugin in my Nagios plugins folder (\usr\local\nagios\libexec), added a service definition and a command definition and added these to a host. I then restarted Nagios which didn't throw up any errors but when I check the server in Nagios I have an error: "(Return code of 13 is out of bounds)" - I'm clearly missing something but I just don't know what it is!
I have configured SMNP on the windows host that I am trying to monitor and pretty sure I've forwarded the ports correctly - not sure if there is a way to confirm this?
Let me know if you need me to paste any of my service, command definitions etc.
If it helps I'm running the latest version of Ubuntu along with the latest version of Nagios.
If it helps I get the same error message when I try to run the plugin from the terminal. Even as "Sudo" I get a permissions error.
I've tried setting the permissions on the file but it doesn't seem to make any difference.
Last edited by szkoda on Mon Dec 08, 2014 10:54 am, edited 1 time in total.
Re: Check_HP plugin installation and use
Please post your command definition that HP_check is using and make sure to add any agruments that are being sent. This could mean you simply forgot a space or aren't using an argument correctly. Also you can try the --help with the plugin and see if you arguments are following their argument formatting.
/Luke
Re: Check_HP plugin installation and use
Please do post the service and command definitions. Could you also post the output of a "ls -l" on the plugin file?
Are you using check_hp? From their README if you installed plugins from the Ubuntu repositories.
Are you using check_hp? From their README
The "(Return code of 13 is out of bounds)" message indicates a permission issue, so you might need to change the lib path toPlease update the 'lib' path at the top of check_hp to fit your distribution.
check_hp needs to locate the utils.pm library that comes with nagios-plugins.
You will need the Net::SNMP package as well. In most distributions this is available
as a package named "libsnmp-perl" - so make sure to install it if you stumble accross
an error starting with "Can't locate Net/SNMP.pm in @INC [...]".
Code: Select all
use lib "/usr/lib/nagios/plugins";
Re: Check_HP plugin installation and use
I'm a little confused - I have two plugins folders from what I can see:
/usr/local/nagios/libexec
/usr/lib/nagios/plugins
which one should the check_hp plugin be in?
I have also changed the "use lib" path as suggested but the error is the same. If it helps I installed the plugin manually (i.e. I downloaded it from Nagios Exchange and placed it in both plugins folders above).
I'll send you my service and command definitions now - but pretty sure they are wrong also!
/usr/local/nagios/libexec
/usr/lib/nagios/plugins
which one should the check_hp plugin be in?
I have also changed the "use lib" path as suggested but the error is the same. If it helps I installed the plugin manually (i.e. I downloaded it from Nagios Exchange and placed it in both plugins folders above).
I'll send you my service and command definitions now - but pretty sure they are wrong also!
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Check_HP plugin installation and use
It may all be pointing to the wrong location, I'm not sure why you have two different plugins directories, you may have tried to install it two different ways. With a typical centos/rhel installation, "/usr/local/nagios/libexec" is the one that is used by default at build time. Can you post the ls -l of that plugin? As of right now, if you cannot find that plugin where you think you put it, we would have no idea either.
Re: Check_HP plugin installation and use
I've never used the ls -l command before - would you be able to let me know the full code for it please?
Last edited by szkoda on Tue Dec 09, 2014 11:19 am, edited 2 times in total.
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Check_HP plugin installation and use
It's just a modifier for "ls" so you would do something like so:
That will let us know (among other things) what the permissions are on the file itself. Since Linux is essentially all a conglomeration of files, permissions between them are highly important.
Code: Select all
ls -l /path/to/where/you/put/the/plugin/pluginname
Re: Check_HP plugin installation and use
This is what I get when I type the code:
"-rwxr-x—x 1 nagios Nagios 14795 Dec 4 12:22 /usr/local/Nagios/libexec/check_hp"
Currently the "check_hp" file I downloaded I put in both folders to be safe - Is there a way to tell which one Nagios is using?
"-rwxr-x—x 1 nagios Nagios 14795 Dec 4 12:22 /usr/local/Nagios/libexec/check_hp"
Currently the "check_hp" file I downloaded I put in both folders to be safe - Is there a way to tell which one Nagios is using?
Re: Check_HP plugin installation and use
I would imagine the nagios Nagios is wrong since the group should be lower case nagios as well. Maybe you just mistyped that part?
/Luke
Re: Check_HP plugin installation and use
Sorry typo, should be "nagios nagios"