Databases

check_bdd_request

Description:

Check if the result of a MySQL request is ==, , than a number which is warning and/or critical when check_type=NUMERIC.
This plugin could return a result of a SQL request for information only with check_type=TEXT.
It works with MySQL only for now, but it’s very simple to use another database.
This plugin requires that perl, perl-DBD-MySQL, perl-DBI package are installed on the system.
If you have specifics needs, this plugin browse the result of your query and you can make the treatment you want ! You just have to known base in PERL.
You really can do what you want, you just add a new function !

Current Version

1.0

Last Release Date

2013-03-01

Compatible With

  • Nagios 3.x

License

GPL


Project Files
Project Notes
Usage: ./check_bdd_request.pl -H -u -p -d -P -q request -t check_type -o [-w -c -T ] -V -h, --help print this help message -H, --hostname=HOST name or IP address of MySQL server -u, --user=USER mysql user to login -p, --password=PASSWORD mysql password -d, --database=DATABASE mysql database name -P, --port=PORT Http port -q, --request="REQUEST" Request to execute on the server -t, --check_type=TYPE Type of return : NUMERIC, TEXT -o, --operator=OPERATOR Operator : EQ for =, LT for <, GT for >, LE for <=, GE for >=, DIF for != -w, --warn=INTEGER number that will cause a warning completed by the OPERATOR -1 for no warning -c, --critical=INTEGER number that will cause an error completed by the OPERATOR -T, --timeout=INTEGER timeout in seconds (Default: 15) -V, --version prints version number Note : The script will return * With warn and critical options: OK if we are able to connect to the MySQL server and #request count result respect , WARNING if we are able to connect to the MySQL server and #request count result unrespect , CRITICAL if we are able to connect to the MySQL server and #request count result unrespect , UNKNOWN if we aren't able to connect to the MySQL server Commands.cfg : # 'check_bdd_request_numeric' command definition define command{ command_name check_bdd_request_numeric command_line $USER1$/check_bdd_request.pl -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -d $ARG3$ -P $ARG4$ -q $ARG5$ -t $ARG6$ -o $ARG7$ -w $ARG8$ -c $ARG9$ } # 'check_bdd_request_text' command definition define command{ command_name check_bdd_request_text command_line $USER1$/check_bdd_request.pl -H $HOSTADDRESS$ -u $ARG1$ -p $ARG2$ -d $ARG3$ -P $ARG4$ -q $ARG5$ -t $ARG6$ } Services.cfg : define service{ use generic-service host_name my_bdd_server service_description A text value for display information like a version for example check_command check_bdd_request_text!user!password!database!port!"Select column_name from my table where row_text='value'"!TEXT normal_check_interval 60 } define service{ use generic-service host_name my_bdd_server service_description A numeric value for display information and compare with operator to the Warning or Critical values check_command check_bdd_request_text!user!password!database!port!"Select column_name from my table where row_text='value'"!NUMERIC!LT!2!5 normal_check_interval 60 } For more informations : http://www.slobberbone.net/dotclear/index.php?pages/check_bdd_request
Reviews (0) Add a Review
Add a Review

You must be logged in to submit a review.

Thank you for your review!

Your review has been submitted and is pending approval.

Recommend

To:


From:


Thank you for your recommendation!

Your recommendation has been sent.

Project Stats
Rating
0 (0)
Favorites
0
Views
44,419