[ SOLVED ] nagios problem after migration to version 3

J. Bakshi joydeep at infoservices.in
Wed Oct 21 17:03:42 CEST 2009


J. Bakshi wrote:
> Assaf Flatto wrote:
>   
>> >From first glance the parameters you are passing from command line are not the same as you are 
>> passing from the nagios command execution .
>>
>>   
>>     
>>> define command{
>>> command_name    check_mysql
>>> command_line    $USER1$/check_mysql -H   $HOSTADDRESS$ -p $ARG1$ -c $ARG2$
>>>     
>>>       
>>  
>>   
>>     
>>>  /usr/lib/nagios/plugins/check_mysql  -H localhost  -u <username> -p<password>
>>>     
>>>       
>> Here you are giving a user name and password  , while on the nagios command  you specify the 
>> password and the critiacl parameters , no username 
>>
>> Assaf
>>   
>>     
>
> Hello Asaf,
>
> I have now the command declination as
>
> `````````````````````
> # MYSQL command definition
> define command{
> command_name    check_mysql
> command_line    $USER1$/check_mysql -H  $HOSTADDRESS$  -u $ARG1$ -p $ARG2$
> }
> ``````````````````````````
>
> and localhost has same code
>
> `````````````````````
> # Define a service to check MYSQL
>
> 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
>         }
> `````````````````````````````````````
>
> and still get
>
> ````````````````
> Host '192.168.1.1' is not allowed to connect to this MySQL server
> `````````````````
>
> Why still it picking up 192.168.1.1 IP ?
> I am confused  :-(
>
>
>
>   

Asaf I have no idea why -H parameter is not working here !!!  But if I
just remove  * -H $HOSTADDRESS$ *  and  modify service definition as

check_mysql!root!password123

 and it works perfectly ok. Though I think * -H $HOSTADDRESS$ * should
work where mysql needs a specific hostname to log in successfully. Any
workaround to make * -H $HOSTADDRESS$ * working ?

Thanks




------------------------------------------------------------------------------
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