Commit graph

20 commits

Author SHA1 Message Date
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
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
Jan Wagner
be55da1d23 check_ups/check_dbi: Fixing spelling bug 2014-06-23 22:20:03 +02: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
Sebastian Harl
ce75adf287 check_dbi: Hint the user about cause when dbi init fails. 2012-06-06 15:06:44 +02:00
Sebastian Harl
022ba7ea3a check_dbi: Added simple regex example to help output. 2012-06-06 14:10:55 +02:00
Sebastian Harl
14fc0f741d check_dbi: Added SERVER_VERSION metric.
This metric compares the database engine server version with the specified
ranges. The version string [[[[A.]B.]C.]D.]E[.] is returned as E + D*100 +
C*10000 + B*1000000 + A*100000000 (see libdbi's dbi_conn_get_engine_version()
documentation).
2012-06-06 14:10:55 +02:00
Sebastian Harl
b7e661c4ae check_dbi: Added -r and -R options.
These options may be used to specify an extended POSIX regular expression that
is applied to the query result. When using -R, a case-insensitive match is
done.

The options may not be mixed with -w/-c/-e.
2012-06-06 14:10:55 +02:00
Sebastian Harl
aebde433fb check_dbi: Added -e option.
This option may be used to specify a string that is expected as the query
return value. The string is compared to the query result using strcmp().

The option may not be mixed with -w/-c.
2012-06-06 14:10:55 +02:00
Sebastian Harl
eda2fe7f40 check_dbi: Added some examples to the help output. 2012-06-06 14:10:55 +02:00
Sebastian Harl
4ad6e441b6 check_dbi: Added QUERY_TIME metric.
This metric checks the execution time of the specified query. In case the
query does not return any (parsable) data, this is not treated as an error
when using this metric.
2012-06-06 14:10:55 +02:00
Sebastian Harl
d7a1f2a7a0 check_dbi: Replaced -W/-C with -m.
The -m option may be used to specify a metric to check the thresholds against.
This is more flexible than --conntime-warning/--conntime-critical (-W/-C) as
it may be extended to support further metrics without introducing tons of
arguments. Also, it does not make much sense to check the conntime and query
result at the same time.

Currently, the metrics CONN_TIME and QUERY_RESULT are available.

A query is no longer required unless QUERY_RESULT (the default) is used.
2012-06-06 14:10:55 +02:00
Sebastian Harl
61506bd8d7 check_dbi: Fixed/improved perfdata output.
- do not use zero as 'min' value for the query result perfdata

 - added all semicolons
2012-06-06 14:10:55 +02:00
Sebastian Harl
0e02edec19 check_dbi: Check and report the time used by the query. 2012-06-06 14:10:55 +02:00
Sebastian Harl
e7dfcd4429 check_dbi: Added threshold ranges for the connection time.
The -W and -C options are used for that. The plugin return value is determined
by the worst check result.
2012-06-06 14:10:55 +02:00
Sebastian Harl
07768fa895 check_dbi: Include extra opts in help output. 2012-06-06 14:10:55 +02:00
Sebastian Harl
f9a942d2a1 Initial version of the 'check_dbi' plugin.
This plugin connects to an SQL database using libdbi, thus supporting all
database backends supported by libdbi. It will then issue the specified SQL
query and check the result (the numeric value of the first column of the first
row to be precise) against the specified warning/critical ranges.

The performance data includes the connection time (µs-resolution as provided
by gettimeofday()) and the query result.
2012-06-06 14:10:55 +02:00