News

Standalone Monitoring for Firebird

 

How to install and configure Firebird Advanced Monitoring standalone

1. Installation

1.1. Register on “Online Tools For Firebird” to get file keyanswers.txt

In order to use the advanced monitoring, you need to create free account on the portal “Online Tools For Firebird”: https://cc.ib-aid.com/, and then download file keyanswers.txt to link your account and servers.

For users who use private Control Center, the appropriate account must be created by the administrator.

1.1.1. Steps to register

1. Open https://cc.ib-aid.com/ and click Create new account:

Register to Online Tools For Firebird

2. Then, specify the valid email, username and company (optional):
Fill out registration form

3. After that, wait 2-3 minutes to receive confirmation email, and click on confirmation link. It will open the form, where you need to enter password and its confirmation, after that you can login to “Online Tools For Firebird” portal.

1.1.2. Download keyanswers.txt

After login you will see the widget “Download Firebird Monitoring Agents”:
Download keyanswers.txt from Online Tools
Download agent for the necessary OS (at the moment only Windows versions 7+/ Server 2008+ are supported and Linux with systemd).
Also, download file keyanswers.txt.
Keyanswers.txt contains necessary information to link Control Center account and Advanced Monitoring then proceed with the installation.

1.2. Installation on Windows

The agent distribution for Advanced Monitoring on Windows is the zip archive file: install_fbcc.zip.

Unzip installation archive fbcc.zip to the Firebird folder, for example, C:\Program Files\Firebird\Firebird_3_0\fbcc, and then copy to folder fbcc the file keyanswers.txt from the previous step.
As a result, the folder should look like this:

Folder with Advanced Monitoring files should be inside Firebird folder:

Also, make sure that keyanswers.txt resides in the folder with advanced monitoring files:
Keanswers in the fbcc folder

Then, run command file install_fbcc.cmd with the option “Run As Administrator”. The cmd file will do the following:
  1. create 2 services: FBHQbird Monitor 4 and FBHQbird Trace 4
  2. create job in Task Scheduler to restart monitoring at 23:50
  3. Find Firebird (if it is located in the standard path) and configure it. Advanced Monitoring installation automatically tries to configure access to Firebird with the default user/password and checks the connection to the example database employee.fdb. If your owner user is not SYSDBA or password is not masterkey, installation will ask to provide user and password.
  4. Connect to Control Center portal, specified in keyanswers.txt and register the server in your account there.

1.2.1. Installation with default SYSDBA/masterkey

Below is the example of installation log from the Firebird with default user/password (SYSDBA/masterkey):
c:\Firebird30\fbcc>install_fbcc.cmd
The Service FBHQbirdMON4 has been installed
2022-02-12 09:41:40 ERROR MainCreateConf:287 - Not found location, return empty string

Checking access to Firebird Monitoring Portal...
Connected to Portal: Ok
Determined architecture: SuperServer and version: 3.0.6
Verified connection with Firebird user: SYSDBA: Ok.
Using autodiscovery to watch for all active databases.

Registering server in Firebird Monitoring Control Center
Registered new server with name=SRV-DESKTOP-NS28RCG-2202012214,  GUID=99c54d1jjqxj0r   (id=314285)
Successful! Now you can see your server in Firebird Control Center: https://cc.ib-aid.com
The Service FBHQbirdTrace4 has been installed
SUCCESS: The scheduled task "Restart Mon4 Service (Firebird Monitoring)" has successfully been created.
The FBHQbird Monitor 4 service is starting.
The FBHQbird Monitor 4 service was started successfully.

The FBHQbird Trace 4 service is starting.
The FBHQbird Trace 4 service was started successfully.

c:\Firebird30\fbcc>

1.2.2. Installation with custom username/password

In case of non-default username and/or password, you will be asked to enter them during the installation process in cmd.

1.2.3. Uninstallation of Advanced Monitoring on Windows

