Commit graph

68 commits

Author SHA1 Message Date
Robin Sonefors
2bc4cc99d2 check_mysql: Allow sockets to be specified to -H
The help text says that -H accepts a "unix socket (must be an absolute
path)". Now that actually corresponds to reality.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
2019-03-21 13:54:19 +01:00
Sven Nierlein
edca257e20 use unknown exit code for help/version in plugins
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2015-10-04 19:24:30 +02:00
Jan Wagner
2e8d440e73 check_mysql: ignore authentication failure
This patch allows checking if MySQL server is running without providing valid
username and password. Similar to check_ssh plugin it returns MySQL server
version string and protocol number.

Example:
check_mysql -n -H aaa.bbb.ccc.ddd
MySQL OK - Version: 5.0.51a-24+lenny5 (protocol 10)

This is useful for monitoring servers where one does not have administrator
privileges or does not want to grant any privileges for the monitoring station.

To enable this functionality new option --ignore-auth (-n) is added to
check_mysql plugin.

Thanks to Julius Kriukas

Closes #1020
Closes #1178
2014-07-28 22:13:02 +02:00
awiddersheim
70314c62fc Fix check_mysql.c client options from file
If you don't specify a group or a file to read data from the plugin tries to read from several files that don't exist and no groups.
2014-04-03 23:41:37 +06:00
Holger Weiss
c3e756a855 Capitalize "Monitoring" when it's the first word 2014-01-20 03:12:50 +01:00
Monitoring Plugins Development Team
63734f52ab Project rename initial commit.
This is an initial take at renaming the project to Monitoring Plugins.
It's not expected to be fully complete, and it is expected to break
things (The perl module for instance). More testing will be required
before this goes mainline.
2014-01-19 14:18:47 -05:00
Holger Weiss
b5ac0d16b2 check_mysql: Don't accept new positional arguments
Do not also accept the new -f/--file and -g/--group options as
positional arguments (especially not prior to "db_pass" and "db", as
that would break backward compatibility).
2013-08-18 22:30:30 +02:00
Holger Weiss
779b91e48f check_mysql: Use xasprintf instead of asprintf 2013-08-18 22:29:31 +02:00
Holger Weiss
584555098d check_mysql: Fix copy'n'pasted comments 2013-08-18 22:28:18 +02:00
Holger Weiss
14bc7af323 Merge branch 'master' of https://github.com/jonmilby/nagios-plugins
* 'master' of https://github.com/jonmilby/nagios-plugins:
  Updated check_mysql.c to take client options file and group parameters

Conflicts:
	plugins/check_mysql.c
2013-08-18 22:25:08 +02:00
Tim Laszlo
b2568b85af check_mysql: Connections should have been defined as a counter 2013-08-18 18:38:10 +02:00
Tim Laszlo
7bbd155a72 Counter increments were incorrect; remove the leading space from perfdata 2013-08-18 18:38:10 +02:00
Tim Laszlo
c8d8b58447 check_mysql: add perfromance metrics for all checks 2013-08-18 18:38:10 +02:00
Tim Laszlo
1627cdb46a check_mysql: when checking slave thread add performance data for seconds behind master 2013-08-18 18:38:10 +02:00
Holger Weiss
36c2e50837 check_mysql: Cosmetic changes to SSL support
Use (slightly) more intuitive option names etc.
2013-08-18 01:47:32 +02:00
Juan Carlos Fernandez
8e66a58d41 Added ssl support to check_myslq 2013-08-18 01:28:13 +02:00
Daniël van Eeden
e396a54274 Apply my patch from:
http://sourceforge.net/tracker/index.php?func=detail&aid=3269273&group_id=29880&atid=397597
2013-01-24 08:56:19 +01:00
Jonathan Milby
5ed7194c7e Updated check_mysql.c to take client options file and group parameters 2012-12-28 12:40:23 -05:00
Anders Kaseorg
028d50d6f9 Die when asprintf fails
Fixes many instances of
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-06-29 13:39:11 +02:00
Thomas Guyot-Sionnest
eaf3cb27f4 Add newline after "Usage:" in --help 2010-04-22 08:57:14 -04:00
Thomas Guyot-Sionnest
884aee0667 Standardize the extra-opts notes 2010-04-21 23:29:18 -04:00
Thomas Guyot-Sionnest
25d1ee331d Fix translations when extra-opts aren't enabled
Bug #2832884 reported problem with translations outputting pot file
headers. This is caused by "" matching the header of the translation
files.

