Commit graph

909 commits

Author SHA1 Message Date
Matthias Eble
9e64dc2d7f Fixed bug: stat was called on remote fs even if -l was given
Added -L option to call stat on remote fs but without threshold comparison


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1789 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-23 10:58:09 +00:00
Matthias Eble
d1c9a5cf6a Added radiusclient-ng support for check_radius. Thanks to Sebastien Guay (#1218438)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1788 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-23 09:48:37 +00:00
Matthias Eble
bb32ecb79c substituted bool/true/false with int/TRUE/FALSE (discussed on np-devel)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1787 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-22 17:48:33 +00:00
Matthias Eble
d23b17e656 Added -i/-I to ignore pathes/partitions based on regular expressions
Added check_disk -A selecting all filesystems 
-E option must now be passed before -p or -r/-R
Passing -E after -p or -r results in UNKNOWN state
Fixed bug when mixing case sensitive and insensitive regexes


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1786 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-22 17:40:35 +00:00
Thomas Guyot-Sionnest
520f297fa9 Rewrite the "map changes to return codes" patch nearly from scratch.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1785 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-22 03:00:46 +00:00
Ton Voon
8a39526e1b Stop double expansion of parameters for negate - works like
time command now


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1784 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-21 23:01:28 +00:00
Thomas Guyot-Sionnest
7a70525129 My solaris box needs %llu to display 64bits integers.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1783 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-21 05:05:58 +00:00
Thomas Guyot-Sionnest
5ca8c84715 - Added some variables at verbose==3
- Removed support for verbose<0 (-q). -q was broken and tried to to the same as -e.
- -q in now an undocumented alias of -e (for backward-compatibility).
NB: Long help text for -d was already missing.
- Reordered the switches so that:
    a. less-important ones are in alphabetical order
    b. short and long help orders match.
- Enclosed "-p | -x" inside braces instead of brackets as one or the other is required.


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1782 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-21 04:59:15 +00:00
Holger Weiss
05a980ba4b Properly handle SMTP server responses which are split into multiple
packets (noted by Chris Adams on nagiosplug-help@).  TODO: The new
recvline()/recvlines() functions should buffer received data instead of
reading one byte at a time and they should be moved to netutils.c so
that other plugins can use them, too.


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1780 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-15 14:25:56 +00:00
Holger Weiss
da6aa00a83 Don't use C++ style comments (noted by Johannes Kingma on
nagiosplug-help@)


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1770 f882894a-f735-0410-b71e-b25c423dba1c
2007-08-09 12:32:28 +00:00
Holger Weiss
0616123167 Read the response to an SMTP QUIT command before closing the socket
(noted by Dieter Hendricks on nagiosplug-help@)


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1769 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-31 14:47:04 +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
Holger Weiss
475ee7b55a Add "Connection: close" to the HTTP request header, which tells HTTP/1.1
servers to close the connection after completion of the response.  This
should be compatible with HTTP/1.0, as HTTP/1.0 allows for custom header
fields which should be ignored if not recognized by the server.  With
some server configurations, the server would keep the connection alive
without this header line (despite the plugin requesting HTTP/1.0),
resulting in the plugin running into either the server's or it's own
timeout (reported by Roman Schliessmeyer and Jesse Morgan via IRC).


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1759 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-21 16:29:01 +00:00
Matthias Eble
d77b785d23 Make ps column count in zombie detection less restrictive. Thanks to Andrew Elwell (#1280470)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1758 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-15 15:21:51 +00:00
Matthias Eble
c134205981 Fixed segfault in argument processing. Thanks to Christoph Schell (#1742066)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1757 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-14 19:36:48 +00:00
Matthias Eble
06372d2d91 check_ntp: Fixed typo in typo in argument sanity check. Thanks to Aurelien Bompard (#1753506)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1756 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-14 18:30:21 +00:00
Matthias Eble
aca23c4640 Added examples for new features to check_disk
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1755 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-10 20:45:48 +00:00
Matthias Eble
5e633124e4 Check_disk now calls stat() for all filesystems to check.
Check_disk prints an strerror() message if the call of stat() fails.


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1754 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-10 20:18:55 +00:00
Matthias Eble
5d11612ecb Added -v/--verbose argument to call ldap_perror() for detailed messages on failure.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1753 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-07 22:20:40 +00:00
Matthias Eble
ea6f0f5a6e Changed output order of print_revision
print_revision now uses clean_revstring


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1752 f882894a-f735-0410-b71e-b25c423dba1c
2007-07-07 12:02:45 +00:00
Matthias Eble
f39f01e498 Fixed default behaviour of check_ldaps
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1747 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-20 11:09:47 +00:00
Matthias Eble
596002687a Clarified check_ldaps behaviour. New arguments to explicitly select secure connect behaviour (--starttls/--ssl).
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1746 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-20 11:00:20 +00:00
Matthias Eble
a82c2b4c3e added -V/--version to check_cluster
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1745 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-20 09:01:07 +00:00
Matthias Eble
1aa0194086 Make Linux specific plugin check_ide_smart build if appropriate headers are found
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1744 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-18 20:20:56 +00:00
Holger Weiss
79b2218286 Minor fixes.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1743 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-17 19:34:55 +00:00
Holger Weiss
02033903c0 Fix buffer overflow vulnerabilities when parsing HTTP redirect
'Location:' strings using sscanf(3) (Nobuhiro Ban - 1687867)


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1742 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-17 19:22:51 +00:00
Holger Weiss
ba3112f4c9 When following redirects, the plugin supported 'Location:' header fields
which spanned multiple lines.  However, it was not checked whether extra
lines are preceeded with white space, which could lead to the following
header field name being interpreted as the value of the 'Location:'
field if the latter was empty for some reason.


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1741 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-15 18:37:13 +00:00
Holger Weiss
0dc4801791 `host_name' is a NULL pointer if the "-I" flag is used instead of "-H",
so use `server_address' instead.  Fixes a possible segfault when
following redirects to relative URLs (reported by Ingo Lantschner).


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1740 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-15 18:31:37 +00:00
Matthias Eble
7c8db659a4 Fixed some syntax errors to make check_ide_smart build
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1739 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-13 09:43:28 +00:00
Holger Weiss
884bd1c822 Add "-v" to help/usage output.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1738 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-12 23:18:13 +00:00
Matthias Eble
15255ec599 Removed debug line
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1737 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-12 07:13:02 +00:00
Matthias Eble
a25b98d939 Fixed problem with popen.c not parsing --longopt='foo bar' correctly (Daniel Bimschas #1291987)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1736 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-11 20:54:07 +00:00
Matthias Eble
d059eeb294 Moved check_tcp's expect string testing into utils_tcp for testing purposes.
Added -A/--all flag to test for every expect string passed.


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1729 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-03 14:40:13 +00:00
Holger Weiss
61e0cbb7f4 Fix an off-by-one error where a realloc(3) call doesn't allocate space
for nul-termination (Aravind Gottipati - 1729692)


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1727 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-01 23:08:24 +00:00
Holger Weiss
f71de78952 Call the SSL library initialization functions only once (not for every
SSL connection).


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1726 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-01 22:57:31 +00:00
Holger Weiss
f747b865aa Save an entire CPU cycle if c points to NULL already.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1725 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-01 17:06:33 +00:00
Holger Weiss
bad9e04c54 Set the pointers to the SSL and SSL_CTX objects back to NULL after
freeing them in np_net_ssl_cleanup().  This fixes a check_http segfault
if an SSL site redirects to a non-SSL one (reported by Aravind Gottipati
via IRC).


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1724 f882894a-f735-0410-b71e-b25c423dba1c
2007-06-01 16:42:07 +00:00
Matthias Eble
716ff400f0 Fix segfault when -e is specified multiple times. Thanks to John Rouillard and Ralph Roessner (#1475899)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1723 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-29 20:01:26 +00:00
Matthias Eble
1e2982f072 No more warn/crit values in performance data if -w and -c are not specified.
Thanks to Simon Bellwood (#1181554)


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1722 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-29 19:11:42 +00:00
Thomas Guyot-Sionnest
063d2541ef check_snmp don't warn anymore if something is printed on stderr
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1721 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-29 05:22:32 +00:00
Thomas Guyot-Sionnest
757e1676f1 change a bunch of whitespaces (no code was harmed)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1720 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-29 04:25:24 +00:00
Ton Voon
3f5fbd9797 Test for new functionality in negate (not automatically run in make test)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1717 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-24 08:53:50 +00:00
Ton Voon
eaf9908edd Tests for check_dummy
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1716 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-24 08:35:53 +00:00
Thomas Guyot-Sionnest
f8766fe505 Update many strings in check_http to get more consistent output
Update translation files; fix all check_http changes in French and most changes in German.


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1715 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-23 08:22:33 +00:00
Thomas Guyot-Sionnest
15a018f87d Make check_tcp.t compatible with picky web servers.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1714 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-18 07:17:59 +00:00
Holger Weiss
88091d3db5 Add missing options to the usage output.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1713 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-13 20:02:08 +00:00
Matthias Eble
1ef19943e1 Fixed glibc error caused in utils_base.c due to uninitialized thresholds struct (spotted on ubundu 6.06 LTS).
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1711 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-12 07:45:36 +00:00
Matthias Eble
bb9cc35fd6 small typo in --help
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1709 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-09 09:16:33 +00:00
Matthias Eble
d56c198601 Fixed --help output (Ask Bjoern Hansen - #1714823)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1708 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-09 09:09:02 +00:00
Matthias Eble
c3c75a0980 added testcase to verify that old positional arguments only select one path
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1707 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-09 08:16:44 +00:00