[Nagiosplug-help] check_mysql creating user via phpmyadmin

David Gossage dgossage at zacks.com
Wed May 20 20:36:59 CEST 2009


I'm having issues getting the check_mysql to work in nagios.  I had a
pre-existing host setup by someone long gone, and am trying to add 2
other new mysql servers to a basic check.  I did my best to make the
user appear to be setup exactly as I saw the original one was.
check_mysql -H hostname -u nagios -p passwd works from the commandline,
but then fails from the nagios check.  Oddly the original host gives me
a access denied from the commandline, but then works from the check
nagios sends.

Here is the lines from .cfg's pretty basic.

commands.cfg
# 'check_mysql' command definition
define command{
        command_name    check_mysql
        command_line    $USER1$/check_mysql -H $HOSTADDRESS$ -u $ARG1$
-p $ARG2$
        }

services.cfg
# Service definition
define service{
        use                             generic-service         ; Name
of service template to use
        host_name                       originalserver,newserver
        service_description             MYSQL
        check_command                   check_mysql!nagios!
NORTREALPASSWD
        }


Newserver on commandline recieves the usual Uptime, threads, etc..
readout, but in nagios returns this error

Access denied for user 'nagios'@'qeren.zacks.com' (using password: YES)

And oddly it's the opposite for the original server which works in
nagios, but returns same error on commandline.

Here is what the current permissions are set to which is the same as on
the original server as far as I can tell.
User:nagios Host:server.domain.com Password:Yes GlobalPrivileges:USAGE
Grant:No



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-plugins.org/archive/help/attachments/20090520/f0be6f9e/attachment.html>


More information about the Help mailing list