nagios problem after migration to version 3

Marc Powell marc at ena.com
Wed Oct 21 16:55:49 CEST 2009


On Oct 21, 2009, at 7:21 AM, J. Bakshi wrote:

> check_mysql is not working here properly.
>
> the command declination is
>
> `````````````````````
> define command{
> command_name    check_mysql
> command_line    $USER1$/check_mysql -H   $HOSTADDRESS$ -p $ARG1$ -c  
> $ARG2$
> }

I'm willing to bet money that in the host definition for 'Office  
server', the address parameter is not set to 'localhost'.

> and the localhost.cfg has
>
> `````````````````````````````````
> define service{
>        use                            local-service      ; Name of
> service template to use
>        host_name                      Office server
>        service_description            MYSQL
>        check_command
> check_mysql!localhost!root!password123
>        }

$ARG1$=localhost
$ARG2$=root
$ARG3$=password123

> After restaring the nagipos3 the mysql check reports
>
> ``````````````````````````
> Host '192.168.1.1' is not allowed to connect to this MySQL server
> ```````````````````````````````
>
> Though the plugin working perfectly
>
> /usr/lib/nagios/plugins/check_mysql  -H localhost  -u <username>
> -p<password>
> Uptime: 510145  Threads: 3  Questions: 281108  Slow queries: 0  Opens:
> 966  Flush tables: 1  Open tables: 952  Queries per second avg: 0.551

This is not what nagios is running.

> what might be the problem then ?


Combining the command_line with your service definition, nagios is  
running - /path/to/plugins/check_mysql -H <address value from host  
definition; 192.168.1.x?> -p localhost -c root

Possible solutions -
  -	change your command definition to use the host parameter you're  
trying to pass it  (I presume that the other parameters you pass make  
sense but they don't match your test)
		check_mysql - command_line    $USER1$/check_mysql -H   $ARG1$ -p  
$ARG2$ -c $ARG3$

--
Marc


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list