Re: [Nagios-users] check_mysql
On Mon, May 28, 2012 at 2:19 PM, Alexey Terentiev alex...@tehila.gov.ilwrote: Hi! ** ** I am trying to install the nagios plugins with check-mysql parameter, but its keep failing. Show error message please. Usually it already tells you what is missing. It seems that all the librarys needed for the check_msql are installed on the server. ** ** But just to make sure, can you send me the names of the libs required? Depends on your OS/distro. On Debian you will have to install libmysqlclient-dev. And also when I use the “with-mysql=…” where should I point it? ** ** Sincerely yours, Alexey Terentiev ** ** ** ** ** ** ** ** -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Nagios-users mailing list Nagios-users@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 -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] check_mysql
On 28/05/2012 13:19, Alexey Terentiev wrote: Hi! I am trying to install the nagios plugins with check-mysql parameter, but its keep failing. It seems that all the librarys needed for the check_msql are installed on the server. But just to make sure, can you send me the names of the libs required? And also when I use the with-mysql=... where should I point it? Sincerely yours, Alexey Terentiev On Centos / RedHat you're going to be looking for something like: [root@mgmt1 ~]# locate libmysql /usr/lib64/mysql/libmysqlclient.so /usr/lib64/mysql/libmysqlclient.so.16 /usr/lib64/mysql/libmysqlclient.so.16.0.0 /usr/lib64/mysql/libmysqlclient_r.so /usr/lib64/mysql/libmysqlclient_r.so.16 /usr/lib64/mysql/libmysqlclient_r.so.16.0.0 [root@mgmt1 ~]# -- Regards, Giles Coochey, CCNA, CCNAS NetSecSpec Ltd +44 (0) 7983 877438 http://www.coochey.net http://www.netsecspec.co.uk gi...@coochey.net smime.p7s Description: S/MIME Cryptographic Signature -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] check_mysql and check_pgsql plugins install on RHEL 5.3
On Aug 17, 2009, at 11:27 PM, Chris wrote: I need check_mysql and check_pgsql; I have downloaded the plugin tgz from http://nagios.org/download/plugins and I can see the .c files for Postgres and MySQL. but when I compile with ./configure --prefix=/plugin --with-mysql=/usr/ make make install I don't get any mysql binary. See the REQUIREMENTS file and the output of ./configure. Do you have the -dev(el) packages installed? -- Marc -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] check_mysql
- jeremiah [EMAIL PROTECTED] wrote: I want nagios to automatically check mysql services on my servers. However when i view the web interface i see that staus is UNKNOWN and it displays the usage for check_mysql. In what file am i supposed to put the arguments for this command? define service{ use generic-service ; Name of service template hostgroup_name mysql_servers service_description MYSQL is_volatile 0 check_period24x7 max_check_attempts 3 normal_check_interval 3 retry_check_interval1 contact_groups admins notification_interval 30 notification_period 24x7 notification_optionsw,u,c,r check_command check_mysql Change your check_command directive to check_mysql!ARG1!ARG2!ARG3, where ARG1 is the $ARG1$ value of your check command from commands.cfg and so... -rm - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] check_mysql
On Oct 15, 2008, at 2:00 PM, jeremiah wrote: I want nagios to automatically check mysql services on my servers. However when i view the web interface i see that staus is UNKNOWN and it displays the usage for check_mysql. In what file am i supposed to put the arguments for this command? Based on your command{} definition, they should be in your service definition. Here is what i have so far in commands.cfg define command{ command_namecheck_mysql command_line$USER1$/check_mysql -H $HOSTADDRESS$ -P $ARG1$ -u $ARG2$ -p $ARG3$ } and my services.cf file... define service{ [chop] check_command check_mysql } check_command should be something like -- check_command check_mysql!arguments for -P!arguments for -u! arguments for -p See the last half of the Macro Substitution section of http://nagios.sourceforge.net/docs/2_0/macros.html -- Marc - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] check_mysql
On Oct 15, 2008, at 11:00 AM, jeremiah wrote: I want nagios to automatically check mysql services on my servers. However when i view the web interface i see that staus is UNKNOWN and it displays the usage for check_mysql. In what file am i supposed to put the arguments for this command? The arguments go in your service definition on the check_command line, separated from each other and the command name by !. So in your case, you would have a check_command line something like: check_command check_mysql!arg1!arg2!arg3 where arg1 arg2 and arg3 are respectively whatever you need for the -P, -u and -p switches to check_mysql. --- Israel Brewster Computer Support Technician Frontier Flying Service Inc. 5245 Airport Industrial Rd Fairbanks, AK 99709 (907) 450-7250 x293 --- Here is what i have so far in commands.cfg define command{ command_namecheck_mysql command_line$USER1$/check_mysql -H $HOSTADDRESS$ -P $ARG1$ -u $ARG2$ -p $ARG3$ } and my services.cf file... define service{ use generic-service ; Name of service template hostgroup_name mysql_servers service_description MYSQL is_volatile 0 check_period24x7 max_check_attempts 3 normal_check_interval 3 retry_check_interval1 contact_groups admins notification_interval 30 notification_period 24x7 notification_optionsw,u,c,r check_command check_mysql } Thanks! Disclaimer: The information contained in this transmission, including any attachments, may contain confidential information of Panasonic Avionics Corporation. This transmission is intended only for the use of the addressee(s) listed above. Unauthorized review, dissemination or other use of the information contained in this transmission is strictly prohibited. If you have received this transmission in error or have reason to believe you are not authorized to receive it, please notify the sender by return email and promptly delete the transmission. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Nagios-users mailing list Nagios-users@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 - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] check_mysql plugin ... unable to install
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Agnello George wrote: hi I was searching for mysql plugin to monitor mysql services ... i did find the appropriate plugin ( nagios-plugins-1.4.12.tar.gz ) with the following command ./configure --prefix=/usr/local/nagios make make install only few pligins were added to /usr/local/nagios/libexec/ directory. The Check_mysql plugin was not added to this dir. Can any one tell me where i have gone wrong !! I guess by not reading the output these steps created. I am sure there will be notices why something is not build. The most common mistakes: - No development environment - No MySQL development environment I suggest you check those and install them the normal way you install software on your distribution where needed. If that does not work AND doing a search on the archives of this mailinglist did not provide in working clues then send relevant error/warning information, details about your system, to the mailinglist. Hugo. - -- [EMAIL PROTECTED] http://hugo.vanderkooij.org/ PGP/GPG? Use: http://hugo.vanderkooij.org/0x58F19981.asc A: Yes. Q: Are you sure? A: Because it reverses the logical flow of conversation. Q: Why is top posting frowned upon? Bored? Click on http://spamornot.org/ and rate those images. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFIuPDqBvzDRVjxmYERApy0AJwPQpJWxNixvdrGZDBgnh5wR/UgcgCfW5Hq FtBOLejO8qGaRwB0stxyagA= =6D3s -END PGP SIGNATURE- - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/ ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] check_mysql plugin ... unable to install
On 8/30/08, Hugo van der Kooij [EMAIL PROTECTED] wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Agnello George wrote: hi I was searching for mysql plugin to monitor mysql services ... i did find the appropriate plugin ( nagios-plugins-1.4.12.tar.gz ) with the following command ./configure --prefix=/usr/local/nagios make make install only few pligins were added to /usr/local/nagios/libexec/ directory. The Check_mysql plugin was not added to this dir. Can any one tell me where i have gone wrong !! I guess by not reading the output these steps created. I am sure there will be notices why something is not build. The most common mistakes: - No development environment - No MySQL development environment HI Thanks a lot i didnt have mysql-devel in my system . i installed it and the re-ran the ./configure command ... and now the check_mysql plugin is installed in the right place . Thanks again. -- Regards Agnello D'souza www.linux-vashi.blogspot.com www.bible-study-india.blogspot.com - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] check_mysql not using ~nagios/.my.cnf on RHEL 4 withNagios 2.10 (Dag repository RPM)
Hi, I don't know of any way to get the plugin to see/use the /etc/my.cnf. You could always just give your nagios mysql user very limited rights - connection allowed only from your nagios host, status query rights etc, etc, then use /usr/local/nagios/etc/resource.cfg to hide the password in $USER3$ or $USER4$ (or whatever you wanna call it!) Ie: # resource.cfg $USER4$=somemysqlpassword Then you could just use: check_mysql -u nagios -p $USER4$ -H mysql.domain.com in your service checks/commands.cfg, and at least the pass will not show in nagios web/config view... Regards, Jamie From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Goltz, Jim (NIH/NLM/LHC) [C] Sent: Tuesday, February 12, 2008 3:24 PM To: nagios-users@lists.sourceforge.net Subject: [Nagios-users] check_mysql not using ~nagios/.my.cnf on RHEL 4 withNagios 2.10 (Dag repository RPM) I'm running Nagios 2.10 quite successfully on Red Hat Enterprise Linux 4. However, I can't seem to get check_mysql to use the proper configuration files. From the command line everything works fine. It reads the [client] section of ~nagios/.my.cnf for the needed password. However, it doesn't seem to be using this config file when the plugin is run from Nagios itself. I could put the credentials into /etc/my.cnf, but I really don't want to make them system-wide if I don't have to. What's the proper way to get the plugins to look in ~nagios/.my.cnf for MySQL config info? -- Jim Goltz [EMAIL PROTECTED] Contractor, Lockheed Martin National Library of Medicine - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] check_mysql not using ~nagios/.my.cnf on RHEL 4 withNagios 2.10 (Dag repository RPM)
Sorry for the HTML last time. I'm running Nagios 2.10 quite successfully on Red Hat Enterprise Linux 4. However, I can't seem to get check_mysql to use the proper configuration files. Some more info: I managed to run check_mysql from a shell script that actually runs the plugin under strace, which records every system call. From the command line, check_mysql (via the MySQL library routines) looks for /etc/my.cnf, /var/lib/mysql/my.cnf, and /home/jgoltz/.my.cnf, as it should. However, the plugin as run by Nagios looks for /etc/my.cnf, /var/lib/mysql/my.cnf, and ~/.my.cnf -- in other words, it treats ~ as a literal file name instead of expanding it to the home directory of user nagios. I'm not sure what to make of that yet, but it seemed worth mentioning. -- Jim Goltz [EMAIL PROTECTED] Contractor, Lockheed Martin National Library of Medicine - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] check_mysql not using ~nagios/.my.cnf on RHEL 4withNagios 2.10 (Dag repository RPM)
I'm running Nagios 2.10 quite successfully on Red Hat Enterprise Linux 4. However, I can't seem to get check_mysql to use the proper configuration files. Problem resolved. Apparently Nagios does not define the environment variable HOME for its plugins, so ~ does not get expanded to the home directory for user nagios. I changed the command definition for check_mysql: was:$USER1$/check_mysql -H $HOSTADDRESS$ now:env HOME=/var/log/nagios $USER1$/check_mysql -H $HOSTADDRESS$ The plugin is able to connect successfully now. -- Jim Goltz [EMAIL PROTECTED] Contractor, Lockheed Martin National Library of Medicine - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] check_mysql -S isn't working
alexus wrote: # ./check_mysql -H 10.52.208.99 http://10.52.208.99 -u -p x -S Slave IO: Yes Slave SQL: No Seconds Behind Master: (null) # how come I get null in No Seconds Behind Master? anyone? Read it as Slave IO: Yes Slave SQL: No Seconds Behind Master: (null) Your replication does not seem to work. Try a slave stop ; slave start ; show slave status ; on your mysql console. Regards, Peter - 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/ ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] check_mysql -S isn't working {Disarmed} {Fraud?}
-Original Message- From: [EMAIL PROTECTED] [mailto:nagios-users- [EMAIL PROTECTED] On Behalf Of alexus Sent: Thursday, August 02, 2007 2:24 PM To: Nagios-users@lists.sourceforge.net Subject: [Nagios-users] check_mysql -S isn't working {Disarmed} {Fraud?} # ./check_mysql -H 10.52.208.9910. http://10.52.208.99 -u -p x -S Slave IO: Yes Slave SQL: No Seconds Behind Master: (null) # how come I get null in No Seconds Behind Master? anyone? Ok. I'll bite on the second time around... My GUESS- The Seconds_Behind_Master column of the of the mysql command 'show slave status' has the value 'null' or is empty. Connect to mysql, issue the 'show slave status;' command and verify if that's the case. Alternately, the version of mysql that you are using, whatever it is, changed that column such that the plugin can no longer parse it. Alternately, the slave is broken in some way. -- Marc - 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/ ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] check_mysql -S isn't working {Disarmed} {Fraud?}
ok, 'Seconds Behind Master' does have value of null, but where and what do i need to set, in order for it to function properly? i'm using mysql-5.0.45 On 8/2/07, Marc Powell [EMAIL PROTECTED] wrote: -Original Message- From: [EMAIL PROTECTED] [mailto:nagios-users- [EMAIL PROTECTED] On Behalf Of alexus Sent: Thursday, August 02, 2007 2:24 PM To: Nagios-users@lists.sourceforge.net Subject: [Nagios-users] check_mysql -S isn't working {Disarmed} {Fraud?} # ./check_mysql -H 10.52.208.9910. http://10.52.208.99 -u -p x -S Slave IO: Yes Slave SQL: No Seconds Behind Master: (null) # how come I get null in No Seconds Behind Master? anyone? Ok. I'll bite on the second time around... My GUESS- The Seconds_Behind_Master column of the of the mysql command 'show slave status' has the value 'null' or is empty. Connect to mysql, issue the 'show slave status;' command and verify if that's the case. Alternately, the version of mysql that you are using, whatever it is, changed that column such that the plugin can no longer parse it. Alternately, the slave is broken in some way. -- Marc - 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/ ___ Nagios-users mailing list Nagios-users@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 -- http://alexus.org/ - 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/___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] check_mysql -S isn't working
my replication does work... On 8/2/07, Peter Hinse [EMAIL PROTECTED] wrote: alexus wrote: # ./check_mysql -H 10.52.208.99 http://10.52.208.99 -u -p x -S Slave IO: Yes Slave SQL: No Seconds Behind Master: (null) # how come I get null in No Seconds Behind Master? anyone? Read it as Slave IO: Yes Slave SQL: No Seconds Behind Master: (null) Your replication does not seem to work. Try a slave stop ; slave start ; show slave status ; on your mysql console. Regards, Peter -- http://alexus.org/ - 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/___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] check_mysql -S isn't working
-Original Message- From: alexus [mailto:[EMAIL PROTECTED] Sent: Thursday, August 02, 2007 3:01 PM To: Marc Powell Cc: Nagios-users@lists.sourceforge.net Subject: Re: [Nagios-users] check_mysql -S isn't working {Disarmed} {Fraud?} {Disarmed} {Fraud?} ok, 'Seconds Behind Master' does have value of null, but where and what do i need to set, in order for it to function properly? i'm using mysql-5.0.45 No clue here. The mysql-users support group will probably get you a faster, more accurate answer since it's outside the realm of nagios. -- Marc - 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/ ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] check_mysql - Queries per second avg: Time Frame
-Original Message- From: [EMAIL PROTECTED] [mailto:nagios-users- [EMAIL PROTECTED] On Behalf Of Eric Hernandez Sent: Thursday, July 05, 2007 11:15 AM To: nagios-users@lists.sourceforge.net Subject: [Nagios-users] check_mysql - Queries per second avg: Time Frame Hell Nagios Group, What is the time range that check_mysql basis the Queries per second avg. Is for the last hour, day or lifetime of the server? or something else? Uptime: 77595 Threads: 20 Questions: 92715251 Slow queries: 1283 Opens: 554642 Flush tables: 1 Open tables: 64 Queries per second avg: 1194.861 It's coming directly from mysql via the 'status' command -- mysql status; -- mysql Ver ... Connection id: 581953 Current database: Current user: redacted@localhost SSL:Not in use Current pager: stdout Using outfile: '' Using delimiter:; Server version: redacted Protocol version: 10 Connection: Localhost via UNIX socket Server characterset:latin1 Db characterset:latin1 Client characterset:latin1 Conn. characterset:latin1 UNIX socket:/var/lib/mysql/mysql.sock Uptime: 197 days 12 hours 27 min 38 sec Threads: 3 Questions: 3425958608 Slow queries: 0 Opens: 0 Flush tables: 1 Open tables: 17 Queries per second avg: 452.425 While I can't quickly find a definitive reference to point to, it's my understanding that it is the average q/s since the server was last reset, in my case 197+ days. -- Marc - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] check_mysql - how to store passwords securely
On 7/2/07, Jake Solid [EMAIL PROTECTED] wrote: I use the NRPE deamon my Nagios server to monitor a remote mysql database. I have the following entry in the nrpe.cfg of my remote server that runs mysql: command[check_mysql]=/usr/lib64/nagios/plugins/check_mysql -d my_database -u root -p mypassword Why are you using your root user to test the database? All you really need to do is grant USAGE rights to test user and then not give them rights to anything else. From here, you can use your resource file to put the password in there, and with proper permissions, only root and the nagios user can read that file. -- During times of universal deceit, telling the truth becomes a revolutionary act. George Orwell - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] check_mysql plugin will not compile
Hello, On 3/20/2006 7:28 PM, Lundgren, Scott wrote: I'm getting the following error messages in config.log as I try to compile check_mysql. Can someone tell me why configure is not finding the file? I'm using: nagios-plugins-1.4.2, MySQL 4.1.15 I set: LD_OPTIONS=-R/opt/csw/lib -R/opt/csw/mysql4/lib/mysql -L/opt/csw/lib Errors I have in config.log: configure:9365: checking for mysql_init in -lmysqlclient configure:9395: cc -o conftest -g -I/opt/csw/include -L. conftest.c -lmysqlclient -L/opt/csw/lib/mysql -lz 5 ld: fatal: library -lmysqlclient: not found ld: fatal: File processing errors. No output written to conftest This looks like thy mysqlclient library is not found, so either it is not installed, it is installed in a non-standard location, or your LD path isn't complete. In other words, make sure that ld searches for the library in the correct locations, i.e. the directories in the LD_OPTIONS or the standard system library paths. Might also be that you don't have the necssary include files, in that case make sure you have installed the mysql _development_ files, but the message seems to indicate that the includes were found. Arno Thanks in Advance, Scott Lundgren ITS - Web Services UNC at Charlotte http://www.uncc.edu http://www.uncc.edu/ --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=kkid0944bid$1720dat1642 ___ Nagios-users mailing list Nagios-users@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 -- IT-Service Lehmann[EMAIL PROTECTED] Arno Lehmann http://www.its-lehmann.de --- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnkkid=110944bid=241720dat=121642 ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] check_mysql compile issue - x86_64
It's not the *best* solution but a work around to this is to manually edit the configure file before doing your ./configure as the configure file has /usr/lib hard-coded and won't figure out /usr/lib64 without some help *note* all this is from a Red Hat point of view, may require some modification for your build find MYSQLLIBDIR=$MYSQL/lib chage it to MYSQLLIBDIR=$MYSQL/lib64 hmmm mine looked a bit different but the process was similar - however it seems that now it is not happy about the version configure:9368: checking for mysql_init in -lmysqlclient configure:9398: gcc -o conftest -g -O2 -I/opt/mysql/include -L. conftest.c -lmysqlclient -L/opt/mysql/lib -lz 5 /usr/bin/ld: skipping incompatible /opt/mysql/lib/libmysqlclient.a when searching for -lmysqlclient /usr/bin/ld: cannot find -lmysqlclient | char mysql_init (); | mysql_init (); configure:9436: checking for mysql_close in -lmysqlclient configure:9466: gcc -o conftest -g -O2 -I/opt/mysql/include -L. conftest.c -lmysqlclient 5 /usr/bin/ld: cannot find -lmysqlclient | char mysql_close (); | mysql_close (); configure:10217: WARNING: Skipping mysql plugin this is on a CentOS 4.2 box (RHEL4) - it can now find the lib but any ideas on the version issue? thanks --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnkkid=103432bid=230486dat=121642 ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] check_mysql compile issue - x86_64
this is on a CentOS 4.2 box (RHEL4) - it can now find the lib but any ideas on the version issue? Slightly off topic but... Why are you building this from source? It's already been built and packaged in rpm form for use on RHEL/CentOS. I run these packages on centos regularly with no problem at all. http://dag.wieers.com/packages/nagios-plugins/ http://dag.wieers.com/packages/nagios/ If nothing else, take a look at the spec file to see how dag handles the builds for x86_64. -- They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety'' Benjamin Franklin 1775 --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnkkid3432bid#0486dat1642 ___ Nagios-users mailing list Nagios-users@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
RE: [Nagios-users] check_mysql
-Original Message- From: [EMAIL PROTECTED] [mailto:nagios-users- [EMAIL PROTECTED] On Behalf Of Rene Nelson Sent: Thursday, January 05, 2006 3:48 PM To: nagios-users@lists.sourceforge.net Subject: [Nagios-users] check_mysql I want to check this via check_by_ssh, but do not want to use the root user nor password. (not too excited about leaving it in a clear text .cfg file) Is there a way to get the same information using a read-only user with no password? Is there a best practices for Check_MySQL via check_by_ssh? check_by_ssh only allows for host-key based authentication methods, not password so one issue is already taken care of. Create a non-root user on your mysql system, configure public key authentication and restrict the command that can be run to check_mysql. http://www.networknewz.com/networknewz-10-20030707AuthenticatingbyPublic KeyOpenSSH.html seems to be a pretty good tutorial on setting up basic public key authentication. When creating the DSA key, leave the passphrase blank for passwordless authentication. Also look in the sshd manpage for information about the authorized_keys file format to restrict access from specific hosts or only allow specific programs to be run. If you find other tutorials that say the ssh-agent needs to be running then you're not looking at the right thing. -- Marc --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_idv37alloc_id865op=click ___ Nagios-users mailing list Nagios-users@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
Re: [Nagios-users] check_mysql
In message [EMAIL PROTECTED], Marc Powell writes: check_by_ssh only allows for host-key based authentication methods, not password so one issue is already taken care of. What I did was use ssh-agent to keep the decrypted password. I had hacked check_by_ssh (I no longer have access to the hacks) to allow SSH_AUTH_SOCK to be passed through. The init script for nagios started the ssh-agent, and was able to find and reuse any running ssh-agent. So multiple nagios stops and starts worked without re-entering the key. This way the public key file on disk was able to be encrypted, but the daemon could use the public key. They had 24x7 coverage and if the system crashed and restarted, it would notify the on-call person to add the nagios keys to the agent. A service was created that used ssh-add to verify the existence of the key. If the key disappeared a normal nagios alert went out. Worked quite well. You could also make all check_by_ssh services depend on the key test service and not alert if the key was missing to prevent flooding the on duty operator with messages. Since you can restrict the nagios key to allow access only from certain host and it can force a command to run that prevents running of arbitrary command we found it to be sufficiently secure. -- rouilj John Rouillard === My employers don't acknowledge my existence much less my opinions. --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click ___ Nagios-users mailing list Nagios-users@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
RE: [Nagios-users] check_mysql
We use a lot of ssh-based checks. Compiling nrpe is difficult to do on some linux-based appliances or other locked-down devices. Most of our checks are custom scripts that execute ssh-based remote commands. Though not check_mysql specific, here's some guidelines we follow: 1a) Disable root login, use an alternate restricted account if possible) PermitRootLogin = no 1b) If not possible to disable root login, disable root's password-based login PermitRootLogin = without-password 2) Disable Password-based login, use public key authentication only An intruder would have to put a physically place a file on the server to be able to login 3) Restrict the public key to certain IP's 4) Restrict the public key to certain commands (Brian Hatch has a wrapper script to call if you'd like more control) 5) Restrict the public key from port forwarding 6) Install some sort of SSH-banning script like DenyHosts (denyhosts.sourceforge.net) Sample public key we put on the remote server /home/serviceaccount/.ssh/authorized_keys: no-port-forwarding,no-X11-forwarding,no-agent-forwarding,from=1.2.3.4,comm and=/usr/local/bin/check_something ssh-dss gnm'@j=v-eEQXsAn]FA])QAOWyTzh8jC[os)pak?;Mq$QnjVsSM#7h[+SORYndjIUrpPYtKhLLq THaFYrdyxrBkOa [EMAIL PROTECTED] The worse that could happen if the private key on the nagios host was compromised is that someone could execute the remote check at their whim (possibly causing a denial of service if the remote check is resource intensive). -Original Message- From: Rene Nelson [mailto:[EMAIL PROTECTED] Sent: Thursday, January 05, 2006 1:48 PM To: nagios-users@lists.sourceforge.net Subject: [Nagios-users] check_mysql I want to check this via check_by_ssh, but do not want to use the root user nor password. (not too excited about leaving it in a clear text .cfg file) Is there a way to get the same information using a read-only user with no password? Is there a best practices for Check_MySQL via check_by_ssh? --- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637alloc_id=16865op=click ___ Nagios-users mailing list Nagios-users@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