Page 3 of 4

Re: Monitoring remote hosts using NRPE on another remote hos

Posted: Sun Mar 29, 2015 1:17 am
by Apurv
Hi Box293,

I tried to configure indirect check on nagios server using the steps u had provided me but I was only able to successfully test it till 2nd step, that is getting output on Host(B) from command prompt.

When I try to perform a indirect check from nagios server using the below command I get an error :
============================
./check_nrpe -H <Host(b) IP address> -c nrpe_query -a host=<Host(c) IP address> query-command=CheckCPU query-arguments="warn=80" query-arguments="crit=90" query-arguments="time=1m" query-arguments="time=5m" query-arguments="time=15m"
============================

I get the below error :
===================================
Exception processing request: Request contained arguments (not currently allowed, check the allow arguments option).
===================================


Could you and tmcdonald help me out please???

Awaiting your reply!

Re: Monitoring remote hosts using NRPE on another remote hos

Posted: Sun Mar 29, 2015 6:12 pm
by Box293
Both host B and C need to allow arguments. On each host, open a command prompt and execute the following:

Code: Select all

cd "\Program Files\NSClient++\" 
nscp settings --path /settings/NRPE/server --key "allow arguments" --set true
Then restart the NSClient++ service on both servers.

Re: Monitoring remote hosts using NRPE on another remote hos

Posted: Thu Apr 16, 2015 9:05 pm
by Apurv
Hi,

I am again here with a small query. I have setup everything now. The only issue that I am facing now is that I am getting "Critical state" email alerts for "Total Processes" service on few of the hosts.

I have changed the parameters for (warning and critical states to 400/500) in below command :
===================================
check command : check_nrpe!check_total_procs!400!500!RSZDT
===================================

After doing this and restarting the nagios service,nagios web interface still shows them in critical state as the default values(warning/Critical) for this service are 250 and 400. Could you please help me out with this and help me resolve this issue.

Thanks in advance.

Re: Monitoring remote hosts using NRPE on another remote hos

Posted: Thu Apr 16, 2015 10:10 pm
by Box293
Apurv wrote:After doing this and restarting the nagios service,nagios web interface still shows them in critical state as the default values(warning/Critical) for this service are 250 and 400.
Did you wait until the next check of the service to occur? What happens when you "Re-schedule the next check of this service", does it go back to 0?

What is the output you are getting?

Re: Monitoring remote hosts using NRPE on another remote hos

Posted: Fri Apr 17, 2015 6:34 am
by Apurv
Hello Box293,

I re-scheduled the checks for these services, still it shows critical warning with a red background. This is happening even when the values are set high as explained in my last reply.

Any other fix that we can try?

Re: Monitoring remote hosts using NRPE on another remote hos

Posted: Fri Apr 17, 2015 10:32 am
by lmiltchev
How many processes do you have running on the remote box? Can you show us the actual command run from the command line along with the output of it? Also, show us how the command is defined on the client. Here's a couple of examples:

Code: Select all

command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w $ARG1$ -c $ARG2$ -s $ARG3$

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c check_total_procs -a 400 500 RSZDT
PROCS OK: 135 processes with STATE = RSZDT | procs=135;400;500;0;
or

Code: Select all

command[check_procs]=/usr/local/nagios/libexec/check_procs $ARG1$

Code: Select all

/usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c check_procs -a '-w 400 -c 500 -s RSZDT'
PROCS OK: 137 processes with STATE = RSZDT | procs=137;400;500;0;

Re: Monitoring remote hosts using NRPE on another remote hos

Posted: Wed Jun 17, 2015 8:44 pm
by Apurv
Hey All!

Sorry for the extremely delayed reply. How's nagios going with you all?

@lmiltchev : Yes! Buddy.. I was able to fix the issue with total processes. There was a minor change I needed to make which I didn't realize at the start but after having a deep look at your response I was able to figure out the change I needed to make and fix the issue.

Is anyone of you aware how can we extended the values for "warning" and "critical" states for the service "MySql-threads-connected"..... I am using check_mysql_health plugin to get stats regarding MySql

Help from all of you is always appreciated and needed....

Awaiting for your response guys!

Re: Monitoring remote hosts using NRPE on another remote hos

Posted: Thu Jun 18, 2015 12:15 am
by Box293
Apurv wrote:Is anyone of you aware how can we extended the values for "warning" and "critical" states for the service "MySql-threads-connected"..... I am using check_mysql_health plugin to get stats regarding MySql
Can you please provide the current command you are using for check_mysql_health

Re: Monitoring remote hosts using NRPE on another remote hos

Posted: Wed Jun 24, 2015 12:03 am
by Apurv
Hey Box293,

How are you? Sorry for the my late reply!

The command I am using is :
=============================
check_command check_mysql_health!Server-IP!3306!Username!Password!threads-connected
=============================

And the command definition being used is :
=============================
define command{
command_name check_mysql_health
command_line $USER1$/check_mysql_health -H $ARG1$ -port $ARG2$ -username $ARG3$ -password $ARG4$ -mode $ARG5$
}
=============================

Re: Monitoring remote hosts using NRPE on another remote hos

Posted: Wed Jun 24, 2015 1:29 am
by Box293
Have you referred to this documentation:

https://labs.consol.de/nagios/check_mysql_health/

Specifically it lists:
Keyword Description Range
threads-connected Number of open connections 1..n (10, 20)