Hi,
I have use check_mysql_health plugin and i want to read the output with nrpe
so i use this check_nrpe!check_mysql_health
but it gives unknow$mode if i run the command on terminal it gives below output:
/usr/lib/nagios/plugins/check_mysql_health -v --hostname localhost --user root --password 'nagios#123' --mode uptime
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LANG = "en_IN"
are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
OK - database is up since 4227 minutes
database is up since 4227 minutes | 'uptime'=4227;10:;5:;;
Please help.
Check_mysql_health plugin gives unknown
Re: Check_mysql_health plugin gives unknown
What OS is this on? It looks like you may need to set some environment variables or install local info:
https://stackoverflow.com/questions/249 ... l/20627476
You can also try working around it by running it like:
LANG=C /usr/lib/nagios/plugins/check_mysql_health -v --hostname localhost --user root --password 'nagios#123' --mode uptime
https://stackoverflow.com/questions/249 ... l/20627476
You can also try working around it by running it like:
LANG=C /usr/lib/nagios/plugins/check_mysql_health -v --hostname localhost --user root --password 'nagios#123' --mode uptime
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: Check_mysql_health plugin gives unknown
What is the output of this command on the remote server:
What is the full output of these commands?
Please send me your nrpe.cfg from the remote system as well.
Code: Select all
locale
Code: Select all
su - nagios
LANGUAGE=C LANG=C LC_ALL=C /usr/lib/nagios/plugins/check_mysql_health -v --hostname localhost --user root --password 'nagios#123' --mode uptime
Re: Check_mysql_health plugin gives unknown
Output of locale
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_IN
LANGUAGE=
LC_CTYPE="en_IN"
LC_NUMERIC="en_IN"
LC_TIME="en_IN"
LC_COLLATE="en_IN"
LC_MONETARY="en_IN"
LC_MESSAGES="en_IN"
LC_PAPER="en_IN"
LC_NAME="en_IN"
LC_ADDRESS="en_IN"
LC_TELEPHONE="en_IN"
LC_MEASUREMENT="en_IN"
LC_IDENTIFICATION="en_IN"
LC_ALL=
==========================================================
LANGUAGE=C LC_ALL=C /usr/lib/nagios/plugins/check_mysql_health -v --hostname localhost --user root --password 'nagios#123' --mode uptime
OK - database is up since 5639 minutes
database is up since 5639 minutes | 'uptime'=5639;10:;5:;;
===========================================================
nrpe config
command[check_mysql_health]=/usr/lib/nagios/plugins/check_mysql_health --hostname localhost --user root --password 'nagios#123' --mode uptime
===========================================================
My issue is that i want to use the output of this check_mysql_health using nrpe
define service{
use local-service
host_name localhost
service_description mysql-uptime
check_command check_nrpe!check_mysql_health
}
by using above i am getting unknown on nagios GUI.
Please help.
I am using Ubuntu on both the ends .
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
LANG=en_IN
LANGUAGE=
LC_CTYPE="en_IN"
LC_NUMERIC="en_IN"
LC_TIME="en_IN"
LC_COLLATE="en_IN"
LC_MONETARY="en_IN"
LC_MESSAGES="en_IN"
LC_PAPER="en_IN"
LC_NAME="en_IN"
LC_ADDRESS="en_IN"
LC_TELEPHONE="en_IN"
LC_MEASUREMENT="en_IN"
LC_IDENTIFICATION="en_IN"
LC_ALL=
==========================================================
LANGUAGE=C LC_ALL=C /usr/lib/nagios/plugins/check_mysql_health -v --hostname localhost --user root --password 'nagios#123' --mode uptime
OK - database is up since 5639 minutes
database is up since 5639 minutes | 'uptime'=5639;10:;5:;;
===========================================================
nrpe config
command[check_mysql_health]=/usr/lib/nagios/plugins/check_mysql_health --hostname localhost --user root --password 'nagios#123' --mode uptime
===========================================================
My issue is that i want to use the output of this check_mysql_health using nrpe
define service{
use local-service
host_name localhost
service_description mysql-uptime
check_command check_nrpe!check_mysql_health
}
by using above i am getting unknown on nagios GUI.
Please help.
I am using Ubuntu on both the ends .
Re: Check_mysql_health plugin gives unknown
Try changing your nrpe.cfg from:
To:
Then apply configuration and test to see if it's working now.
Then run these commands on the remote host and let me know the full output:
Code: Select all
command[check_mysql_health]=/usr/lib/nagios/plugins/check_mysql_health --hostname localhost --user root --password 'nagios#123' --mode
Code: Select all
command[check_mysql_health]=LANGUAGE=C LC_ALL=C /usr/lib/nagios/plugins/check_mysql_health --hostname localhost --user root --password 'nagios#123' --mode
Then run these commands on the remote host and let me know the full output:
Code: Select all
su - nagios
LANGUAGE=C LC_ALL=C /usr/lib/nagios/plugins/check_mysql_health --hostname localhost --user root --password 'nagios#123' --mode uptime
echo $?
Re: Check_mysql_health plugin gives unknown
I think nagios nrpe is not able to login because at DB server i disabled remote login and MYSQL is bind with localhost. I just thought i can read output with nrpe . Is this is the possible issue?
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Check_mysql_health plugin gives unknown
Could you run the following on the remote server?farrukh wrote:I think nagios nrpe is not able to login because at DB server i disabled remote login and MYSQL is bind with localhost. I just thought i can read output with nrpe . Is this is the possible issue?
Code: Select all
su - nagios
LANGUAGE=C LC_ALL=C /usr/lib/nagios/plugins/check_mysql_health --hostname localhost --user root --password 'nagios#123' --mode uptime
echo $?