Commit graph

24 commits

Author SHA1 Message Date
Lorenz Kästle
9f776105d4 Reapply "check_dhcp: reduce number of tests for weird reasons"
This reverts commit 612d261cbf.
2025-06-23 13:21:25 +02:00
Lorenz Kästle
612d261cbf Revert "check_dhcp: reduce number of tests for weird reasons"
This reverts commit 52338c3423.
2025-06-23 13:02:52 +02:00
Lorenz Kästle
52338c3423 check_dhcp: reduce number of tests for weird reasons 2025-06-23 12:33:28 +02:00
Lorenz Kästle
bf0b389381 Adapt tests 2025-06-23 12:09:58 +02:00
Lorenz Kästle
d2735eecd4 Fix number of tests 2025-06-20 10:53:46 +02:00
Lorenz Kästle
6bc2e75199 Fix test with weird arguments 2025-06-20 10:28:45 +02:00
Lorenz Kästle
2bea8e9522 check_icmp: Remove signal handling and timeouts
The timeout option was redundant in that the runtime
of check_icmp was always limited by the input parameters
and therefore timeout gets removed with this commit to
avoid that confusion.

The rest of the signal handlings was removed too, since
the added complexity does not provide sufficient returns.
If check_icmp gets a signal, it now dies like most other
programs instead of trying to save some things and return a
(arguably wrong) result.
2025-06-20 10:04:34 +02:00
Lorenz Kästle
0f8690c19b Remove check_icmp text regex tests 2025-06-09 12:42:17 +02:00
Sven Nierlein
0488426c7e check_icmp: keep performance data order in case of none-reachable hosts
For responding hosts nothing changes:

    ./check_icmp -H 10.0.0.1
    OK - 10.0.0.1 rta 0.336ms lost 0%|rta=0.336ms;200.000;500.000;0; rtmax=0.471ms;;;; rtmin=0.000ms;;;; pl=0%;40;80;0;100

In case the host is down, the performance data now contain 'U' according to:
https://www.monitoring-plugins.org/doc/guidelines.html#AEN201

Old:
    ./check_icmp -H 10.0.0.99
    CRITICAL - 10.0.0.99: Host unreachable @ 10.0.1.138. rta nan, lost 100%|pl=100%;40;80;0;100

Old:
    ./check_icmp -H 10.0.0.99
    CRITICAL - 10.0.0.99: Host unreachable @ 10.0.1.138. rta nan, lost 100%|rta=U;;;; rtmax=U;;;; rtmin=U;;;; pl=100%;40;80;0;100

This confuses some performance graphing tools, ex.: pnp.

Signed-off-by: Sven Nierlein <sven@consol.de>
2024-03-01 09:03:17 +01:00
Danijel Tasov
4e7eb55079 add some basic tests for the new modes
Signed-off-by: Danijel Tasov <m@rbfh.de>
2023-10-04 11:34:25 +02:00
Danijel Tasov
df57a23e0a update failure regex 2023-10-04 10:39:30 +02:00
Danijel Tasov
396bcf50ce adjust check_icmp tests 2023-10-04 10:21:41 +02:00
Jan Wagner
0f3703e641 Fix a lot of typos reported by codespell 2023-04-14 18:35:00 +00:00
Lorenz
6054055571
check_icmp: buffer offerflow (#1733)
* Fix different overflows

* Less includes

* Add testcases

* Remove unused variable

* Remove unused and commented includes
2022-03-15 22:00:55 +01:00
ghciv6
986b247946 - delay set_source_ip() until address_family is detected
- add a test to check '-s'
2022-01-29 12:19:23 +01:00
Aksel Sjögren
39c162e594
Fix check_dhcp tests
* try to use "/usr/sbin/ip" before "ifconfig" since the latter is
  obsolete on Linux to figure out interface to listen for DHCP messages.
  But keeping ifconfig method just in case.
  Without this, tests fail on boxes without ifconfig AND the correct
  interface named ethX.

* amend possible failure responses, as check_dhcp might get a DHCPOFFER,
  but from an unexpected address - which happens if the box running
  tests are on a network with a DHCP server.
2021-04-30 11:14:10 +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
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
3f93ecd171 Add tests for new check_icmp switch -m
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1638 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-11 06:51:26 +00:00
Ton Voon
0052e43b5a Converted check_ping.t to new-style testcases. Added test case for check_icmp -
requires sudo access


git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@1637 f882894a-f735-0410-b71e-b25c423dba1c
2007-03-11 02:27:21 +00:00