Commit graph

3488 commits

Author SHA1 Message Date
Sven Nierlein
5f16ba81c4
Merge pull request #1491 from odenbach/no_swap
check_swap: repaired "-n" behaviour
2019-03-28 16:55:22 +01:00
Sven Nierlein
71582d8bf9
Merge pull request #1586 from computersalat/master
improve command examples for 'at least' processes
2019-03-21 17:43:55 +01:00
Sven Nierlein
41d98f708a
Merge pull request #1587 from jacobbaungard/check_mysql_allow_socket-H
check_mysql: Allow sockets to be specified to -H
2019-03-21 17:42:19 +01:00
ChrisWi
a58ea5ec5d improve command examples for 'at least' processes 2019-03-21 14:18:37 +01:00
Robin Sonefors
2bc4cc99d2 check_mysql: Allow sockets to be specified to -H
The help text says that -H accepts a "unix socket (must be an absolute
path)". Now that actually corresponds to reality.

Signed-off-by: Robin Sonefors <robin.sonefors@op5.com>
2019-03-21 13:54:19 +01:00
Sven Nierlein
97bb142b14
Merge pull request #1506 from sanchezfauste/check_apt_parameters
Adding packages-warning option to check_apt plugin
2019-02-19 22:10:07 +01:00
Sven Nierlein
af8e68d140
Merge pull request #1507 from sanchezfauste/check_load_print_top_procs
Adding print top consuming processes option to check_load
2019-02-19 22:08:04 +01:00
Sven Nierlein
e5823c7ae4
Merge pull request #1527 from m-kraus/master
check_snmp: make calcualtion of timeout value in help output more clear
2019-02-19 21:58:03 +01:00
Sven Nierlein
555559fd30
Merge pull request #1567 from vdanjean/master
[check_disk] add support to display inodes usage in perfdata
2019-02-19 21:49:13 +01:00
Sven Nierlein
931ed78b5d
Merge pull request #1583 from sni/fix_check_by_ssh_timeout_child_leak
check_by_ssh: fix child process leak on timeouts
2019-02-19 21:42:02 +01:00
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
7cafb0e845 check_by_ssh: fix child process leak on timeouts
When check_by_ssh runs into a timeout it simply exits keeping all child processes running.
Simply adopting the kill loop from runcmd_timeout_alarm_handler() fixes this.

Signed-off-by: Sven Nierlein <sven@nierlein.de>
2019-02-15 10:36:28 +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
Vincent Danjean
270e7cba38 [check_disk] add support to display inodes usage in perfdata
This is not enabled by default
It can be enabled with the -P (--iperfdata) option
2018-12-08 22:44:42 +01: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
Tomas Mozes
0a58acc705
plugins: check_http: Increase regexp limit 2018-12-05 12:50:53 +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
Andreas Baumann
faea5899ba set hostname in for CURLOPT_CURL to virtual hostname in case of SSL (for SNI to work) 2018-11-12 10:25:08 -05:00