Adding Service to a Host

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Adding Service to a Host

Post by gshergill »

Hi again Nagios Support Community,

I've managed to get the auto-discovery wizard (big thank you for that) and it's all working fine.

The option to auto-discover the services for the hosts as well is great.

The main reason for coming to Nagios XI was the ability to check CPU Temperatures (namely using IPMI).

So I uploaded the plugin at
http://exchange.nagios.org/directory/Pl ... in/details
via the web interface, it is in .tar form.

So how do I go about using this service to monitor one of my hosts?

Thank you.

Kind Regards,

gshergill

EDIT: untarred it and copied check_ipmi_sensor to the folder (libexe).
Added the command to Nagios XI for check_ipmi_sensor ($USER1$/check_ipmi_sensor -H $_HOSTIPMI_IP$ -f $ARG1$)

How do I add this as a service now?

Code: Select all

check_ipmi_sensor -H server.domain
-bash: check_ipmi_sensor: command not found
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Adding Service to a Host

Post by scottwilkerson »

you will need to do a couple things.

Code: Select all

cd /usr/local/nagios/libexec
chmod +x ./check_ipmi_sensor
Then you should be able to run it as

Code: Select all

./check_ipmi_sensor -H server.domain



As the readme alludes to, there are some prerequisites, you will likely need to run the following

Code: Select all

yum install perl-IPC-Run
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Adding Service to a Host

Post by lmiltchev »

I believe you need to review this document:

http://assets.nagios.com/downloads/nagi ... ios_XI.pdf

Make sure you test your plugin from the command line first. You can read more on testing your commands from the command line here:

http://support.nagios.com/wiki/index.ph ... mmand-line


Hope this helps. Please, let us know if you get "stuck" on something.
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: Adding Service to a Host

Post by gshergill »

Hi guys,

Thanks again for the reply.

I had those done and used that guide to test the plugin was working, unfortunately it wasn't.

I restarted the server just now and noticed that the owner of the plugin was apache.... I've changed that now to nagios.

Running the command now retrieves the following result;

Code: Select all

[root@nagiosxi libexec]# ./check_ipmi_sensor -H server.domain
Error: ipmimonitoring command not found
Not sure why it still isn't working.

Thank you.

Kind Regards,

gshergill
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Adding Service to a Host

Post by scottwilkerson »

The README in the tarball says the following are required
Requirements:
-------------
o FreeIPMI version 0.5.1 or newer
o Perl
o Perl IPC::Run
I can tell you Perl is already installed, and the command I gave you earlier would install the Perl IPC::Run

You may also need

Code: Select all

yum install freeipmi -y
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: Adding Service to a Host

Post by gshergill »

Hi scott,

I thought I had installed that already but it seemed I hadn't, thank you.

Is there anything that needs configuring on the FreeIPMI download? Or should the defaults suffice?

At the moment the error is;

Code: Select all

./check_ipmi_sensor -f /etc/freeipmi.conf -H server.domain
/usr/sbin/ipmimonitoring: connection timeout

-> Execution of ipmimonitoring failed with return code 1.
-> ipmimonitoring was executed with the following parameters:
   /usr/sbin/ipmimonitoring -h server.domain --config-file /etc/freeipmi.conf --quiet-cache --sdr-cache-recreate
/usr/sbin/ipmimonitoring is not an editable file, using vi editor it's a collection of symbols.

Thanks again.

Kind Regards,

gshergill

EDIT: Removed EDIT, am testing for sure on a server that is IPMI only
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Adding Service to a Host

Post by mguthrie »

Without knowing anything about IPMI, you're looking for a .conf file, and I'm guessing this is it...

Code: Select all

/etc/freeipmi.conf
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: Adding Service to a Host

Post by gshergill »

Hi mguthrie,

I've seen that file and was asking if there's anything that I should configure in there apart from the defaults?

At the moment I'm looking into integrating Munin with Nagios XI for the IPMI part, however it seems Munin isn't really dealt with anymore.... everything related to it is 3 years old or more, and trying to download a file (ipmi_sensor_) seems impossible.

Hopefully this can be working soon on Nagios without need of an outside software.

Thank you.

Kind Regards,

gshergill
User avatar
gshergill
Posts: 231
Joined: Tue Aug 07, 2012 5:08 am

Re: Adding Service to a Host

Post by gshergill »

Hi guys,

With regards to the password, username and privilege level required for;

check_ipmi_sensor

Are these the details used to log in to the server that needs monitoring (i.e. root for centos machines)? Or do I need something installed on the server, such as freeipmi, and these are the details required to communicate with that?

Thank you.

Kind Regards,

gshergill
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Adding Service to a Host

Post by scottwilkerson »

gshergill wrote:Or do I need something installed on the server, such as freeipmi, and these are the details required to communicate with that?
I believe this would be correct.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked