Skip to content

lsgalves/zabbix_firebird_odbc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Firebird by ODBC

Overview

For Zabbix version: 5.4 and higher The template is developed for monitoring Firebird via ODBC.

This template was tested on:

  • Firebird, version 2.5, 3

Setup

See Zabbix template operation for basic instructions.

  1. Set the dsn in host macros ({$Firebird.DSN}). Do not forget to install Firebird ODBC driver on Zabbix server or Zabbix proxy. See Firebird documentation for instructions: https://firebirdsql.org/file/documentation/html/en/refdocs/fbodbc20/firebird-odbc-driver-20-manual.html

Zabbix configuration

No specific Zabbix configuration is required.

Author

Leonardo Galves

Macros used

Name Description Default
{$FIREBIRD.CONNECTION.MAX}

The maximum connections - for the trigger expression.

60
{$FIREBIRD.DSN}

System data source name.

<Put your DSN here>
{$FIREBIRD.IDLE_CONNECTION.WARN}

The maximum idle connections stalled to warning - for the trigger expression.

30
{$FIREBIRD.STALLED_STATEMENTS.MAX}

The maximum stalled statements - for the trigger expression.

10

Template links

There are no template links in this template.

Discovery rules

There are no discovery rules in this template.

Items collected

Group Name Description Type Key and additional info
Zabbix raw items Firebird: Get performance counters

The item gets server global status information.

ODBC db.odbc.get[get_status_variables,"{$FIREBIRD.DSN}"]

Expression:

The text is too long. Please see the template.
Firebird Firebird: Version

Firebird Server version.

DEPENDENT firebird.version

Preprocessing:

- JSONPATH: $[?(@.COUNTER_NAME=='Version')].CNTR_VALUE.first()

- DISCARD_UNCHANGED_HEARTBEAT: 1d

Firebird Firebird: Total active transactions

The number of currently active transactions of all types.

DEPENDENT firebird.transactions

Preprocessing:

- JSONPATH: $[?(@.COUNTER_NAME=='Active Transactions')].CNTR_VALUE.first()

Firebird Firebird: Stalled statements

The number of stalled statements.

DEPENDENT firebird.stalled_statements

Preprocessing:

- JSONPATH: $[?(@.COUNTER_NAME=='Stalled Statements')].CNTR_VALUE.first()

Firebird Firebird: Running statements

The number of running statements.

DEPENDENT firebird.running_statements

Preprocessing:

- JSONPATH: $[?(@.COUNTER_NAME=='Running Statements')].CNTR_VALUE.first()

Firebird Firebird: Page writes

Number of page writes in the database.

DEPENDENT firebird.page_writes

Preprocessing:

- JSONPATH: $[?(@.COUNTER_NAME=='Page Writes')].CNTR_VALUE.first()

Firebird Firebird: Pages allocated externally

The number of external pages allocated.

DEPENDENT firebird.external_pages

Preprocessing:

- JSONPATH: $[?(@.COUNTER_NAME=='Pages Allocated Externally')].CNTR_VALUE.first()

Firebird Firebird: Page fetches

Number of page fetches in the database.

DEPENDENT firebird.page_fetches

Preprocessing:

- JSONPATH: $[?(@.COUNTER_NAME=='Page Fetches')].CNTR_VALUE.first()

Firebird Firebird: Open connections

Number of currently open connections.

DEPENDENT firebird.open_connections

Preprocessing:

- JSONPATH: $[?(@.COUNTER_NAME=='Open Connections')].CNTR_VALUE.first()

Firebird Firebird: Idle connections

Number of currently idle connections.

DEPENDENT firebird.idle_connections

Preprocessing:

- JSONPATH: $[?(@.COUNTER_NAME=='IDLE Connections')].CNTR_VALUE.first()

Firebird Firebird: Database state

Database state:

0 - Online;

1 - Multi-user shutdown;

2 - Single-user shutdown;

3 - Full-shutdown;

DEPENDENT firebird.database_state

