Page 1 of 1

NRPE: Command 'mysql_processlist' not defined

Posted: Mon Apr 03, 2017 11:37 am
by spyder13337
ok so this might be a really easy fixed that i am overlooking

but those not make any sense the physical file is there so it not missing
i can run it manually and received valid info but if i have nagios run it it show
log file received valid data

"NRPE: Command 'mysql_processlist' not defined"


my command.cfg

# 'mysql_processlist’ command definition
define command{
command_name mysql_processlist
command_line $USER1$/mysql_processlist -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$
}

service.cfg

define service{
use generic-service
service_description Check Mysql Processlist
check_command check_nrpe!mysql_processlist! -a '-w 50 -c 100'
max_check_attempts 3
check_interval 5
retry_interval 1
check_period 24x7
hostgroups MySql
contacts nagiosadmin
servicegroups MySql
}

NRPE.cfg

command[mysql_processlist]=/usr/local/nagios/libexec/mysql_processlist -u xxx -p xxxxxx -w 50 -c 100

Re: NRPE: Command 'mysql_processlist' not defined

Posted: Mon Apr 03, 2017 2:00 pm
by cdienger
I'm not able to reproduce the problem. Please provide copies of the config and command script.

Re: NRPE: Command 'mysql_processlist' not defined

Posted: Mon Apr 03, 2017 10:12 pm
by rkennedy
What is the output of netstat -anp | grep 5666?

Code: Select all

# 'mysql_processlist’ command definition
define command{
command_name mysql_processlist
command_line $USER1$/mysql_processlist -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$
} 
This is wrong. The service definition is fine, but i'm not sure how you're planning on passing '-w 50 -c 100' when you don't have $ARG1$ specified in your NRPE mysql_processlist command.

Code: Select all

command[mysql_processlist]=/usr/local/nagios/libexec/mysql_processlist -u xxx -p xxxxxx -w 50 -c 100
This part needs to be on NRPE.cfg on the CLIENT side, and after adding it restart NRPE or xinetd, depending on how you installed.

Re: NRPE: Command 'mysql_processlist' not defined

Posted: Tue Apr 04, 2017 10:26 am
by tmcdonald
Thanks for the assist, @rkennedy!

Re: NRPE: Command 'mysql_processlist' not defined

Posted: Thu Apr 06, 2017 3:04 pm
by spyder13337
rkennedy wrote:What is the output of netstat -anp | grep 5666?

tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN 595/xinetd

Code: Select all

# 'mysql_processlist’ command definition
define command{
command_name mysql_processlist
command_line $USER1$/mysql_processlist -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$
} 
This is wrong. The service definition is fine, but i'm not sure how you're planning on passing '-w 50 -c 100' when you don't have $ARG1$ specified in your NRPE mysql_processlist command.

Code: Select all

command[mysql_processlist]=/usr/local/nagios/libexec/mysql_processlist -u xxx -p xxxxxx -w 50 -c 100
This part needs to be on NRPE.cfg on the CLIENT side, and after adding it restart NRPE or xinetd, depending on how you installed.

Re: NRPE: Command 'mysql_processlist' not defined

Posted: Thu Apr 06, 2017 3:12 pm
by spyder13337
thanks guy for your help that pissed me off i forgot about client side not it all make sense it

Re: NRPE: Command 'mysql_processlist' not defined

Posted: Thu Apr 06, 2017 4:50 pm
by mcapra
Did you have additional questions regarding this issue?

Re: NRPE: Command 'mysql_processlist' not defined

Posted: Mon Apr 10, 2017 4:51 pm
by spyder13337
no go ahead and close this thread