Commit graph

103 commits

Author SHA1 Message Date
Lorenz Kästle
0f0865c910
Make IPv6 unconditional (#2219)
Some checks failed
Tests Debian:Testing and Fedora:Rawhide / Running unit and integrationt tests (push) Has been cancelled
Tests Debian:Testing and Fedora:Rawhide / Running rpm build test on fedora:rawhide (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
Spellcheck / codespell (push) Has been cancelled
Tests / Running unit and integrationt tests (push) Has been cancelled
Tests / Running rpm build test on almalinux:9 (push) Has been cancelled
Tests / Running rpm build test on fedora:latest (push) Has been cancelled
Tests / Running rpm build test on rockylinux:8 (push) Has been cancelled
This commits removes the detection of IPv6 availability.
The IPv6 code in the plugins is used unconditionally now.
2026-02-06 12:59:58 +01:00
Lorenz Kästle
802e46f8ea Run clang-format again 2025-09-15 12:59:37 +02:00
Lorenz Kästle
abc87a3d6d check_ping: fix some variables forgotten during refactoring 2025-03-17 12:57:21 +01:00
Lorenz Kästle
04c5e4024f Fix another sscanf instance 2025-03-12 17:27:20 +01:00
Lorenz Kästle
a609c0214f remove nagios reference
Narrow down sscanf expression
2025-03-12 17:27:11 +01:00
Lorenz Kästle
ae60d6d8d8 Refactor check_ping 2025-03-12 13:03:17 +01:00
Lorenz Kästle
29c0998cdf check_ping: general refactoring 2025-03-12 11:57:34 +01:00
Lorenz Kästle
19514d21b9 check_ping: clang-format 2025-03-12 11:24:53 +01:00
RincewindsHat
b227a9f854 check_ping: linter fixes 2024-10-31 13:42:06 +01:00
RincewindsHat
6d4e76680c check_ping: do not export local symbols 2024-10-31 13:39:35 +01:00
RincewindsHat
bf53f05ebf check_ping: update copyright 2024-10-31 13:39:22 +01:00
RincewindsHat
8eb6860578 check_ping: clang-format 2024-10-31 13:34:11 +01:00
RincewindsHat
47d3e156c5 check_ping: Use C99 booleans 2023-10-18 17:29:43 +02:00
Mark A. Ziesemer
3b252b9ae6
Trivial source code formatting only: Use tabs consistently for source code indentation (whitespace), as per https://github.com/monitoring-plugins/monitoring-plugins/blob/master/CODING . (#1424)
Looks good, thank you very much.
2022-01-22 15:58:59 +01:00
Lorenz
85c8dcddfa
Merge pull request #1412 from glensc/pld/nagios-plugins-ping.patch
[check_ping] understang ping6 output from iputils package
2022-01-14 16:28:24 +01:00
RincewindsHat
e030c2d17c Add thresholds even if value is missing 2021-11-17 15:45:49 +01:00
RincewindsHat
0214ec1918 Show RTA as unknown if it can not be determined 2021-11-17 14:23:24 +01:00
rincewind
27d96dcf23 Do not show RTA if no connection was possible 2021-11-17 14:23:24 +01:00
Elan Ruusamäe
05ac8a98a8 understang ping6 output from iputils package 2017-01-04 22:25:38 +02:00
Sven Nierlein
edca257e20 use unknown exit code for help/version in plugins
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2015-10-04 19:24:30 +02:00
Gunnar Beutner
e0af39d7e9 Make check_ping work on Windows. 2014-04-27 19:59:06 +02:00
Jan Wagner
455fe96e7d check_ping: Fixing "time of day goes back"
by Geoff Oakham <goakham at oanda.com>

Patch of check_ping that allows it to gracefully handle when ping outputs
to stderr "Warning: time of day goes back (-XXXXus), taking countermeasures."

Closes: #809 and #1195
2014-01-24 18:33:37 +01:00
Thomas Guyot-Sionnest
11cf54ca78 Merge branch 'rename' 2014-01-21 07:59:07 -05:00
Spenser Reinhardt
212575b858 plugins/*.c: Alterations for timeout messages.
.c file changes for misleading timeout messages in help functions. Solution to pull request #1209 tracker by awiddersheim.

Files: plugins/check_apt.c, plugins/check_by_ssh.c, plugins/check_dbi.c, plugins/check_dig.c, plugins/check_disk.c, plugins/check_dns.c, plugins/check_game.c, plugins/check_http.c, plugins/check_ldap.c, plugins/check_ntp.c, plugins/check_ntp_peer.c, plugins/check_ntp_time.c, plugins/check_nwstat.c, plugins/check_overcr.c, plugins/check_pgsql.c, plugins/check_ping.c, plugins/check_procs.c, plugins/check_radius.c, plugins/check_real.c, plugins/check_smtp.c, plugins/check_snmp.c, plugins/check_ssh.c, plugins/check_tcp.c, plugins/check_time.c, plugins/check_ups.c, plugins/negate.c
2014-01-21 11:33:45 +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
Anders Kaseorg
028d50d6f9 Die when asprintf fails
Fixes many instances of
warning: ignoring return value of 'asprintf', declared with attribute warn_unused_result [-Wunused-result]

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-06-29 13:39:11 +02:00
Holger Weiss
88fdf3a8a8 check_ping: Add missing newline to die() calls
Our die() function expects the caller to append the trailing newline
character.
2012-06-25 01:58:17 +02:00
Holger Weiss
bf7c4f95ae Merge remote-tracking branch 'github/waja/master'
Conflicts:
	NEWS
2012-06-25 01:14:12 +02:00
Holger Weiss
991054fa6e check_ping: Ignore ping(1)'s exit status
Don't return a WARNING state if the number of lost packets is greater
than zero but below the specified warning threshold.  This happened
because the check_ping plugin used the exit status of the ping(1)
utility.  (#3535140 - Tobias Brox)
2012-06-24 15:51:56 +02:00
Holger Weiss
a80eafbf9c Improve parsing of ping6(1) output
The ping6(1) implementation provided by Debian's iputils-ping package
may produce output such as the following:

| 3 packets transmitted, 0 received, +3 errors, 100% packet loss, time 2009ms

There's a corresponding pattern in check_ping.c:458:

| "%*d packets transmitted, %*d received, +%*d errors, %d%% packet loss"

Without this fix, the pattern in check_ping.c:456 matched first (as
sscanf(3) interprets "+3" as a match for "%d"):

| "%*d packets transmitted, %*d received, %d%% loss, time"

(#1894850 - Debian bug report #514588 - Matej Vela)
2012-06-11 23:40:04 +02:00
Jan Wagner
c69890a4b4 Fix check_ping where output of ping6 when unreachable (Debian #662638) 2012-04-17 11:46:16 +02: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
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
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
4d157889e3 Added performance data to check_ping (Christian Schneemann)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1990 f882894a-f735-0410-b71e-b25c423dba1c
2008-05-07 10:01:48 +00:00
Thomas Guyot-Sionnest
ed62784a0b --help output cleanup (plus removal of spaces on blank lines)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1984 f882894a-f735-0410-b71e-b25c423dba1c
2008-04-27 14:35:26 +00:00
Thomas Guyot-Sionnest
6c4468a728 Bump plugin/ to GPLv3 (check_overcr to check_users)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1917 f882894a-f735-0410-b71e-b25c423dba1c
2008-01-31 10:44:26 +00:00
Ton Voon
cf0dee616a Automatically update website with --help output. Cosmetic
fixes for some help output


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1810 f882894a-f735-0410-b71e-b25c423dba1c
2007-10-25 20:43:04 +00:00
Holger Weiss
27a624dd9f #ifdef can only test a single macro, not an expression.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1699 f882894a-f735-0410-b71e-b25c423dba1c
2007-04-23 07:30:47 +00:00
Ton Voon
76cc1b75dd check_ping's timeout interval is only +1 if ping command has a timeout value.
Tests updated to check for 100% packet loss (always if ping has timeout), otherwise
will check for "timed out" string


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1639 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-12 10:51:06 +00:00
Ton Voon
c40118ace3 Fixed some help display. Removed -L from usage as deprecated option
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1636 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-11 01:57:52 +00:00
Holger Weiss
fd329a1e91 Don't try to print `optarg' (which will be a NULL pointer) if an unknown
command line option was used, as this leads to a segfault on some
systems.  The unknown option will be printed by getopt(3) anyway.  So,
simply call print_usage() and exit UNKNOWN via the new usage5() instead.


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1590 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-28 21:46:41 +00:00
Thomas Guyot-Sionnest
142b9da7c0 Fix bug #1629008: check_ping fails to handle Packet filtered error
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1563 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-06 06:41:47 +00:00
Thomas Guyot-Sionnest
c653cd7010 Revert last patch: it works but not really for the reason I though.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1562 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-06 06:33:17 +00:00
Thomas Guyot-Sionnest
a61a5ead01 Fix the way check_ping calculate the maximum run time
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1561 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-06 04:52:58 +00:00
Thomas Guyot-Sionnest
7d134133eb Fix bug #1592605: check_ping times out
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1559 f882894a-f735-0410-b71e-b25c423dba1c
2007-01-04 11:35:56 +00:00