Commit graph

105 commits

Author SHA1 Message Date
Jan Wagner
ba21e26443 check_icmp/check_dhcp: disable check, if we are root
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-07-06 13:29:24 +02:00
Spenser Reinhardt
e7e6edb2f8 plugins-root/check_dhcp.c - array out of bounds
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-06-28 18:22:04 +02:00
Holger Weiss
01e570f4a4 Capitalize "Monitoring Plugins"
"Monitoring Plugins" is a name.
2014-01-21 16:19:20 +01: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
Sven Nierlein
6e9d16809e check_dhcp: fix mac address and interface number detection on solaris
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-17 19:56:55 +02:00
Sven Nierlein
08d554ada1 check_dhcp: fix tests interface detection 2013-09-17 13:13:26 +02:00
Sven Nierlein
2b23caf3d1 check_dhcp: fix tests for machines with default interace != eth0 2013-09-16 13:49:44 +02:00
Sven Nierlein
095e2e5db5 check_dhcp test: skip subtests if no variable is set 2013-09-16 08:51:04 +02:00
Sven Nierlein
5d58592cfe check_dhcp: add test file 2013-09-15 22:15:21 +02:00
Sven Nierlein
3c958ac738 check_icmp: tests do not require sudo if run by root 2013-09-15 21:57:27 +02:00
Sven Nierlein
a7f5e8a765 plugins-root: include t folder in release tarball 2013-09-15 21:33:29 +02:00
Holger Weiss
317d2896dc check_icmp: Minor whitespace/indentation fixes 2013-09-04 22:28:50 +02:00
Holger Weiss
a480681cb7 check_icmp: Support "--help" and "--version"
Let check_icmp provide "--help" and "--version" flags (in addition to
"-h" and "-V"), just as the other plugins do.
2013-09-04 22:20:26 +02:00
Holger Weiss
4d52762732 check_dhcp: Don't misinterpret the "siaddr" field
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-14 00:39:55 +02:00
Holger Weiss
f091d59e0f check_dhcp: Fix handling of "pad" options
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.
2012-06-13 12:36:42 +02:00
Sebastian Harl
5ebe25fc24 check_host: Allocate a large-enough buffer for the host table.
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.
2011-04-28 20:42:53 -04: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
c326b4dc1d pst3.c must not use nagiosplug/gnulib includes 2010-04-14 03:02:38 -04:00
Thomas Guyot-Sionnest
9c1aa029c0 Set proper network byte order for icmp_id and icmp_seq in icmp packets 2009-10-15 22:12:32 -04:00
Thomas Guyot-Sionnest
c2d9c59dc9 Increment per-host sequence in check_icmp 2009-10-15 21:52:18 -04:00
nagiosplugins
43c187a944 Allow custom versions with the release file... 2009-09-25 09:31:04 +00:00
Ton Voon
bbadda8979 Ensure dirhandle is closed (Duncan Ferguson) 2009-09-14 11:22:13 +01:00
Ton Voon
0dcd5e677e pst3 compile with Sun Studio Compiler 2009-07-14 23:20:21 +01:00
Matthias Eble
5f67308451 Fixed error in rtt/rta calculation in case of system clock problems
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-14 23:31:29 +02:00
Holger Weiss
bc827c9083 Don't use the plain char type for data buffers
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>
2009-06-02 01:09:18 +02:00
Matthias Eble
0a5cd15e75 Fixed check_icmp compiler warnings by including float.h
Self defined DBL_MAX caused compiler warnings. Now float.h
which defines DBL_MAX is included.
2009-06-01 22:41:46 +02:00
Matthias Eble
1c55e7287a Fixed --help output for warn and critical thresholds (sf.net #2796624, debian #530553)
check_icmp wrongly calculated the current thresholds in --help output.
2009-06-01 22:21:59 +02: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
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
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
526c3ad7a7 check_icmp now reports min and max round trip time perfdata (Steve Rader)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2073 f882894a-f735-0410-b71e-b25c423dba1c
2008-11-07 01:41:17 +00:00
Ton Voon
47b45d4981 Close on fd
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2031 f882894a-f735-0410-b71e-b25c423dba1c
2008-08-08 16:12:00 +00:00
Thomas Guyot-Sionnest
2367f82090 Typo in --help output
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2029 f882894a-f735-0410-b71e-b25c423dba1c
2008-08-08 02:08:08 +00:00
Matthias Eble
3c38fc752e -b option now specifies ICMP data bytes instead of packet size
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2027 f882894a-f735-0410-b71e-b25c423dba1c
2008-07-28 20:15:52 +00:00
Matthias Eble
c64070fd3f Add support for packet size modification (-b)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2026 f882894a-f735-0410-b71e-b25c423dba1c
2008-07-17 07:06:33 +00:00
Holger Weiss
830f3cc38a Don't try to set the "SO_BROADCAST" socket option for unicast requests.
(Also, removed the unused "DHCP_UNICAST_FLAG" macro.)


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2018 f882894a-f735-0410-b71e-b25c423dba1c
2008-07-06 12:57:11 +00:00
Ton Voon
25f0e9f4f0 Change pst3 again, this time to remove use of kvm which is not
available in Solaris 10 non-global zones. Uses /proc, which is not
available in older versions of Solaris.


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2016 f882894a-f735-0410-b71e-b25c423dba1c
2008-07-02 20:00:08 +00:00
Ton Voon
2968a166e2 Fixed possible coredump. Removed one level of subroutines (Duncan Ferguson)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2012 f882894a-f735-0410-b71e-b25c423dba1c
2008-06-17 14:19:17 +00:00
Ton Voon
5c3d4aea27 Optimised pst3 for systems with large number of processes (Duncan Ferguson)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2010 f882894a-f735-0410-b71e-b25c423dba1c
2008-06-02 16:22:35 +00:00
Ton Voon
62c4c7b9db Add additional PID column heading
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@2001 f882894a-f735-0410-b71e-b25c423dba1c
2008-05-27 13:35:59 +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
767bf9a0f2 --help output cleanup (plus removal of spaces on blank lines)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1985 f882894a-f735-0410-b71e-b25c423dba1c
2008-04-29 09:01:31 +00:00
Ton Voon
9188225da4 Fixed 64 bit pst3 when tries to link to gettext. Gettext linked
dynamically, if necessary


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1941 f882894a-f735-0410-b71e-b25c423dba1c
2008-03-14 15:44:27 +00:00
Ton Voon
dc2ec71d22 Fixed link -m64 problems on pst3 for solaris. Fixed _FILE_OFFSET_BITS
redefinition warnings. Fixed helper ar error in ./configure


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1938 f882894a-f735-0410-b71e-b25c423dba1c
2008-03-11 00:10:23 +00:00