confused about using nrpe

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
tom11011
Posts: 4
Joined: Sat Feb 09, 2013 7:40 pm

confused about using nrpe

Post 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?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: confused about using nrpe

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
tom11011
Posts: 4
Joined: Sat Feb 09, 2013 7:40 pm

Re: confused about using nrpe

Post 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.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: confused about using nrpe

Post 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.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
tom11011
Posts: 4
Joined: Sat Feb 09, 2013 7:40 pm

Re: confused about using nrpe

Post by tom11011 »

Thank you, I'll give that a try.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: confused about using nrpe

Post by abrist »

Let us know how it works out.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
Locked