Subject monitoring firebirdsql with opensource tool ?
Author jul_bsd
Hello,

I'm trying to improve a setup w firebirdsql 2.1 / windows by adding some monitoring.
Ideally, I want to use cacti (cacti.net) to graph any numbers like mysql/postgresql [1] but it doesn't seem there is any existing stuff [2].

After looking on the net, I got a few interesting references
* README.monitoring_tables.txt (from package)
* http://blog.upscene.com/thomas/search.php?q=monitoring

From that, using monitoring tables, I have selected the following sql requests as interesting
SQL> SELECT MON$DATABASE_NAME, MON$OLDEST_TRANSACTION, MON$OLDEST_ACTIVE, MON$OLDEST_SNAPSHOT, MON$NEXT_TRANSACTION, MON$SHUTDOWN_MODE, MON$BACKUP_STATE FROM MON$DATABASE WHERE MON$DATABASE_NAME = '/opt/tmp/firebirdsql/employee.fdb';
=> for DB performance
SQL> SELECT MON$STAT_ID, MON$STAT_GROUP, MON$PAGE_READS, MON$PAGE_WRITES, MON$PAGE_FETCHES, MON$PAGE_MARKS FROM MON$IO_STATS;
=> for I/O performance
SQL> SELECT MON$STAT_ID, MON$STAT_GROUP, MON$RECORD_INSERTS, MON$RECORD_UPDATES, MON$RECORD_DELETES, MON$RECORD_BACKOUTS, MON$RECORD_PURGES, MON$RECORD_EXPUNGES FROM MON$RECORD_STATS;
=> SQL operations stats (backouts are rollbacks ?)
SQL> SELECT MON$USER, MON$REMOTE_ADDRESS, MON$REMOTE_PID, MON$TIMESTAMP FROM MON$ATTACHMENTS WHERE MON$ATTACHMENT_ID <> CURRENT_CONNECTION;
=> users connected

2 questions
* other interesting requests ? to prevent or diagnose quickly problems ?
* I'm not sure to understand stat_id/stat_group. is it better to keep separated each one or aggregate all of them in one (graph) ?

Thanks for any input.
Cheers,

Julien

[1] http://forums.cacti.net/viewtopic.php?f=12&t=23300&hilit=monitor+postgresql
[2] just found a nagios check script:
http://exchange.nagios.org/directory/Plugins/Databases/check_firebird-2Epl/details