Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_firebird.sh
0.03
2014-09-20
- Nagios 1.x
- Nagios 2.x
- Nagios 3.x
- Nagios 4.x
GPL
18690
File | Description |
---|---|
check_firebird.sh | check_firebird.sh |
check_firebird -u user -p password -H host -a action
Options:
-H/--host)
Host Name of the server
-u/--user)
User name for authentication on Tomcat Manager Application
-p/--password)
Password for authentication on Tomcat Manager Application
-d/--database)
Database
-a/--action)
Actions (connection, timesync, custom_query)
connection - Test connection
timesync - Verifies the connection between the server and the database
custom_query - Customized query. Required --query option
-q/--query)
SQL query returning a specified by --valype value
-v/--valtype)
Specifies the value returned
seconds - expects a value in seconds
-w/--warning and -c/--critical necessary.
days - expects a value in days
-w/--warning and -c/--critical necessary.
integer - expects a value integer
-w/--warning and -c/--critical necessary.
string - under construction
-e/--expected) Expect string
Performs check in FirebirdSQL server.
Checks connection to database
Timing checks between FirebirdSQL server and local server time
Allows the query of queries with customizable return in: integer or string or seconds or days
Plugin development.
If you want to help, go https://github.com/clebersonborges/check_firebird
Examples (https://github.com/clebersonborges/check_firebird/wiki)
Connection
/usr/lib/nagios/plugins/check_firebird.sh -H localhost -u SYSDBA -p password -d database -a custom_query -a connection
FIREBIRD_CONNECTION OK: DB "database" (host:localhost) successfully established.
Timsesync
/usr/lib/nagios/plugins/check_firebird.sh -H localhost -u SYSDBA -p password -d database -a custom_query -a timesync -w 1 -c 60
POSTGRES_TIMESYNC WARNING: Database: "database" (host:localhost) timediff=5 DB=2014-09-20 22:24:09.2150 Local=2014-09-20 22:24:14.1411262654
Custom query
Integer
/usr/lib/nagios/plugins/check_firebird.sh -H localhost -u SYSDBA -p password -d database -a custom_query --query "select count(*) from usuarios;" --valtype integer -w 5 -c 20
Seconds
/usr/lib/nagios/plugins/check_firebird.sh -H localhost -u SYSDBA -p password -d database -a custom_query --query "select lastlogin from vw_entry_system;" --valtype seconds -w 30 -c 120
String
/usr/lib/nagios/plugins/check_firebird.sh -H localhost -u SYSDBA -p password -d database -a custom_query --query "select * from users;" --valtype string -e "Golias"
Checks connection to database
Timing checks between FirebirdSQL server and local server time
Allows the query of queries with customizable return in: integer or string or seconds or days
Plugin development.
If you want to help, go https://github.com/clebersonborges/check_firebird
Examples (https://github.com/clebersonborges/check_firebird/wiki)
Connection
/usr/lib/nagios/plugins/check_firebird.sh -H localhost -u SYSDBA -p password -d database -a custom_query -a connection
FIREBIRD_CONNECTION OK: DB "database" (host:localhost) successfully established.
Timsesync
/usr/lib/nagios/plugins/check_firebird.sh -H localhost -u SYSDBA -p password -d database -a custom_query -a timesync -w 1 -c 60
POSTGRES_TIMESYNC WARNING: Database: "database" (host:localhost) timediff=5 DB=2014-09-20 22:24:09.2150 Local=2014-09-20 22:24:14.1411262654
Custom query
Integer
/usr/lib/nagios/plugins/check_firebird.sh -H localhost -u SYSDBA -p password -d database -a custom_query --query "select count(*) from usuarios;" --valtype integer -w 5 -c 20
Seconds
/usr/lib/nagios/plugins/check_firebird.sh -H localhost -u SYSDBA -p password -d database -a custom_query --query "select lastlogin from vw_entry_system;" --valtype seconds -w 30 -c 120
String
/usr/lib/nagios/plugins/check_firebird.sh -H localhost -u SYSDBA -p password -d database -a custom_query --query "select * from users;" --valtype string -e "Golias"
Reviews (1)
Thanks to author, he helped me a lot.