Nagios plugin for Firebird
|
|
Monitor your Firebird
databases, free disk space, CPU load... |
What is Nagios?
Nagios is an open source host, service and network monitoring program.Requirements for plugin
If you wish you can use the
precompiled version (The file check_firebird
in package). Try if it works, copy it to "libexec" directory of
you Nagios instalation, and read the usage instructions how to set it
up.
To build from the source edit the Makefile and write the correct path
to your IBPP instalation. Then run: "make static".
If all goes well, you will have check_firebird executable. Just copy it
to "libexec" directory of your Nagios instalation (usually
/usr/local/nagios/libexec).
Command-line usage
check_firebird [-v|-h] -H host [-P
port] [-D database] -u username -p password
-v verbose
-h help
-H hostname(1)
-D database(2)
-u valid Firebird username (like SYSDBA for example)
-p valid Firebrid password (like masterkey for
example)
(1) To use direct local connection or test the embedded server, don't
use -H switch
(2) If omitted, it only checks for server availability, some older
versions like Firebird 1.0 ClassicServer don't have Services API, so
you can only use the plugin with -D option
Final setup
To use the plugin, you should add
the following entries to checkcommands.cfg in "etc"
directory of your Nagios instalation:
# 'check_firebird' command
definition
define command{
command_name check_firebird
command_line $USER1$/check_firebird -H $HOSTADDRESS$
-u $ARG1$ -p $ARG2$
}
# 'check_firebird_database'
command definition
define command{
command_name check_firebird_database
command_line $USER1$/check_firebird -H $HOSTADDRESS$
-u $ARG1$ -p $ARG2$ -D $ARG3$
}
These are few example configs you need to put in your services.cfg file.
Monitoring Firebird SuperServer1.0 or higher:
define service{
use
generic-service ;
template
host_name
localhost
service_description
Firebird
is_volatile
0
check_period
24x7
max_check_attempts
3
normal_check_interval
5
retry_check_interval
1
contact_groups
root
notification_interval
120
notification_period
24x7
notification_options
w,u,c,r
check_command
check_firebird!SYSDBA!masterkey
}
Monitoring database on any Firebird server:
define service{
use
generic-service ;
template
host_name
somehost
service_description
MyDatabase
is_volatile
0
check_period
24x7
max_check_attempts
3
normal_check_interval
5
retry_check_interval
1
contact_groups
root
notification_interval
120
notification_period
24x7
notification_options
w,u,c,r
check_command
check_firebird_database!SYSDBA!masterkey!/opt/firebird/examples/employee.fdb
}
Licence
Links