summaryrefslogtreecommitdiffstats
path: root/plugins/check_dbi.c
AgeCommit message (Collapse)AuthorFilesLines
2012-06-06check_dbi: Hint the user about cause when dbi init fails.Sebastian Harl1-1/+1
2012-06-06check_dbi: Added simple regex example to help output.Sebastian Harl1-0/+6
2012-06-06check_dbi: Added SERVER_VERSION metric.Sebastian Harl1-4/+25
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-06check_dbi: Added -r and -R options.Sebastian Harl1-12/+89
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-06check_dbi: Added -e option.Sebastian Harl1-19/+76
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-06check_dbi: Added some examples to the help output.Sebastian Harl1-1/+16
2012-06-06check_dbi: Added QUERY_TIME metric.Sebastian Harl1-37/+90
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-06check_dbi: Replaced -W/-C with -m.Sebastian Harl1-61/+70
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-06check_dbi: Fixed/improved perfdata output.Sebastian Harl1-1/+1
- do not use zero as 'min' value for the query result perfdata - added all semicolons
2012-06-06check_dbi: Check and report the time used by the query.Sebastian Harl1-17/+37
2012-06-06check_dbi: Added threshold ranges for the connection time.Sebastian Harl1-7/+45
The -W and -C options are used for that. The plugin return value is determined by the worst check result.
2012-06-06check_dbi: Include extra opts in help output.Sebastian Harl1-0/+5
2012-06-06Initial version of the 'check_dbi' plugin.Sebastian Harl1-0/+516
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.