Commit graph

3145 commits

Author SHA1 Message Date
Sven Nierlein
2813d08b92
Merge pull request #1585 from sni/update_test_certs
renew test certificates
2019-02-19 21:41:28 +01:00
Sven Nierlein
8442ed5b41 renew test certificates
Signed-off-by: Sven Nierlein <sven@nierlein.de>
2019-02-19 16:35:28 +01:00
Sven Nierlein
c40babbb6a
Merge pull request #1563 from jacobbaungard/ipv6_check_icmp
check_icmp: Add IPv6 support
2019-02-19 15:44:05 +01:00
Sven Nierlein
c0ff2b66e8
Merge pull request #1584 from DerDakon/typo
check_dns: fix typo in parameter description
2019-02-15 18:01:51 +01:00
Rolf Eike Beer
763eb740b3 check_dns: fix typo in parameter description 2019-02-15 17:31:29 +01:00
Sven Nierlein
2962148d8b
Merge pull request #1582 from towolf/show_body_for_http_expect_case
Also support the --show-body/-B flag when --expect is used
2019-02-15 09:02:43 +01:00
Sven Nierlein
8f1d3de0b7
Merge pull request #1545 from DerDakon/dns_order
check_dns: improve support for checking multiple addresses
2019-02-15 09:00:45 +01:00
Tobias Wolf
f7f0f7d467 Also support the --show-body/-B flag when --expect is used 2019-02-12 13:01:23 +01:00
Jan Wagner
49a0583bff Merge branch 'travis-ci-xenial' 2019-02-06 08:34:44 +01:00
Jan Wagner
2dcfbbcad0 travis-ci: Use RSA keys for SSH tests 2019-02-04 14:24:29 +01:00
Jan Wagner
2416aaadd8 travis-ci: Restart mysql 2019-02-02 17:26:01 +01:00
Jan Wagner
0ca6c28ebf travis-ci: The package name is now 'squid' 2019-02-02 16:56:37 +01:00
Jan Wagner
a8d96ce2c6 travis-ci: Remove backports ppa 2019-02-02 16:47:07 +01:00
Jan Wagner
0ec21334c3 travis-ci: Switch over to xenial 2019-02-02 16:36:47 +01:00
Sven Nierlein
da02bfe3ca
Merge pull request #1578 from sni/tests_fix_snmp_test
tests: make check_snmp test more reliable
2019-02-01 18:07:13 +01:00
Sven Nierlein
22f47fc0c5 tests: make check_snmp test more reliable
The check_snmp rate tests depend on the exact amount of time spend between the
plugin runs and will fail on busy machines, ex. the ci servers. Using faketime
mitigates this issue and also removes all the sleeps.

Signed-off-by: Sven Nierlein <sven@nierlein.de>
2019-01-21 17:41:02 +01:00
Jan Wagner
eb8ca01be9 Merge pull request #1574 from waja/check_smtp_custom_command_ssl
Simply initializes n before it is used
2019-01-20 15:07:58 +01:00
Iustin Pop
8520c643dd Simply initializes n before it is used
When SSL is enabled, n is assigned the size of the server's second EHLO
response (I think in bytes), which will usually be significantly higher
than the command passed. As such, no commands are executed and no responses
are checked, which - silently - defeats the desired checks and results in a
success value.
2019-01-18 22:52:54 +01:00
Sven Nierlein
5237395433
Merge pull request #1569 from jacobbaungard/check_hpjd_disable_paper_out
check_hpjd: Added -D option to disable warning on 'out of paper'
2019-01-04 22:56:36 +01:00
Kostyantyn Hushchyn
f79f016238 check_hpjd: Added -D option to disable warning on 'out of paper'
Signed-off-by: Kostyantyn Hushchyn <kgushtin@op5.com>
2019-01-04 15:01:28 +01:00
Jacob Hansen
4a4ef0d689 check_icmp: Do not overwrite -4,-6 on lookup
In case we needed to do a lookup, we previously overwrote the
address_family to IPv6, even if we supplied -4 as a cmd line argument.

This commit should ensure the cmd line argument is always followed.

Signed-off-by: Jacob Hansen <jhansen@op5.com>
2018-12-10 14:39:13 +00:00
Jacob Hansen
ca6efcd02b check_icmp: emit error if multiple protocol version
As we do not support checking both IPv4 and IPv6 hosts in one execution
we emit an error if multiple protocol versions are defined in the cmd
line args.

Signed-off-by: Jacob Hansen <jhansen@op5.com>
2018-12-10 14:39:13 +00:00
Jacob Hansen
7a660b3f01 check_icmp: move opts string into a variable
This commit moves the opts string into a variable as it is now used
twice.

Signed-off-by: Jacob Hansen <jhansen@op5.com>
2018-12-10 14:39:13 +00:00
Sven Nierlein
ac6f101f05
Merge pull request #1564 from jacobbaungard/check_cluster_arg_validation
check_cluster.c: Added data argument validation.
2018-12-07 17:35:58 +01:00
Jacob Hansen
0882b4201b check_icmp: Correctly set address_family on lookup
If a hostname is supplied instead of an IP address, the automatic
address family detection would fail to correctly set the IP protocol
version (it would always be IPv6).

We now supply AF_UNSPEC to getaddrinfo, which should then return the
correct address family in the result.