Preprocessing:

- JSONPATH: $[?(@.COUNTER_NAME=='Database State')].CNTR_VALUE.first()

Firebird Firebird: Database page size

The number of pages configured to use for the database.

Allowed page sizes: 4096, 8192, 16384 or 32768 (>= Firebird 4)

DEPENDENT firebird.page_size

Preprocessing:

- JSONPATH: $[?(@.COUNTER_NAME=='Database Page Size')].CNTR_VALUE.first()

Firebird Firebird: Database memory usage

Database memory usage in bytes.

DEPENDENT firebird.memory_usage

Preprocessing:

- JSONPATH: $[?(@.COUNTER_NAME=='Database Memory Used')].CNTR_VALUE.first()

Firebird Firebird: Database creation date

The date and time when the database was created or was last restored.

DEPENDENT firebird.database_date

Preprocessing:

- JSONPATH: $[?(@.COUNTER_NAME=='Database Creation Date')].CNTR_VALUE.first()

Firebird Firebird: Database allocated pages

The number of allocated pages in the database.

DEPENDENT firebird.allocated_pages

Preprocessing:

- JSONPATH: $[?(@.COUNTER_NAME=='Database Allocated Pages')].CNTR_VALUE.first()

Firebird Firebird: Backup state

Backup state:

0 - Normal;

1 - Stalled;

2 - Merge;

DEPENDENT firebird.backup_state

Preprocessing:

- JSONPATH: $[?(@.COUNTER_NAME=='Backup State')].CNTR_VALUE.first()

- REPLACE: 0 Normal

- REPLACE: 1 Stalled

- REPLACE: 2 Merge

Triggers

Name Description Expression Severity Dependencies and additional info
Firebird: Database has restored

Firebird database has restored.

last(/Firebird by ODBC/firebird.database_date,#1)<>last(/Firebird by ODBC/firebird.database_date,#2) and length(last(/Firebird by ODBC/firebird.database_date))>0 INFO

Manual close: YES

Firebird: Database is down

The Firebird Database is shutdown. (The current state is {ITEM.VALUE}):

0 - The database is online;

1 - Multi-user shutdown;

2 - Single-user shutdown;

3 - Full shutdown.

last(/Firebird by ODBC/firebird.database_state)<>0 HIGH
Firebird: Number of connections too high (over {$FIREBIRD.CONNECTION.MAX} for 5m)

Too high number of connections.

min(/Firebird by ODBC/firebird.open_connections,5m)>{$FIREBIRD.CONNECTION.MAX} AVERAGE
Firebird: Number of idle connections too high (over {$FIREBIRD.IDLE_CONNECTION.WARN} for 5m)

Too high number of idle connections.

min(/Firebird by ODBC/firebird.idle_connections,5m)>{$FIREBIRD.IDLE_CONNECTION.WARN} WARNING
Firebird: Number of stalled statements too high (over {$FIREBIRD.STALLED_STATEMENTS.MAX} for 5m)

Too high number of stalled statements.

min(/Firebird by ODBC/firebird.stalled_statements,5m)>{$FIREBIRD.STALLED_STATEMENTS.MAX} AVERAGE
Firebird: Physical Backup (nBackup) is running (the state is: {ITEM.VALUE})

Firebird database is running nBackup. Backup state:

0 - Normal;

1 - Stalled;

2 - Merge;

last(/Firebird by ODBC/firebird.backup_state,#1)<>last(/Firebird by ODBC/firebird.backup_state,#2) INFO

Manual close: YES

Firebird: Version has changed (new version value received: {ITEM.VALUE})

Firebird version has changed. Ack to close.

last(/Firebird by ODBC/firebird.version,#1)<>last(/Firebird by ODBC/firebird.version,#2) and length(last(/Firebird by ODBC/firebird.version))>0 INFO

Manual close: YES

References

https://firebirdsql.org/file/documentation/chunk/en/refdocs/fblangref25/fblangref25-appx05-montables.html