Nagios plugin for Firebird

Firebird IBPP  

Monitor your Firebird databases, free disk space, CPU load...  


[ Home ] [ Download ] [ Project page ]


What is Nagios?

Nagios is an open source host, service and network monitoring program.
Learn more about it at www.nagios.org
.


Requirements for plugin

To compile this plugin you need to have IBPP library installed on your sistem. Fetch .zip source package from www.ibpp.org, unpack it, and run "make". In most cases it should build out-of-the-box. If not, edit the Makefile. You may get some errors that it cannot build the test programs, but if the main build is successful, feel free to ignore it.

To run it, you need to have Firebird client library installed on your system. It is named libgds.so or libfbclient.so or libfbembed.so depending on the version.



Installing 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

This plugin is released under Mozilla Public licence, version 1.0


Links



Copyright © Milan Babuškov 2005. (e-mail)