HQbird server health
Server health in one minute
Every minute, the agent collects data about the server, the OS, the disks and the Firebird databases. Every 10 minutes, it compares this data with thresholds and writes a status snapshot. You open the report and see at once what broke, when, and what to do.
- 1 min server and database metrics
- 10 min status snapshot
- 18 systems in the report
- 24 h · 7 · 14 days history
- read-only monitoring changes nothing on the server
Scenario
An administrator's minute
Morning. Users say that everything was slow last night. Four HQ Monitor screens give the answer before your coffee gets cold.
server_status
How data is collected
The agent runs on the Firebird server and reads data where it is: OS counters, cgroup and ETW, the MON$ monitoring tables, trace, firebird.log, database headers, and the results of its own jobs. No separate monitoring server and no agents inside the databases.
Once every 10 minutes, the agent puts everything into a status snapshot. Each check has two thresholds: warning and serious. Each finding has a key, a text and a hint. A new problem appears after two snapshots in a row, so after about 20 minutes. An emergency, for example OOM or database corruption, appears at once. The snapshot goes to HQ Monitor together with the other data.
- 1Collectevery minute: CPU, memory, disks, connections, transactions
- 2Snapshotevery 10 minutes, averages and peaks for 10 minutes
- 3Thresholdswarning and serious; set in the agent settings
- 4Findingwhat was found, where, a hint, an action button
- 5✓ Reportmatrix for 24 h, 7 or 14 days; email from HQCenter
Heavy jobs of the agent itself (backup, sweep, database check, disk test) are marked on the charts. A slow minute during a backup is not counted as a user problem.
CPU · memory · programs
Server and OS
A slow database is often not the fault of Firebird. HQ Monitor shows not only the server load, but also who creates it: Firebird, the agent itself, or other programs and services.
| What you see | Details | Default threshold |
|---|---|---|
| Firebird version and folder | The version string in the server list; the version and install folder on the dashboard. | — |
| CPU and load average | Every minute. CPU by program for 10 minutes: Firebird, the agent, others, short-lived processes. | 80% · 97% |
| Memory | Used, swap, memory pressure (PSI on Linux). Memory by service (Linux) or by program (Windows), file cache, kernel. | 80% · 96% |
| OOM and swap | Linux only: processes killed by the OOM killer, and active swap. | any OOM — serious |
| Firebird in the OS cache | Linux only, kernel 6.5+: how much of each database file is in the OS cache, and whether the file is open with O_DIRECT. | — |
| Firebird memory and MON$ | The memory of the Firebird process next to what Firebird itself counts in MON$MEMORY_USAGE. | — |
| File system | Once a day: file system type and cluster size for the Firebird, database and agent folders. | finding with the path |
TasksMax · NPROC · NOFILE · threads-max
OS limits: the failure before the failure
“Firebird crashed under load” often means: an OS limit ran out. Firebird cannot create a thread or a process, new connections fail, and pthread_create failed appears in firebird.log.
On Linux, the agent compares each Firebird server with the OS limits once a minute. Warning from 80% of the limit, serious from 95%, by the peak for 10 minutes. The finding appears after two snapshots in a row. If a limit has already refused to create a process, this is serious at once, with no wait.
The agent only reads: it does not change limits, does not need root and does not call systemctl. The hint of the finding gives a ready command for the administrator.
A sample case: TasksMax = 4915, 3 threads per connection. Classic starts a process for each connection, so it hits TasksMax first.
| Limit | Where it is set | What happens when it runs out |
|---|---|---|
| Tasks of the Firebird service | TasksMax of the service or the parent slice | Classic cannot accept a new connection |
| Tasks of the Firebird user | LimitNPROC, limits.d | Thread creation is refused |
| Tasks of the whole host | kernel.threads-max, pid_max | Refused for all programs; threads-max is calculated from RAM at boot |
| Open files | LimitNOFILE | SuperServer and SuperClassic hit this limit first |
| Memory | service memory limit, RAM | The OOM killer kills the process |
- Which level limitsThe service or the parent slice, for example system.slice.
- The agent's own shareIts tasks and its child gbak and fbsvcmgr processes are counted separately.
- For ClassicThreads per connection and how many more connections the limit allows.
- No finding, for analysisTasks waiting for the disk, and CPU time taken by the hypervisor (steal).
Space · temp · IO · latency
Disks
The agent knows the role of each disk: it holds databases, Firebird temporary files or the install folder. For these disks, it counts free space, the fill forecast, read and write latency, IOPS, and who loads the disk.
- Free spaceWarning below 5 GB, serious below 1 GB. For each folder, you see which disk it is on.
- Fill percentageWarning: the disk is 90 % full and less than 20 GiB is free. Serious: 97 % and less than 5 GiB. Both conditions are needed, so a large disk with spare space does not give a false alarm.
- Disk fills fastWarning if, at the current speed, the disk fills in less than 6 hours; serious if in less than 2. A normal nightly backup does not raise an alarm. The finding names who wrote to the disk in the last 10 minutes.
- Firebird temporary filesHow many and how large, by type: sort, blob, undo, lock. Warning from 10 GB, serious from 50 GB. You see if temp and the databases are on the same disk.
- Performance testOnce a week at night: INSERT, UPDATE and DELETE of a million records in a temporary database. You can compare the results of different weeks.
- Latency and IOPSEvery minute for disks with databases and temp. Read: warning from 20 ms, serious from 50 ms. Write: warning from 10 ms, serious from 30 ms. Average for 10 minutes, at 10 IOPS or more. A disk with temp only — not above warning.
- Disk full: entry in firebird.logA “no space” error in
firebird.loggives serious at once and stays for 24 hours. The finding names the disk with the least free space. - Disk name in WindowsThe disk is named by its letter and volume label, for example
b: (DATA, Disk 2, database), not by the volume GUID.
If Firebird does less than 20% of the disk reads or writes, another program loads the disk. Then the hint of the finding names the main “neighbor” on the disk and the Firebird share. The agent writes the hint text in English.
Who loads the disk
On Linux by systemd service, on Windows by process. The Firebird row is highlighted. If Firebird reads and writes little but the disk is busy, the cause is a neighbor program: an antivirus, a foreign backup, another service. On Windows, writes go through the system cache, so there the Firebird share is counted by reads only.
Header · LWM · MON$ · gstat
Databases
Each database on the server has its own page: size, state, sweep, page size, dialect, owner, whether it has its own security DB. Four charts by minute: connections and queries, transactions, page reads and writes, query prepare and execute.
The agent takes the state from MON$DATABASE or from the file header, whichever is newer: shutdown, read-only, replica, nbackup lock. The header can be read without a connection. So a database in shutdown is also visible, even though it has no connections. A click on a minute in the chart opens the heavy queries from trace and all connections of that minute.
Transactions: a signal before the slowdown
Next − OAT grows while one transaction stays open for a long time. Record versions pile up, and the database starts to slow down. Warning at a gap of 4 million, serious at 8 million. The long transaction is easy to find in the connections table. OST − OIT grows when garbage collection cannot keep up, for example when a sweep is needed.
- MON$ metricsOnce an hour for active databases: record operations, memory by program, the heaviest connections.
- Client versionsOnce a day: which client libraries connect and how many connections each one has.
- gstat with analysisThe number of critical findings and warnings for tables and indexes.
- Growth forecast“+25% in N days” for the fastest-growing table or index; red if 30 days or less.
server_status
Server health report
Rows are server systems, columns are time. For 24 hours a cell is one hour, for 7 days it is 4 hours, for 14 days it is 6 hours. A cell shows the worst level for this time. Red is serious, orange is warning, green is OK. A click on a cell opens the snapshot for that moment.
New, worse, gone
The history panel shows when a finding appeared, got more severe and went away. A one-time error in the log is visible at once and stays for one hour, with the time of the entry in the text.
How long the problem lasted
Time in each level and a table of problems: start, end, duration, system. “Still active” is visible at once.
Cause, hint, button
The finding text names the object: disk, folder, database, user, program, client version, query. Each hint names an action. Next to it is a button: add a backup task, set the backup search folders, open a task or a setting.
- 18 systemsServer, CPU, Memory, OS limits, Disks, Disk speed, firebird.log, Trace errors, Transactions and GC, Locks, Queries, Connections, Indexes, Backups, fbagent jobs, Replication, fbagent agent, Security and license. If there are other findings, an “Other findings” row appears.
- Thresholds on the chartFor CPU, memory and disk speed, you see the warning and serious lines.
- Tables in the panelsDisks: volumes and temp folders. Transactions: databases with an OIT/OAT gap and long transactions with the user and the process. Replication: masters and replicas with lag. Agent: its health, file queues and main jobs.
- One card for a group of findingsThree or more findings of the same kind and the same level are shown as one card. The value stands next to the threshold: “476.5 MiB / 1 GiB”.
- Errors, queries, backupsFrequent trace errors, the slowest queries with a link to Perf Report, a table of backup findings.
- Data sourcesFor each source: the state and the age of the data. The state is in English, for example stale or missing. A stale or missing source is highlighted. A silent agent does not look like “all is well”.
- What does not raise a false alarmThe processing queue of the agent is not above warning. A stopped Firebird does not make the state of the agent itself serious: this is a separate finding.
- Headline on the dashboardNext to the “Server status” icon there is one line: the main finding and the systems with findings. A click opens this report.