Commit graph

55 commits

Author SHA1 Message Date
Holger Weiss
89d00d1c00 Apply another spelling fix 2017-01-10 21:34:58 +01:00
Jan Wagner
dbb92c347e Spelling fixes suggested by lintian 2016-12-01 12:49:40 +01:00
Sven Nierlein
bebf1cd050 use unknown exit code for help/version in plugins-root as well
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2015-10-04 19:24:30 +02:00
Sven Nierlein
809508926f make use of MSG_CONFIRM optional
since MSG_CONFIRM is a linux thing and only available on linux kernels >= 2.3.15, see send(2)
2015-01-29 16:18:27 +01:00
Holger Weiss
ed9394880c check_icmp: Cast size_t values for printf(3)
Convert size_t values to unsigned long for printf(3) in order to
maximize portability.
2014-12-02 11:36:25 +01:00
Holger Weiss
9c289ec744 check_icmp: Fix a few type errors 2014-11-28 16:23:28 +01:00
Holger Weiss
8e5118e0cb Don't mix variable declarations and code
We still support pre-C99 compilers.
2014-11-28 16:23:28 +01:00
Matthieu Kermagoret
5265fabeb9 Use kernel reception time on ICMP packets to compute rtt.
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-11-28 16:23:27 +01:00
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
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
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
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
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
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
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
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
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
Thomas Guyot-Sionnest
edf361db3e Bump plugins-root/ to GPLv3
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1920 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-31 11:52:45 +00:00
Holger Weiss
be1ba84de5 Hide some debug output which was printed even without "-v" (under
certain circumstances).


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1897 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-08 02:06:35 +00:00
Holger Weiss
6a00f7ecdd Fix the handling of ICMP packets which are not echo replies (such as
destination unreachable messages) or which are not directed at us.


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1896 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-08 01:51:14 +00:00
Holger Weiss
5da79db21a Get rid of a cast which increases the required alignment.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1895 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-08 01:43:49 +00:00
Holger Weiss
aa215f26d9 Mark some constant strings "const".
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1894 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-08 01:40:21 +00:00
Holger Weiss
1544007dcf Fix INADDR_NONE value (for systems which don't define it).
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1884 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-21 14:19:08 +00:00
Holger Weiss
50809d42f0 Include <sys/sockio.h> (if available) to get SIOCGIFADDR defined on
Solaris.


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1883 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-21 14:17:29 +00:00
Holger Weiss
8a4d06a25f New "-s" option to specify the source IP address (thanks to Harald Jenny
for providing the patch and to Patrick Cervicek for looking into it!)


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1882 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-21 13:25:28 +00:00
Thomas Guyot-Sionnest
56c9db8516 Adding missing function calls needed for i18n (only for plugins already in POTFILES.in)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1861 f882894a-f735-0410-b71e-b25c423dba1c
2007-12-11 05:57:35 +00:00
Holger Weiss
c11f63ff7e Correct all instances of misaligned memory access. This fixes bus erros
on platforms which require alignment (such as SPARC and MIPS).


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1779 f882894a-f735-0410-b71e-b25c423dba1c
2007-09-15 11:55:12 +00:00
M. Sean Finney
bf9f0e9f89 added functions to utils_base:
np_check_if_root() - returns nonzero if geteuid()==0
  np_warn_if_not_root() - uses the above to print an informative warning
added uses of these functions to check_dhcp and check_icmp.


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1718 f882894a-f735-0410-b71e-b25c423dba1c
2007-05-27 13:46:32 +00:00
Thomas Guyot-Sionnest
223da2af43 Fix bug #1494629 - check_icmp fails after some time on FreeBSD
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1650 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-27 06:53:57 +00:00
Thomas Guyot-Sionnest
08f4f7c8b8 New switch to check_icmp to set the minimum required hosts for success.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1635 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-08 09:09:38 +00:00
Thomas Guyot-Sionnest
3ba3044b30 Fixed C++ style comments, but I don't get why those lines were originally commented out.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1633 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-08 06:09:50 +00:00
Thomas Guyot-Sionnest
79a607391a Fix bug #1632078: critical threshold % incorrectly displayed by check_icmp
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1569 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-20 06:27:17 +00:00
Benoit Mortier
ec1f4555db more fixes and removal of certain sentences not needed
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1525 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-24 21:54:06 +00:00
Benoit Mortier
e23b863a25 last localization fixes for core plugins in c
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1524 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-24 21:48:22 +00:00
Ton Voon
2024094a6e Fixed compile on non-glibc platforms
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1522 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-24 09:48:26 +00:00