If you make mistake during the installation, or see any error, or just decided to remove Advanced Monitoring agent, run remove_fbcc.cmd, which will stop and remove service and task scheduler task, the uninstall log will be like this:
c:\Firebird30\fbcc>remove_fbcc.cmd
The FBHQbird Monitor 4 service is stopping.
The FBHQbird Monitor 4 service was stopped successfully.

The FBHQbird Trace 4 service is stopping.
The FBHQbird Trace 4 service was stopped successfully.

The FBHQbird Monitor 4 service is not started.

More help is available by typing NET HELPMSG 3521.

[SC] DeleteService SUCCESS
The FBHQbird Trace 4 service is not started.

More help is available by typing NET HELPMSG 3521.

[SC] DeleteService SUCCESS
SUCCESS: The scheduled task "Restart Mon4 Service (Firebird Monitoring)" was successfully deleted.
c:\Firebird30\fbcc>

 

1.3. Installation on Linux

Download file install_fbcc.sh from “Online Tools For Firebird” (see 1.1.2 for details):
sudo wget https://ib-aid.com/download/fbcc/install_fbcc.sh
This file contains installer of Advanced Monitoring for Firebird for Linux.
The installer will install necessary files into the location /opt/fbcc, so make sure you have enough free space there.

1.3.1 Prerequisites: Java 8 and jsvc

Java 8

You need to have Java 8 installed on the server where you need to run monitoring.
We recommend to install OpenJDK 8 Correto (from Amazon):

wget -O- https://apt.corretto.aws/corretto.key | sudo apt-key add - 
 sudo add-apt-repository 'deb https://apt.corretto.aws stable main'

sudo apt-get update; sudo apt-get install -y java-1.8.0-amazon-corretto-jdk
More details: https://docs.aws.amazon.com/corretto/latest/corretto-8-ug/generic-linux-install.html

jsvc

jsvc is a tool to launch java application as a service, it is used by Firebird Advanced Monitoring agent.

Install jsvc on CentOS

yum install jsvc
on Ubuntu
apt install jsvc

1.3.3. Put keyanswers.txt near install_fbcc.sh

Get keyanswers.txt from 1.1.2 and put it near the install_fbcc.sh

Please note, that there is no wget command, since keynaswers.txt is generated on the portal dynamically and requires the registered user to login and download. <4>1.3.4. Steps to install Make the installation script executable:

sudo chmod +x install_fbcc.sh

Run the installation:
sudo install_fbcc.sh
This is the example what files should be in place before the installation:
total 18624
drwxr-xr-x  3 root root     4096 May  3 23:32 ./
drwxr-xr-x 20 root root     4096 Feb 14 02:06 ../
drwxr-xr-x 12 root root     4096 May  3 23:19 firebird/
-rwxr-xr-x  1 root root 19050609 Sep 29  2021 install_fbcc.sh*
-rwxrwxrwx  1 root root      110 May  3 23:26 keyanswers.txt*
After that, run install_fbcc.sh.

Please note that script expects vanilla Firebird to be installed manually in /opt/firebird from the official tar archive.

If you have installed Firebird from repository, we recommend to ununinstall it and install from official tar archive from www.firebirdsql.org web site.

2. Troubleshooting

General advice for successful troubleshooting

Check *.log files in Bin folder of Firebird Monitoring installation.
Log files have names according the jar name, i.e., for launcher will be launcher.log.
Log files by default contain errors and important messages.

Problem: installation attempt without keyasnwers.txt

If you did not put file keyanswers.txt in the same folder as install_fbcc.cmd (on Windows) or install_fbcc.sh (on Linux), the services will be installed,but not configured:
c:\Firebird30\fbcc>install_fbcc.cmd
The Service FBHQbirdMON4 has been installed

 Installation stopped: keyanswers.txt file not found near install_fbcc.cmd.
 Please download it from cc.ib-aid.com or use manual mode installation.
 To try installation again, run remove_fbcc script and then install_fbcc again.
Solution:
run uninstall command file (uninstall.cmd on Windows, use right-click and option “Run As Administrator”, or uninstall.sh in /opt/fbcc/uninstall.sh on Linux). It will uninstall monitoring with output like this:
c:\Firebird30\fbcc>remove_fbcc.cmd
The FBHQbird Monitor 4 service is not started.

