Page 1 of 1

confused about using nrpe

Posted: Tue Mar 05, 2013 7:15 pm
by tom11011
Hi Group,

Looking for some clarification on using NRPE.

I have installed the nsclient++ piece on a windows server. I chose the option to activate most common plugins.

On my linux nagios server, my configs are setup to use something like this.

check_nrpe!alias_cpu

This is working.

My question is does alias_cpu configuration parameters exist on my windows pc or on my linux nagios server?

In my nagios.ini file on the pc, the following is in there.

Code: Select all

; A list of aliases available. An alias is an internal command that has been "wrapped" (to add arguments). Be careful so you don't create loops (ie check_loop=check_a, check_a=check_loop)
[/settings/external scripts/alias]

; alias_cpu - Alias for alias_cpu. To configure this item add a section called: /settings/external scripts/alias/alias_cpu
alias_cpu = checkCPU warn=80 crit=90 time=5m time=1m time=30s
But on my linux nagios server, their are similar configs in commands.cfg

It's a little confusing, for example, if I want to change the warning level of the check_cpu, do I make that adjustment on the windows pc or the linux server?

Re: confused about using nrpe

Posted: Wed Mar 06, 2013 11:12 am
by abrist
You would have to make changes to the alias_cpu directive. Or you could use the CheckCPU command and declare the warning and critical etc in the service check in XI.

Re: confused about using nrpe

Posted: Wed Mar 06, 2013 12:46 pm
by tom11011
Still a little confused.

If I make changes to the alias_cpu directive, where? On the windows server I'm checking or the nagios server?

I'm using core not XI.

Re: confused about using nrpe

Posted: Wed Mar 06, 2013 12:59 pm
by abrist
tom11011 wrote:Still a little confused.

If I make changes to the alias_cpu directive, where? On the windows server I'm checking or the nagios server?
If you notice the alias in your "nagios.ini" file (i presume this is you nsclient.ini or nsc.ini file??), the warning and critical thresholds are declared:

Code: Select all

alias_cpu = checkCPU warn=80 crit=90 time=5m time=1m time=30s
So you would change this line it you need to edit thresholds.

Alternatively, you could use the checkCPU command itself, creating a commands.cfg definition and a service definition entry in your core configs for the check. This would allow you to pass arguments to the check from core:

Code: Select all

 ./check_nrpe -H <remote host ip> -p 5666 -t 20 checkCPU -a warn=80 crit=95
For more information about implementing the check this way see the following documents:
http://www.nsclient.org/nscp/wiki/doc/usage/nagios/nrpe
http://www.nsclient.org/nscp/wiki/CheckSystem
I'm using core not XI.
oops. That is alright though as nothing here is specific to XI.

Re: confused about using nrpe

Posted: Wed Mar 06, 2013 2:01 pm
by tom11011
Thank you, I'll give that a try.

Re: confused about using nrpe

Posted: Wed Mar 06, 2013 2:51 pm
by abrist
Let us know how it works out.