summaryrefslogtreecommitdiffstats
path: root/plugins-root
AgeCommit message (Collapse)AuthorFilesLines
2018-12-07check_icmp: removed outcommented codeJacob Hansen1-7/+0
Signed-off-by: Jacob Hansen <jhansen@op5.com>
2018-12-07check_icmp: process protocol version args firstJacob Hansen1-10/+22
Detection of protocol version is in the previous patch implemented in the add_target() function, which is called when adding the -H command line argument. That means that if a protocal version argument (-4, -6) is added after the -H then the protocol version might be incorrectly set. This patch ensures that we first process the protocol version arguments, and then we process the rest of the arguments. Signed-off-by: Jacob Hansen <jhansen@op5.com>
2018-12-07check_icmp: Automatically detect IP protocolJacob Hansen1-26/+45
This patch automatically detects whether the protocol version is IPv4 or IPv6 All credits to: https://github.com/ghciv6 Signed-off-by: Jacob Hansen <jhansen@op5.com>
2018-12-07Fixed parameter handling after 01efbb2183d49c5082598d4799788fc385342f28Lars Michelsen1-38/+38
2018-12-07check_icmp: Add IPv6 supportLars Michelsen1-161/+330
This commit adds IPv6 capabilities to check_icmp. It is now possible to specify the address family using the arguments -4 (default) or -6. To make the change possible we had to move the argument parsing previous to creating the socket to be able to create it with the correct address family. This commit also fixes some gcc 4.9.2 compiler warnings. It has been tested with several current linux distributions (debian, ubuntu, rh, sles). This commit fixes monitoring-plugins/monitoring-plugins#1291
2017-01-10Apply another spelling fixHolger Weiss1-1/+1
2017-01-10Merge branch 'spell_fix'Jan Wagner1-1/+1
2016-12-07properly remove MSG_PEEK in check_dhcp.c. Fixes #1450.refs/pull/1454/headHarald Koch1-1/+1
2016-12-01Spelling fixes suggested by lintianrefs/pull/1452/headJan Wagner1-1/+1
2016-09-16check_dhcp: Make xid a bit more randomHolger Weiss1-3/+2
Don't just use the current time(2) to seed the PRNG that generates the xid. A DHCP server might be checked multiple times per second.
2016-09-14check_dhcp: Don't peek before reading responseHolger Weiss1-7/+1
Omit a recvfrom(3) call which has the MSG_PEEK flag set and should have no effect at all. According to a comment in the code, this call was meant to be a workaround to an opaque issue. If anyone runs into that issue, we should fix it properly instead.
2015-10-13Merge branch 'check_proc_1203'Jan Wagner1-1/+3
(Closes #1371) (Closes #1203)
2015-10-08Merge branch 'maint'Holger Weiss1-31/+12
* maint: sslutils: Remove superfluous parenthesis for sslv3 function too sslutils: remove superfluous parenthesis check_snmp: modified tests check_snmp.c: switched DEFAULT_TIMEOUT to DEFAULT_SOCKET_TIMEOUT (provided by utils.h), already used by help description, see issue #1318 install snmpd on travis tests enable libtab on travis builds add perl snmp to travis dependencies NEWS: Mention check_ups performance data fix Fix incorrect performance data thresholds check_dhcp: Fix option parsing Fixes segfaults when running via monitoring worker (off-by-one) travis: fix http test host sslutils: Check if OpenSSL supports SSLv3. Conflicts: NEWS plugins/sslutils.c
2015-10-05Fix for unclosed filehandle in pst3 on Solarisrefs/pull/1371/headabrist1-1/+3
On Solaris, check_procs uses pst3 instead of /bin/ps (see http://monitoring-plugins.org/doc/faq/ps-on-solaris.html for background). There's a small bug in pst3 which causes it to NOT report some processes that are at the end of the process table, at least on very busy systems (we noticed this on a CoolThreads T5240 with load averages up to 90). The bug is that a filehandle is not properly closed. Thanks to jwinkle01 for finding and patching the bug. (Closes #1203)
2015-10-04use unknown exit code for help/version in plugins-root as wellrefs/pull/1363/headSven Nierlein2-4/+4
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2015-10-02check_dhcp: Fix option parsingHolger Weiss1-31/+12
The call_getopt() function didn't always return the correct number of processed arguments. However, since check_dhcp doesn't support non-option arguments, the caller doesn't need this number anyway. Closes #1345.
2015-10-02Fixes segfaults when running via monitoring workerJan Wagner1-1/+1
(off-by-one) Grabed from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198318
2015-01-29make use of MSG_CONFIRM optionalSven Nierlein1-0/+5
since MSG_CONFIRM is a linux thing and only available on linux kernels >= 2.3.15, see send(2)
2014-12-02check_icmp: Cast size_t values for printf(3)Holger Weiss1-2/+5
Convert size_t values to unsigned long for printf(3) in order to maximize portability.
2014-11-28check_icmp: Fix a few type errorsHolger Weiss1-5/+5
2014-11-28Don't mix variable declarations and codeHolger Weiss1-15/+23
We still support pre-C99 compilers.
2014-11-28Use kernel reception time on ICMP packets to compute rtt.Matthieu Kermagoret1-7/+48
This commit uses the SO_TIMESTAMP feature of setsockopt to fetch kernel reception time of ICMP packets. This avoids invalid computations of rtt on machines with heavy load and/or heavy network traffic.
2014-07-06check_icmp/check_dhcp: disable check, if we are rootJan Wagner2-6/+0
As it is possible to use capabilities(7) on linux or solaris privileges for example, it is not necessary in all cases to have those binaries making use of setuid.
2014-06-28plugins-root/check_dhcp.c - array out of boundsSpenser Reinhardt1-1/+1
Coverity 66488 - offer_packet->options has a max size of 312. It was being used in a loop verifying less than 311, but increasing by 2 per loop, causing a possible array index out of bounds. Changed to checking less than max length - 1. - SR
2014-01-21Capitalize "Monitoring Plugins"Holger Weiss1-1/+1
"Monitoring Plugins" is a name.
2014-01-20Capitalize "Monitoring" when it's the first wordHolger Weiss2-2/+2
2014-01-19Project rename initial commit.Monitoring Plugins Development Team4-10/+10
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.
2013-09-17check_dhcp: fix mac address and interface number detection on solarisSven Nierlein1-4/+9
newer (or x86) solaris implementations have interface names like e1000g0 which includes numbers. So we reverse the interface number detection to get the last number, instead of the first number.
2013-09-17check_dhcp: fix tests interface detectionSven Nierlein1-1/+1
2013-09-16check_dhcp: fix tests for machines with default interace != eth0Sven Nierlein1-5/+10
2013-09-16check_dhcp test: skip subtests if no variable is setSven Nierlein1-20/+35
2013-09-15check_dhcp: add test fileSven Nierlein1-0/+49
2013-09-15check_icmp: tests do not require sudo if run by rootSven Nierlein1-9/+10
2013-09-15plugins-root: include t folder in release tarballSven Nierlein1-1/+1
2013-09-04check_icmp: Minor whitespace/indentation fixesHolger Weiss1-7/+6
2013-09-04check_icmp: Support "--help" and "--version"Holger Weiss1-0/+8
Let check_icmp provide "--help" and "--version" flags (in addition to "-h" and "-V"), just as the other plugins do.
2012-06-13check_dhcp: Don't misinterpret the "siaddr" fieldHolger Weiss1-9/+4
RFC 2131 (2.) says: "DHCP clarifies the interpretation of the 'siaddr' field as the address of the server to use in the next step of the client's bootstrap process." So, we shouldn't interpret this field as the DHCP server's own address. (#3503921 - Jason Ellison)
2012-06-13check_dhcp: Fix handling of "pad" optionsHolger Weiss1-3/+4
Don't let "pad" options[*] terminate the parsing of DHCP options. This bug was triggered by using check_dhcp against Windows 2003 DHCP servers (see #3503921). [*] Cf. RFC 2132, 3.1.
2011-04-29check_host: Allocate a large-enough buffer for the host table.Sebastian Harl1-1/+1
When specifying a host-name on the command line, each of its IPs is added to the host table (and each one is pinged). So, the buffer has to be large enough to hold all of the respective host objects. (argc - 1) only fits hosts with a single IP. Thanks to Max Kosmach <max@tcen.ru> for reporting this in Debian bug #623702.
2010-04-22Add newline after "Usage:" in --helpThomas Guyot-Sionnest2-2/+2
2010-04-22Standardize the extra-opts notesThomas Guyot-Sionnest2-10/+0
2010-04-14Fix translations when extra-opts aren't enabledThomas Guyot-Sionnest2-9/+9
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-14pst3.c must not use nagiosplug/gnulib includesThomas Guyot-Sionnest2-2/+4
2009-10-16Set proper network byte order for icmp_id and icmp_seq in icmp packetsThomas Guyot-Sionnest1-10/+11
2009-10-16Increment per-host sequence in check_icmpThomas Guyot-Sionnest1-11/+13
2009-09-25Allow custom versions with the release file...nagiosplugins1-1/+1
2009-09-14Ensure dirhandle is closed (Duncan Ferguson)Ton Voon1-0/+2
2009-07-14pst3 compile with Sun Studio CompilerTon Voon1-0/+2
2009-06-14Fixed error in rtt/rta calculation in case of system clock problemsMatthias Eble1-1/+1
Time differences are now set to 0 in case of backward timejumps so there are no wrap-around problems any more. The RTA calculation hopefully gets a more accurate value in these cases also.
2009-06-01Don't use the plain char type for data buffersHolger Weiss1-6/+6
Buffers which are used for holding arbitrary data should be referenced using pointers to void and accessed using pointers to unsigned char. Signed-off-by: Holger Weiss <holger@zedat.fu-berlin.de>