NRPE: Command 'mysql_processlist' not defined

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
spyder13337
Posts: 68
Joined: Tue Oct 06, 2015 9:50 pm

NRPE: Command 'mysql_processlist' not defined

Post 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
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: NRPE: Command 'mysql_processlist' not defined

Post by cdienger »

I'm not able to reproduce the problem. Please provide copies of the config and command script.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
rkennedy
Posts: 6579
Joined: Mon Oct 05, 2015 11:45 am

Re: NRPE: Command 'mysql_processlist' not defined

Post 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.
Former Nagios Employee
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: NRPE: Command 'mysql_processlist' not defined

Post by tmcdonald »

Thanks for the assist, @rkennedy!
Former Nagios employee
spyder13337
Posts: 68
Joined: Tue Oct 06, 2015 9:50 pm

Re: NRPE: Command 'mysql_processlist' not defined

Post 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.
spyder13337
Posts: 68
Joined: Tue Oct 06, 2015 9:50 pm

Re: NRPE: Command 'mysql_processlist' not defined

Post by spyder13337 »

thanks guy for your help that pissed me off i forgot about client side not it all make sense it
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: NRPE: Command 'mysql_processlist' not defined

Post by mcapra »

Did you have additional questions regarding this issue?
Former Nagios employee
https://www.mcapra.com/
spyder13337
Posts: 68
Joined: Tue Oct 06, 2015 9:50 pm

Re: NRPE: Command 'mysql_processlist' not defined

Post by spyder13337 »

no go ahead and close this thread
Locked