Commit graph

161 commits

Author SHA1 Message Date
Holger Weiss
4eab02cdaf Merge branch 'master' of https://github.com/rafaeldriutti/nagios-plugins
* 'master' of https://github.com/rafaeldriutti/nagios-plugins:
  Changed the smbclient command used to fetch the free space available on the samba shares. Using du instead of ls, since it's much faster, specially with shares that have a lot of files.

Closes #63.
2013-08-20 16:50:52 +02:00
Rafael
febe7b7075 Changed the smbclient command used to fetch the free space available on the samba shares. Using du instead of ls, since it's much faster, specially with shares that have a lot of files. 2013-08-12 15:52:22 -03:00
Gabriele Tozzi
774647f60c Made verbose output of check_sensors compilant 2013-05-19 04:24:21 +02:00
Brian De Wolf
b57dc1b3a0 Add option to perform real login in check_oracle
The Oracle plugin has no option for testing for a successful login.  The
closest option to this is --login, which uses a fixed set of credentials and
expects to receive the logon failure error code.

This patch adds an option called --connect.  This option takes a full SID and
returns success if it doesn't detect any error codes.  With this, we can check
that a database is allowing logins from valid credentials (and avoid filling up
DB logs with failed authentications).
2013-03-25 23:25:08 +01:00
Marc Huffnagle
0656a0e284 Added additional documentation to the check_range function 2012-10-09 09:54:03 +02:00
Holger Weiss
d61a3056c5 check_disk_smb: Add performance data
(Debian #654259 - Charles-Henri Larose)
2012-06-23 10:22:08 +02:00
Holger Weiss
804e7d878c Mention the check_range function in NEWS, etc. 2012-05-29 14:27:58 +02:00
Alex Griffin
aab6b8a16c Added check_range shell function to utils.sh.in 2012-05-29 14:07:37 +02:00
Holger Weiss
5532dbe48a check_sensors: Use symbolic exit codes
Specify the exit codes by using the constants from utils.sh.
2011-09-07 14:04:01 +02:00
Holger Weiss
f720f4a3c0 check_sensors: Minor whitespace fixes 2011-09-07 13:57:38 +02:00
Holger Weiss
276c5b98bf check_sensors: Detect FAULT status
Return an UNKNOWN status if a faulty sensor is detected.  This can be
suppressed with the new "--ignore-fault" option.

(Fixes Debian bug #615133, patch suggested by Jan Wagner.)
2011-09-07 13:55:53 +02:00
Matthias Eble
9faccbb261 add test cases for check_disk_smb 2010-11-28 22:08:54 +01:00
Matthias Eble
3c67c9cb60 check_disk_smb now handles NT_STATUS_ACCESS_DENIED properly (Debian #601696) 2010-11-28 21:43:48 +01:00
Matthias Eble
0892c4ac28 Make check_disk_smb accept spaces in share names (#990948, #1370031, Debian #601699) 2010-11-28 21:35:59 +01:00
Ton Voon
0205c7c0cf Allow check_ifstatus to accept version=2c 2010-07-07 09:56:21 +01:00
Holger Weiss
7a661c7aed Fix Debian bug #545940: Failure when run via ePN
If Perl's "shift" function is called outside of a subroutine and without
any argument, it usually shifts @ARGV.  However, if a plugin is executed
via ePN, such a call will shift @_ instead, so we must explicitly
specify @ARGV for this to work as expected.

This fixes Debian bug #545940, see: http://bugs.debian.org/545940

Commit de7191e342 fixed the same issue for
check_disk_smb.

(Reported by Hendrik Jaeger, forwarded by Jan Wagner.)
2010-04-12 15:36:33 +02:00
Holger Weiss
614e9dec5e Fix Debian bug #478942: Fragile argument passing
Fix some problems regarding the way check_disk_smb passes command line
arguments to smbclient(1).

| It runs:
|
| 	$res = qx/$smbclient "\/\/$host\/$share" $pass -W $workgroup \
| 	       -U $user $smbclientoptions -I $address -c ls/;
|
| [...]
|
| The documentation says that if the password is not passed, it
| defaults to "".  That is not true above, as $pass expands to
| nothing which leaves no argument at all (instead of an empty
| argument) so is different from providing with an empty password
| or with the -N option.
|
| Also, if the password starts with "-", you're in trouble, that's
| why -U $user%$pass may be prefered.
|
| Also, the doc says that if $user is not provided, then it
| defaults to "guest" but the problem is that if it is provided
| but empty, it is changed to "guest" as well, which prevents us
| from querying hosts that don't do user authentication.

[ http://bugs.debian.org/478942 ]

(Fixed by Stephane Chazelas, forwarded by Jan Wagner.)
2010-04-11 10:54:44 +02:00
Holger Weiss
de7191e342 Fix Debian bug #478906: Failure when run via ePN
| When perl plugin scripts are run with the embedded perl interpreter in
| nagios3, the "shift" perl command doesn't shift @ARGV, but @_ (which
| happens to contain the same thing as @ARGV at the time the script was
| started).
|
| [...]
|
| A fix is to replace all the instances of "shift" with "shift @ARGV".

[ http://bugs.debian.org/478906 ]

(Fixed by Stephane Chazelas, forwarded by Jan Wagner.)
2010-04-11 09:54:10 +02:00
Holger Weiss
e461341003 Fix Debian bug #425129: SMB guest mode won't work
| The check_disk_smb plugin purports to support guest users, but it
| doesn't work out, because it doesn't specify the -N command line
| option to smbclient when no password is specified, making smbclient
| stop and ask.

[ http://bugs.debian.org/425129 ]

(Fixed by Josip Rodin, forwarded by Jan Wagner.)
2010-04-11 09:39:24 +02:00
Holger Weiss
5a1babdae8 check_disk_smb: Allow for specifying an IP address
Add the "-a, --address option" which allows for specifying the IP
address of the server to connect to.  If this option is used, the IP
address will be handed over to smbclient(1)'s "-I" option.  (Contributed
by Sean Finney, forwarded by Jan Wagner.)
2010-04-11 01:57:11 +02:00
nagiosplugins
43c187a944 Allow custom versions with the release file... 2009-09-25 09:31:04 +00:00
Thomas Guyot-Sionnest
bc3c8c7cfb Fix check_ircd binding to wrong interface (#668778) 2009-09-19 02:08:51 -04:00
Matthias Eble
38e20a1a33 Fixed testcases for check_snmp, check_ifstatus and check_ifoperstatus when no snmp community is specified
The checks for invalid/unavailable hosts need a complete command line.
They failed on hosts where no community was specified. Now, an invalid community is used so
the tests can run on hosts w/o snmp host/community in NPTest.cache. Execution will fail anyway.
2009-06-13 18:13:49 +02:00
Matthias Eble
05b801284c Further test parameters and skip blocks for check_ifoperstatus.t. getTestparam changes for check_ifstatus.t and ifoperstatus.t
Added snmp_interface and snmp_ifxtable test parameters to check_ifoperstatus.t.
Also getTestParameter calls for both plugins were converted to use three arguments
instead of undocumented >3 arg behaviour which led to redundant data in NPTest.cache.
2009-06-13 11:10:32 +02:00
Matthias Eble
c66d2c6b3b renamed check_ifoperstatus' newly introdced -x to -P so it fits check_ifstatus
check_ifstatus already used -x so both plugins can use same short option, now.
to specify privacy protocol.
2009-06-11 17:24:52 +02:00
Matthias Eble
edda2536e5 Fixed SNMPv3 behaviour of check_ifstatus. Added -P to define privprotocol (#2343438 - Robin Schroeder)
check_ifstatus didn't function correctly with SNMPv3. This is fixed now.
Created argument-hash for SNMP session creation. This removes redundant code.
Session creation was moved out of process_arguments() and now takes place
after setting the timeout handler.

Additionally the -P argument was added to specify the privprotocol.
2009-06-11 17:20:55 +02:00
Matthias Eble
e16b35b2ca Added testcases for check_ifoperstatus
Added testcases for check_ifoperstatus. No SNMPv3 testing
included for now.
2009-06-11 16:27:15 +02:00
Matthias Eble
0f8ef1f780 minor fixes to check_ifoperstatus
Minor output fixes for check_ifoperstatus.
Fixed typo so that -n now implies -I as documented.
2009-06-11 16:22:47 +02:00
Matthias Eble
8b8a30716a check_ifoperstatus is now more user friendly in case of missing arguments
Added proper usage messages in case of missing arguments.
Removed accidently committed Data::Dumper call.
Minor whitespace fixes.
2009-06-11 02:29:13 +02:00
Matthias Eble
08deb74704 Whitespace and indent fixes for check_ifoperstatus 2009-06-11 01:34:39 +02:00
Matthias Eble
5195074095 Fixed SNMPv3 behaviour of check_ifoperstatus. Added -x to define privprotocol (#2343438 - Robin Schroeder)
check_ifoperstatus didn't function correctly with SNMPv3. This is fixed now.
Created argument-hash for SNMP session creation. This removes redundant code.
Session creation was moved out of process_arguments() and now takes place
after setting the timeout handler.

Additionally the -x argument was added to specify the privprotocol.
2009-06-11 01:17:58 +02:00
Thomas Guyot-Sionnest
56cf66c9b8 Fix awk subst.in/subst script path error (#2722832 - Martin Foster) 2009-05-20 00:43:10 -04:00
Ton Voon
5324544855 Typo fixes (Jan Wagner - SF 1878971) 2009-02-20 00:00:13 +00:00
Thomas Guyot-Sionnest
399f0770b2 Fixing build breakages (I totally forgot this rule was there...) 2008-11-26 21:29:40 -05:00
Thomas Guyot-Sionnest
9bcfa9cded Disable dynamic versionning for releases, and allow generating version out of subversion.
This should be a definitive fix for systems with non-compilant make programs as the version will be taken from $(PACKAGE_VERSION) instead.

At the same time I added code for generating svn-based version strings.
2008-11-26 05:42:48 -05:00
Thomas Guyot-Sionnest
ed9a088b37 Workaround to support more make programs
Avoid the use of "-include". Since "include" is interpreted by Automake, we have to use a special macro instead.
2008-11-25 08:50:35 -05:00
Thomas Guyot-Sionnest
0c34b75b05 Exporting ENV vars from Makefile is supported only with GNU Make. Use the shell instead. 2008-11-25 00:28:51 -05:00
Thomas Guyot-Sionnest
c0a75482b4 Avoid the use of .PHONY (target s created twice and I have no idea if it's right). 2008-11-23 13:34:19 -05: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
Matthias Eble
96d6281428 check_ifoperstatus -n flag now works as expected (sf.net #1569488)
check_ifoperstatus now supports ifType based lookup for ifIndex


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2061 f882894a-f735-0410-b71e-b25c423dba1c
2008-10-22 21:35:15 +00:00
Ton Voon
151531173b Run tinderbox builds in a test debug mode using "make test-debug"
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1866 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-12 01:27:48 +00:00
Ton Voon
37287823f0 Removing all .cvsignore files
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1761 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-24 00:35:42 +00:00
Matthias Eble
2208c1b7f3 Changed print_revision output order in utils.pm
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1751 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-07 11:55:48 +00:00
Matthias Eble
603de749ba substituted $ID$ through $Revision$ in print_revision call
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1750 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-07 11:54:29 +00:00
Matthias Eble
a10569f139 Changed order in -V/--version output
Fixed -V output for check_log and check_oracle


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1749 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-07 11:40:29 +00:00
Matthias Eble
1baf11d3af check_oracle does not need a valid ORACLE_HOME if called with --db. Thanks to Jason Martin (#1505551)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1719 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-27 14:49:54 +00:00
Gavin Carr
8d0e8a652f Fix bogus 'eq ( || )' constructions in check_ifoperstatus.pl.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1642 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-16 12:11:46 +00:00
Thomas Guyot-Sionnest
026db39bb7 Fix bug #1593073 Check_Log problem with log rotation
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1602 f882894a-f735-0410-b71e-b25c423dba1c
2007-02-01 05:33:07 +00:00
Ton Voon
287cd311a2 Enhanced test for single letters in fqdn
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1549 f882894a-f735-0410-b71e-b25c423dba1c
2006-12-12 12:59:06 +00:00
Ton Voon
fc6caed01c Allow single characters in fqdn (Dave Alden)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1548 f882894a-f735-0410-b71e-b25c423dba1c
2006-12-12 08:56:01 +00:00