This patch moves gettext macros inside utils macros and update some
french translations.
2010-04-14 08:33:06 -04:00
Thomas Guyot-Sionnest
917fcc7c30 Fix check_mysql* not using password set in my.cnf (#2531905 - Ben Timby) 2009-05-20 00:20:11 -04:00
Thomas Guyot-Sionnest
ab3ada9aac check_mysql: Fix segfault with old slaves (#2696823 - Oskar Ahner) 2009-03-24 02:01:48 -04:00
Ton Voon
5324544855 Typo fixes (Jan Wagner - SF 1878971) 2009-02-20 00:00:13 +00:00
Thomas Guyot-Sionnest
6fbd14fea5 Removing CVS/SVN tags and replacing with git-based versioning
For contrib/, full tags have been imported from subversion


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2091 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-23 05:38:47 +00:00
Thomas Guyot-Sionnest
caa8bd6423 Bulk EOL cleanup
$ git diff --ignore-space-change|diffstat
 0 files changed


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2087 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-19 06:45:18 +00:00
Thomas Guyot-Sionnest
dfca15116c Fix assignment written as a comparison in validate_arguments() when db_pass is NULL (Patch from http://blog.barfoo.org/projects/rpms-for-sles10)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2034 f882894a-f735-0410-b71e-b25c423dba1c
2008-08-16 04:47:32 +00:00
Thomas Guyot-Sionnest
44f8455b2c Added support for --extra-opts in all C plugins (disabled by default, see configure --help)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1991 f882894a-f735-0410-b71e-b25c423dba1c
2008-05-07 10:02:42 +00:00
Thomas Guyot-Sionnest
aca1e6a6ce Add socket support to check_mysql*
Also clears the password from check_mysql command-line options


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1988 f882894a-f735-0410-b71e-b25c423dba1c
2008-04-30 12:50:52 +00:00
Thomas Guyot-Sionnest
ed62784a0b --help output cleanup (plus removal of spaces on blank lines)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1984 f882894a-f735-0410-b71e-b25c423dba1c
2008-04-27 14:35:26 +00:00
Thomas Guyot-Sionnest
fa4efcdf6d Bump plugins/ to GPLv3 (check_apt to check_nwstat)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1916 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-30 10:53:47 +00:00
Thomas Guyot-Sionnest
2af978187c Plenty of french translations (and a few fixes BTW)
- No more fuzzy french translations
 - Only (!) 355 strings to translate


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1859 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-10 07:52:00 +00:00
Holger Weiss
b809d23c81 Fix argument processing (Felix Frank - 1690697)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1655 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-29 17:58:28 +00:00
Holger Weiss
fd329a1e91 Don't try to print `optarg' (which will be a NULL pointer) if an unknown
command line option was used, as this leads to a segfault on some
systems.  The unknown option will be printed by getopt(3) anyway.  So,
simply call print_usage() and exit UNKNOWN via the new usage5() instead.


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1590 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-28 21:46:41 +00:00
Benoit Mortier
082cfc29e3 first pass at cleaning localization for new release
first pass at making all the headre be the same licence, plugin, etc...


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1499 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-19 00:25:16 +00:00
Ton Voon
548083b2ea Move new util_* functions to lib/
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1451 f882894a-f735-0410-b71e-b25c423dba1c
2006-07-13 12:50:23 +00:00
Benoit Mortier
e5324624ca cleaning help and usage
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1432 f882894a-f735-0410-b71e-b25c423dba1c
2006-06-15 12:52:25 +00:00
Ton Voon
2db2f402a3 mysql detection cleanup: fixes runtime linking, autodetection of main
locations, detection of lib64 and different layouts


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1327 f882894a-f735-0410-b71e-b25c423dba1c
2006-03-17 14:07:34 +00:00
Ton Voon
1c229b2c45 Alert on amount of time a slave is behind (Steven Kreuzer)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1324 f882894a-f735-0410-b71e-b25c423dba1c
2006-03-15 19:54:32 +00:00
Ton Voon
71ce143ab1 Display errors with slave queries correctly. Added extra tests for slaves
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1299 f882894a-f735-0410-b71e-b25c423dba1c
2005-12-15 17:06:55 +00:00
M. Sean Finney
f1cef328a6 check mysql now reads [client] defaults from my.cnf (debian bug #278817)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1244 f882894a-f735-0410-b71e-b25c423dba1c
2005-10-13 09:55:31 +00:00
M. Sean Finney
43ab308923 fix for check_msyql so that it doesn't use column numbers but the
names instead for determining slave status.  thanks to james kingston.


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1185 f882894a-f735-0410-b71e-b25c423dba1c
2005-05-26 02:13:19 +00:00
Matthew Kent
8f81329864 Replication check support for 4.1.x from Gerrit Beine
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1154 f882894a-f735-0410-b71e-b25c423dba1c
2005-03-18 03:14:03 +00:00
Benoit Mortier
e9ccc6b21a various fixes for localization
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1061 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-25 23:17:46 +00:00
Benoit Mortier
30a4266a3a reverting my changes from !=TRUE to == ERROR, that's not good ;-( sorry
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@998 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03 23:55:29 +00:00
Benoit Mortier
edf60f6dce remove UT_HLP_VRS from print_usage
this was not a good idea ;-)


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@994 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03 20:28:53 +00:00
Benoit Mortier
fa002886e3 internationalization fixes and help fixes
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@989 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03 11:45:10 +00:00
Benoit Mortier
016d33230e bump copyright year
initialize result to STATE_UNKNOW in place of STATE_OK


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@982 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03 00:55:28 +00:00
Benoit Mortier
234481163f More internationalization work
new usage4 function to permit localisation of think like check_ssh: xxxxx


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@979 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-02 16:51:25 +00:00