Commit graph

87 commits

Author SHA1 Message Date
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
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
Ton Voon
deadc98264 Reduced DNS lookups in check_ping and netutils.c in IPv6 configurations
(Pawel Malachowski)


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1535 f882894a-f735-0410-b71e-b25c423dba1c
2006-11-09 11:44:16 +00:00
Benoit Mortier
082cfc29e3 first pass at cleaning localization for new release
first pass at making all the headre be the same licence, plugin, etc...


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1499 f882894a-f735-0410-b71e-b25c423dba1c
2006-10-19 00:25:16 +00:00
Benoit Mortier
cbbfed30eb cleaning up help and usage
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1433 f882894a-f735-0410-b71e-b25c423dba1c
2006-06-17 12:28:43 +00:00
Ton Voon
5c0aa37260 Change warning message if there is stderr output. This catches a problem
where time was shifting backwards on a linux VMware guest during the ping


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1322 f882894a-f735-0410-b71e-b25c423dba1c
2006-03-13 11:08:28 +00:00
Ton Voon
e5e4c84560 Using common message
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1221 f882894a-f735-0410-b71e-b25c423dba1c
2005-09-14 14:40:20 +00:00
Ton Voon
3fc34f5fa1 Required hostname not flagging as an error
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1220 f882894a-f735-0410-b71e-b25c423dba1c
2005-09-14 14:36:00 +00:00
Ton Voon
31c5bbba7e More diagnostic messages from check_ping
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1216 f882894a-f735-0410-b71e-b25c423dba1c
2005-09-13 15:48:15 +00:00
M. Sean Finney
42050b45f2 re-add a call to setlocale(LC_ALL, "") in check_ping.c
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1215 f882894a-f735-0410-b71e-b25c423dba1c
2005-09-12 11:20:51 +00:00
Ton Voon
72ef9a13bf Fix parsing for netkit-ping and iputils-ping (Christian G Warden)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1205 f882894a-f735-0410-b71e-b25c423dba1c
2005-07-20 22:38:37 +00:00
Subhendu Ghosh
afb0e811bf RH9 pattern
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1181 f882894a-f735-0410-b71e-b25c423dba1c
2005-05-25 14:25:55 +00:00
M. Sean Finney
0dd8bfec75 setlocale(LC_ALL, "") should be setlocale(LC_NUMERIC, "C") to properly parse the output of ping.
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1171 f882894a-f735-0410-b71e-b25c423dba1c
2005-05-03 02:00:51 +00:00
Benoit Mortier
7df9bd7bab more internationalization fixes
internationalization freeze for beta1


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1067 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-30 00:41:41 +00:00
Benoit Mortier
b8fcd0d258 String match in check_ping for Solaris 10 #1091043
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1064 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-28 22:34:42 +00:00
Benoit Mortier
e9ccc6b21a various fixes for localization
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1061 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-25 23:17:46 +00:00
Benoit Mortier
2ab4d8fc27 fix patch 998291
fix patch 1078934 expect check_ssh fix and check_nt perfdata should stay
on one word like in nagios


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1004 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-05 00:54:09 +00:00
Benoit Mortier
30a4266a3a reverting my changes from !=TRUE to == ERROR, that's not good ;-( sorry
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@998 f882894a-f735-0410-b71e-b25c423dba1c
2004-12-03 23:55:29 +00:00