Page 1 of 2
How to add check
Posted: Mon Aug 02, 2010 8:48 am
by Mark de Bokx
Excuse me for asking this very basic question.
I want to use hpasm (check_hpasm) to monitor HP bladeenclosures. But I cant seem to get it to work under XI, or to state it more correctly ... I don't know how to do this.
- I've compiled the hpasm check and added it to the plugins (like documented in Managing XI Monitoring Plugins)
- I can run the check on the cmd line
nagios# ./libexec/check_hpasm -H hostname -C snmp-community
OK - System: 'bladesystem c7000 enclosure g2', S/N: 'xxxxxxxxxx', hardware working fine
But now I want to add it as a check to a specific host using the monitoring wizard....how do I do this? I think I can use the Generic Network Device check (for I want to monitor the BladeEnclosure hardware, not the OS or anything like that). But how?
TYIA
Re: How to add check
Posted: Mon Aug 02, 2010 9:34 am
by mguthrie
You'll have to create a new command in the
core config manager->commands area. Then you could add that service to the host you want to monitor. (The wizards are created to do all of this for you, but at the moment we only have them for the most common set of checks).
Command syntax in the CCM would look something like this:
Code: Select all
Command: (give it a name of your choice)
Command line: $USER1$/check_hpasm -H $HOSTADDRESS$ -C $ARG1$
Then you you can go to
Services->Add and add this command as a service for the host you want to monitor. Fill in the appropriate information for the host address and $ARG1$. I would suggest inserting the template for the "generic-service," and then making any modifications you want from there.
Re: How to add check
Posted: Tue Aug 03, 2010 2:51 am
by Mark de Bokx
Thing is though that the host as such has not been added yet. What is the best way to add it?
So its:
- add command
- add service
- add service to host
Re: How to add check
Posted: Tue Aug 03, 2010 3:23 am
by Box293
The quickest way to add a host is to use the "Generic Network Device" wizard.
You don't even need to select the ping service when adding it.
Re: How to add check
Posted: Tue Aug 03, 2010 4:52 am
by Mark de Bokx
All fine and dandy ... and now for the next issue.
[1280828515] SERVICE NOTIFICATION: nagiosadmin;hostname;HP Insight Manager;CRITICAL;notify-service-by-email;(Return code of 255 is out of bounds)
But while running it in / on bash:
./check_hpasm -H hostname -C community
OK - System: 'bladesystem c7000 enclosure g2', S/N: xxxxxxxxxxxxxx', hardware working fine
Any suggestions?
Re: How to add check
Posted: Tue Aug 03, 2010 5:06 am
by Box293
Show us a screenshot of the service and also the check command you've created.
You're almost there.
Re: How to add check
Posted: Tue Aug 03, 2010 6:47 am
by Mark de Bokx
Got it working
Thanks for the support!
Re: How to add check
Posted: Tue Aug 03, 2010 7:17 am
by Box293
Great stuff.
Re: How to add check
Posted: Wed Aug 04, 2010 4:59 am
by Mark de Bokx
Still not entirely satisfied ...
I can see the check in Host Status, but not in Service Status ... what did I miss??? (see screenshots)
Re: How to add check
Posted: Wed Aug 04, 2010 11:01 am
by mmestnik
Add a service for your check command and set something like PING(ICMP) for the host check command.