Signed-off-by: Jacob Hansen <jhansen@op5.com>
2018-12-07 09:51:21 +00:00
Jacob Hansen
e5eccb663e check_icmp: removed outcommented code
Signed-off-by: Jacob Hansen <jhansen@op5.com>
2018-12-07 09:51:21 +00:00
Jacob Hansen
e3ade3374a check_icmp: process protocol version args first
Detection of protocol version is in the previous patch implemented in
the add_target() function, which is called when adding the -H command
line argument. That means that if a protocal version argument (-4, -6)
is added after the -H then the protocol version might be incorrectly
set.

This patch ensures that we first process the protocol version arguments,
and then we process the rest of the arguments.

Signed-off-by: Jacob Hansen <jhansen@op5.com>
2018-12-07 09:51:21 +00:00
Jacob Hansen
8edac9421f check_icmp: Automatically detect IP protocol
This patch automatically detects whether the protocol version is IPv4 or
IPv6

All credits to: https://github.com/ghciv6

Signed-off-by: Jacob Hansen <jhansen@op5.com>
2018-12-07 09:51:21 +00:00
Lars Michelsen
248bebb037 Fixed parameter handling after 01efbb2183 2018-12-07 09:51:21 +00:00
Lars Michelsen
fd6dc66653 check_icmp: Add IPv6 support
This commit adds IPv6 capabilities to check_icmp. It is now possible to
specify the address family using the arguments -4 (default) or -6.

To make the change possible we had to move the argument parsing previous
to creating the socket to be able to create it with the correct address
family.

This commit also fixes some gcc 4.9.2 compiler warnings. It has been
tested with several current linux distributions (debian, ubuntu, rh,
sles).

This commit fixes monitoring-plugins/monitoring-plugins#1291
2018-12-07 09:51:21 +00:00
Sven Nierlein
c7c4be2ad1
Merge pull request #1565 from sni/travis_run_plugin_root_tests
Travis run plugin root tests
2018-12-07 10:34:45 +01:00
Sven Nierlein
d7dcca22ae tests: rework test parameters
there were 2 variants of calling getTestParameter:

    - parameter, description, default value
    - parameter, env value, default value, description, scope

While scope was never actually used and having 2 names for the same value led
to having 2 different entries in the cache file for the same configuration.

This commit removes the variants and simplifies tests parameters by only using
the first 3 parameter variant.
2018-12-04 15:20:19 +01:00
Sven Nierlein
b69eb5afed NPTest: unify whitespace 2018-12-04 14:54:12 +01:00
Sven Nierlein
660e0cf4e2 tests: skip some tests if Monitoring::Plugin::Range isn't available
The check_file_age uses Monitoring::Plugin::Range internally. Skip thoses tests
if the module isn't available.
2018-12-04 14:54:12 +01:00
Sven Nierlein
19be129ff8 tests: enable plugins-root tests 2018-12-04 09:48:45 +01:00
Kostyantyn Hushchyn
910894a4e2 check_cluster.c: Added data argument validation.
Signed-off-by: Kostyantyn Hushchyn <kgushtin@op5.com>
2018-11-29 16:37:59 +01:00
Holger Weiss
c285edd2f3 Merge remote-tracking branch 'monitoring-plugins/pr/1560'
* monitoring-plugins/pr/1560:
  Add new flag --show-body/-B to print body
2018-11-10 19:22:05 +01:00
Tobias Wolf
9966ebcd84 Add new flag --show-body/-B to print body
This should help with figuring out ia problem at a glance when enabled for
healthz endpoints on web APIs, for example.

The content of the body can point to what the problem is and help with
diagnostics.

Fixes #1559
2018-11-09 23:48:56 +01:00
Holger Weiss
0863a4cb93 Merge remote-tracking branch 'monitoring-plugins/pr/1476'
* monitoring-plugins/pr/1476:
  test: Add proxy tests via proxy
  Allow user to specify HTTP method after proxy CONNECT
2018-11-06 12:49:18 +01:00
Markus Frosch
198611a3c2 test: Add proxy tests via proxy
On Travis with a local squid
2018-11-06 12:33:24 +01:00
Markus Frosch
d659f8d99f Allow user to specify HTTP method after proxy CONNECT
Simple format, avoids refactoring the CONNECT feature.
2018-11-06 11:32:27 +01:00
Sven Nierlein
82a634f7bf
Merge pull request #1552 from madpilot78/Avoid_passing_NULL_to_vprintf
Avoid passing NULL to vprintf().
2018-10-22 16:22:54 +02:00
Sven Nierlein
1c0a48bc6b
Merge pull request #1522 from Sp1l/fix-MariaDB10.2
Fix build issue with MariaDB 10.2
2018-10-22 16:21:05 +02:00
Sven Nierlein
26d84632b8
Merge pull request #1556 from TeamOfMonkeysNet/master
Added a compiled plugin script that was missing from gitignore
2018-10-13 20:16:49 +02:00
Lucas Bussey
ec4ef097c2 Added a compiled plugin script that was missing from gitignore 2018-10-13 07:44:39 -07:00
Guido Falsi
c76f59bcc0 Avoid passing NULL to vprintf(). 2018-09-29 16:22:44 +02:00
Sven Nierlein
22f13aa2f1
Merge pull request #1538 from wopfel/uptime-plugin
Uptime plugin
2018-07-26 07:31:37 +02:00
Rolf Eike Beer
fd9a7d2e00 check_dns: allow forcing complete match of all addresses 2018-07-25 21:14:47 +02:00
Rolf Eike Beer
a03068743f check_dns: allow returned addresses to be in any order 2018-07-25 20:18:47 +02:00
Rolf Eike Beer
e60c6c04f0 check_dns: simplify loop 2018-07-25 19:05:16 +02:00