More help is available by typing NET HELPMSG 3521.

The FBHQbird Trace 4 service is not started.

More help is available by typing NET HELPMSG 3521.

The FBHQbird Monitor 4 service is not started.

More help is available by typing NET HELPMSG 3521.

[SC] DeleteService SUCCESS
The FBHQbird Trace 4 service is not started.

More help is available by typing NET HELPMSG 3521.

[SC] DeleteService SUCCESS
SUCCESS: The scheduled task "Restart Mon4 Service (Firebird Monitoring)" was successfully deleted.
C:\fbcc>
After that, put keyanswers.txt to the folder near install_fbcc.cmd and install again.

Problem: installation package cannot find Firebird folder

In case if monitoring installation package will not Firebird folder, it will give the following output:
c:\Firebird30\fbcc>install_fbcc.cmd 

The Service FBHQbirdMON4 has been installed
2022-02-12 09:11:23 ERROR MainCreateConf:287 - Not found location, return empty string
2022-02-12 09:11:23 ERROR MainCreateConf:287 - Not found location, return empty string
2022-02-12 09:11:23 ERROR MainCreateConf:287 - Not found location, return empty string

Checking access to Firebird Monitoring Portal...
Connected to Portal: Ok
2022-02-12 09:11:24 ERROR MainCreateConf:592 - Cannot find test database - setting version to 3.0.0 and arch to Classic
Paths checked:
2022-02-12 09:11:24 ERROR MainCreateConf:594 - /../examples/empbuild/employee.fdb
2022-02-12 09:11:24 ERROR MainCreateConf:594 - /../help/help.fdb
2022-02-12 09:11:24 ERROR MainCreateConf:594 - /examples/empbuild/employee.fdb
2022-02-12 09:11:24 ERROR MainCreateConf:594 - /help/help.fdb

Please enter owner user for Firebird databases, or hit Enter to use SYSDBA
The messages above “Not found location, return empty” indicate that installation script did not find Firebird in the following paths on Windows:
"C:/Program Files/Firebird/Firebird_4_0",
"D:/Program Files/Firebird/Firebird_4_0",
"E:/Program Files/Firebird/Firebird_4_0", 
"F:/Program Files/Firebird/Firebird_4_0", 
"C:/Program Files/Firebird/Firebird_3_0", 
"C:/Program Files/Firebird/Firebird_2_5/bin",
"D:/Program Files/Firebird/Firebird_3_0", 
"D:/Program Files/Firebird/Firebird_2_5/bin",
"E:/Program Files/Firebird/Firebird_3_0", 
"E:/Program Files/Firebird/Firebird_2_5/bin",
"F:/Program Files/Firebird/Firebird_3_0", 
"F:/Program Files/Firebird/Firebird_2_5/bin",
"C:/HQbird/Firebird40",
"D:/HQbird/Firebird40",
"E:/HQbird/Firebird40", 
"F:/HQbird/Firebird30",
"C:/HQbird/Firebird30", 
"C:/HQbird/Firebird25/bin",
"D:/HQbird/Firebird30", 
"D:/HQbird/Firebird25/bin",
"E:/HQbird/Firebird30", 
"E:/HQbird/Firebird25/bin",
"F:/HQbird/Firebird30", 
"F:/HQbird/Firebird25/bin"
and on Linux
"/opt/firebird/bin"
Solution:
Either install Firebird into the standard path (C:\Program Files\Firebird\Firebird_N_N on Windows or /opt/firebird) or use HQbird with Advanced Monitoring which support custom paths to Firebird.

Problem: Start of monitoring without configuration file gives errors in logs

Starting service...Windows 10
Current folder = E:\fbcc\_OUT
2022-02-09 10:43:20 ERROR Main:350 - Stopping: not found mainconfig.enc or mainconfig.json in ../conf/mainconfig.enc
Solution:
make the proper installation using keyanswers.txt file from your Control Center