How to add check

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Mark de Bokx
Posts: 43
Joined: Wed Jul 07, 2010 1:59 am

How to add check

Post 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
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: How to add check

Post 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.
Mark de Bokx
Posts: 43
Joined: Wed Jul 07, 2010 1:59 am

Re: How to add check

Post 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
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: How to add check

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Mark de Bokx
Posts: 43
Joined: Wed Jul 07, 2010 1:59 am

Re: How to add check

Post 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?
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: How to add check

Post by Box293 »

Show us a screenshot of the service and also the check command you've created.

You're almost there.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Mark de Bokx
Posts: 43
Joined: Wed Jul 07, 2010 1:59 am

Re: How to add check

Post by Mark de Bokx »

Got it working :D

Thanks for the support!
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: How to add check

Post by Box293 »

Great stuff.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Mark de Bokx
Posts: 43
Joined: Wed Jul 07, 2010 1:59 am

Re: How to add check

Post 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)
You do not have the required permissions to view the files attached to this post.
mmestnik
Posts: 972
Joined: Mon Feb 15, 2010 2:23 pm

Re: How to add check

Post by mmestnik »

Add a service for your check command and set something like PING(ICMP) for the host check command.
Locked