NRPE unrecognized output when monitoring Ubuntu server

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
cwscribner
Posts: 316
Joined: Thu Mar 31, 2011 9:54 am
Location: Patten, ME
Contact:

NRPE unrecognized output when monitoring Ubuntu server

Post by cwscribner »

Hi all.

I get NRPE: Unable to read output for the following services: Cron, ssh, and syslog daemon. I also get 'UNKNOWN: iostat not found or is not executable by the nagios user' for CPU Stats monitoring. Any thoughts on how to fix these?

System being monitored
OS: Ubuntu 10.04
Agent: nagios-agent installed via repos
Last edited by cwscribner on Mon Jan 30, 2012 12:32 pm, edited 2 times in total.
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: NRPE unrecognized output when monitoring Ubuntu server

Post by agriffin »

iostat is in the sysstat package on Red Hat and CentOS systems. Try running the following command to (re)install it:

Code: Select all

yum install sysstat
Regarding the NRPE error, can you post your command definitions both on the Nagios side and the NRPE client side?
cwscribner
Posts: 316
Joined: Thu Mar 31, 2011 9:54 am
Location: Patten, ME
Contact:

Re: NRPE unrecognized output when monitoring Ubuntu server

Post by cwscribner »

I added some background info to the original post.

I've tried using apt-get to install iostat but it seems like there isn't such a package available for Ubuntu. Is it a sub-part of another package or do I need to use a completely different utility?

Nagios server side:
CPU: $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$ (ARG1=check_cpu_stats ARG2=-a '-w 85 -c 95')
Cron: "..." (ARG1=check_init_service ARG2=-a 'crond')
Syslog: "..." (ARG1=check_init_service ARG2=-a 'syslog')

I'm not sure where to find the definitions on the host side since the agent was installed via repo.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NRPE unrecognized output when monitoring Ubuntu server

Post by scottwilkerson »

cwscribner wrote:I've tried using apt-get to install iostat but it seems like there isn't such a package available for Ubuntu. Is it a sub-part of another package or do I need to use a completely different utility?
iostat should be part of the sysstat package

Code: Select all

sudo apt-get install sysstat
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
cwscribner
Posts: 316
Joined: Thu Mar 31, 2011 9:54 am
Location: Patten, ME
Contact:

Re: NRPE unrecognized output when monitoring Ubuntu server

Post by cwscribner »

That did the trick for the CPU monitoring.

Now I just have to get NRPE working...
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NRPE unrecognized output when monitoring Ubuntu server

Post by scottwilkerson »

cwscribner wrote:That did the trick for the CPU monitoring.

Now I just have to get NRPE working...
Lets look in

Code: Select all

/etc/nagios/nrpe.cfg
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
cwscribner
Posts: 316
Joined: Thu Mar 31, 2011 9:54 am
Location: Patten, ME
Contact:

Re: NRPE unrecognized output when monitoring Ubuntu server

Post by cwscribner »

Here's the nrpe.cfg file on the monitored server.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NRPE unrecognized output when monitoring Ubuntu server

Post by scottwilkerson »

In this file you will need to set dont_blame_nrpe=1 because you are passing args from your Nagios server.

but this also assumes that nrpe was compiled with

Code: Select all

./configure --enable-command-args
and I'm not sure at this moment what the RPM does.

Additionally, the folders /etc/nagios/nrpe.d/ is included and their is likely a commands.cfg file in their

Also in this configuration is
include=/etc/nagios/nrpe_local.cfg

so their may be overriding configurations in that file...
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
cwscribner
Posts: 316
Joined: Thu Mar 31, 2011 9:54 am
Location: Patten, ME
Contact:

Re: NRPE unrecognized output when monitoring Ubuntu server

Post by cwscribner »

So nrpe_local.cfg contained nothing. I found one file in nrpe.d that had configuration directives in it. I've attached it.
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: NRPE unrecognized output when monitoring Ubuntu server

Post by scottwilkerson »

on my ubuntu test machine my cron is named cron instead of crond, ssh is ssh instead of sshd
you should be able to check yours with

Code: Select all

service --status-all
To make these changes, in XI change the $ARGS1$ from -a 'crond' to -a 'cron'

This was one of the reasons why we had disabled the ubuntu & debian in the wizard.

I'll try to get these sorted for the next release of the wizard.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked