nagios problem after migration to version 3
J. Bakshi
joydeep at infoservices.in
Wed Oct 21 17:40:03 CEST 2009
Marc Powell wrote:
> 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'.
>
>
Is it not the reason to provide
check_mysql!localhost!root!password123 in service definition ?
I have also modified the command definition as
$USER1$/check_mysql -H $ARG1$ -u $ARG2$ -p $ARG2$
but nagios reports
``````````````
Access denied for user 'root'@'localhost' (using password: YES)
```````````
though check_mysql runs perfectly well
```````````````
/usr/lib/nagios/plugins/check_mysql -H localhost -u root -p password123
Uptime: 522385 Threads: 1 Questions: 382106 Slow queries: 0 Opens:
2032 Flush tables: 1 Open tables: 954 Queries per second avg: 0.731
```````````````````````````````
>> 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