|
Subject: Re: Unable to configure check_mysqld.pl Newsgroups: gmane.network.nagios.plugins Date: 2007-08-30 16:30:15 GMT (1 year, 44 weeks, 1 day, 18 hours and 24 minutes ago) [ Please don't post the same message to both nagios-users@ and nagiosplug-help@. ] * Bijit Bhattacharjee <tu.bijit@...> [2007-08-30 17:51]: > I have installed nagios-2.9 and nagios-plugins-1.4.9 on a RHEL 5 system. > For monitoring MySql, I downloaded check_mysqld.pl and i kept it under > the directory /usr/local/nagios/libexec/ > > I modified the following parameters in check_mysqld.pl file to my need; > my $HOSTNAME= 'localhost'; > my $PORT= 3306; > my $DATABASE= 'test'; > my $USERNAME= 'username'; > my $PASSWORD= 'password'; > > After that, in the file commands.cfg > > I added the command for mysqld as > > define command{ > command_name check_mysqld > command_line $USER1$/check_mysqld.pl -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ > } > > Then, in the file localhost.cfg, I added the service for mysqld as > > define service { > use local-service > host_name localhost > service_description MYSQLD > check_command check_mysqld > } I don't know check_mysqld.pl (I use check_mysql from the official plugins distribution), but you referenced $ARG1$ and $ARG2$ within the command definition without specifying arguments within the service definition. I guess check_mysqld.pl's "-u" and "-p" flags specify the username and password. Basically, you have three options: 1) If you hardcoded both username and password into check_mysqld.pl, you could simply remove "-u $ARG1$ -p $ARG2$" from the command_line definition. 2) If you'd like to specify them within the service definition, see http://nagios.sf.net/docs/2_0/macros.html on how check_command arguments are specified. 3) Another option would be to put them into your resource_file and reference them using the $USERn$ macros: http://nagios.sf.net/docs/2_0/configmain.html#resource_file > The services section shows MYSQLD is critical. If this doesn't solve your problem, please also post the plugin output. Holger ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Nagiosplug-help mailing list Nagiosplug-help@... https://lists.sourceforge.net/lists/listinfo/nagiosplug-help ::: Please include plugins version (-v) and OS when reporting any issue. ::: Messages without supporting info will risk being sent to /dev/null |
|
|