You are here: Home > Products > Network Monitor (Pro) > User Manual > The Application's Database

The Application's Database

General Information (overview)

Installing a Database from the Program's Distribution Package

Setting up the Database Connection

Database Backup and Recovery

Automatic Database Backup

Testing the Database and Fixing Errors

Restoring a Damaged Firebird Database

Setting Firebird Parameters

Creating New Users


Overview

The Monitoring Application keeps all its data, settings, and statistics in one relational database, which can be hosted on any server. The free, cross-platform Firebird DBMS (http://www.firebirdsql.org/) is used. The Monitoring Application connects to the database through a TCP port. You can set the port number in the Firebird settings (firebird.conf). By default, port 3050 is used. Besides, the Monitoring Application uses one more port for a back link from the Database (EVENTS). It uses port 3051 for that purpose. Please remember to whitelist both of these ports, as well as the processes that use them (fbserver.exe, NMProsvc.exe, and NetMonitorPro.exe), in your firewall and antivirus settings.

The existing database structure has been hardcoded by the Monitoring Applicationís developer and cannot be modified. However, you can add any other tables to the database as needed. Firebird is a popular DBMS, and you can find lots of documentation on how to use it. Particularly, you can find a lot of information about Firebird on this website: http://ib-aid.com/

 

Installing the Database from the Program's Distribution Package

The Firebird DBMS of the latest version is already included in the distribution package of the main program (the network-monitor-pro.exe file) and can be installed along with it. If the server where the program is installed already has Firebird from another product, then a conflict may arise due to the same name of the DBMS services ("Firebird Server - DefaultInstance") used by default. In this case, the installer provides the ability to change the name of the Firebird Server service. For successful operation of two copies of Firebird on the same server, in addition to the service name, you must also change the ports, the default values of which are 3050 and 3051. If the existing copy is using port 3050, you can enter 3060 in the Firebird Server Port field if that port is not being used by any third-party application.

If the port numbers were changed during the installation, they must also be changed in the file c:\Program Files (x86)\10-Strike Network Monitor Pro\firebird\firebird.conf. Change the settings RemoteServicePort = 3050 and RemoteAuxPort = 3051 and restart the FirebirdServer service.

 

Setting up the Database Connection

The installer will automatically install Firebird and configure the Monitoring Service to use that DBMS. You only need to configure a few settings:

10-Strike Network Monitor Pro program's database connection

  1. Specify the Firebird database server address. If the Monitoring Service is installed on the same host as the Database, you can simply specify localhost.
  2. Specify the standby database server address, if one has been installed and configured. You can set up the database replication and quickly switch to the backup server in the event of a failure of the primary server. When the main server fails, the graphical console displays a message and a suggestion to switch to the backup (standby) server. If a backup server was not installed, you can leave this parameter blank.
  3. Specify the database server port (the one that is set in the DBMS configuration file firebird.conf). By default, the 3050 port is used.
  4. Specify the database event port. By default, the 3051 port is used. This port is created by the database server for sending notifications to the program and monitoring servers. If this port will be inaccessible (or locked), this can lead to the database server failure. Please test the port availability from this computer and unlock it on your router or Firewall. You can test the connection using the button near the port number field. During the check, a monitoring console will be started for 15 seconds. If the database notifications work fine, you will see the "ESTABLISHED" strings on the console window.
  5. Specify the Monitoring Service ID. Read more in the Managing Distributed Monitoring Servers section. The default ID is 0.
  6. If necessary, you can change the existing password for accessing the database. The default password for the "SYSDBA" superuser is "masterke" (without the last letter "y"). We recommend that you change the default password. If you want to change parameters of the Monitoring Service later, select "Do not change (or keep the default password)".

To verify the parameters that you have set, click the "Test connection" button. If you did everything correctly, your test connection to the database will be successful.

 

Database Backup and Recovery

We recommend that you back up the Monitoring Database as frequently as possible, so that you do not lose the statistics and collected data in case of a critical failure. You can fix the most of database errors using Firebirdís built-in tools. But sometimes, the data in the current database may be lost beyond recovery. In this case, you can restore the database from a backup copy.

Database Backup

The Monitoring Application allows you to back up the Database manually. To do this, open the program settings, go to the "Database and Web" section, and click the "Database backup copy" button. We recommend you to keep the backup copy on a different computer. If you need to restore your database from a backup copy, please refer to the Firebird documentation: https://firebirdsql.org/manual/gbak-cmdline.html

database settings

 

Database Recovery

Do the following to recover your database:

1. Find the folder storing database backup copies. For example, c:\ProgramData\10-Strike\Network Monitor Pro\Bkup\ . Choose a necessary database backup file (for example, NETMONITOR20170523.fbk ).

2. Open a folder storing the Firebird application executable files on the server where the program is installed and the database core is located. For example, c:\Program Files (x86)\ Network Monitor Pro\firebird\bin\ .

3. Type the following in the command line:

gbak -c "c:\ProgramData\10-Strike\Network Monitor Pro\Bkup\NETMONITOR20170523.fbk" "c:\ProgramData\10-Strike\Network Monitor Pro\Bkup\NETMONITOR.fdb" -user SYSDBA -pas masterke

where SYSDBA and masterke are your database superuser's username and password (your actual password can be different).

4. The database file NETMONITOR.FDB should be created in the database backup folder. You need to place it to the database folder (for example, c:\ProgramData\10-Strike\Network Monitor Pro\ ). Before copying the file, please stop the Firebird Server service.

5. Start the Firebird Server service. The database is recovered from a backup copy and you can start the monitoring service and the main Application console.

The database restoration is described in details in Firebird documentation: https://firebirdsql.org/manual/gbak.html and https://www.firebirdsql.org/pdfmanual/html/nbackup-backups.html

All the above tasks can be performed automatically when you click the Recover button and follow the on-screen instructions.

 

Automatic Database Backup

The program allows you to set up periodic backups using the built-in task scheduler. Add the Database backup task and specify the directory where the program will save the .fbk archive. If you specify a network path to a folder on another host, you must run the monitoring service as a user who has access to this folder, and not as LocalSystem, who does not have the network access.

backup copying of the monitoring database

The number of backup copies in a folder can be limited by the special Delete old... setting. This allows you to avoid the disk overflow.

There are also methods that can automate the process of periodically backing up the monitoring database.

 

Testing the Database and Fixing Errors

You can use Firebirdís built-in tools to test the database and search for possible errors. Read more here: http://www.firebirdfaq.org/faq324/ and http://www.firebirdsql.org/manual/gfix-dbverify.html

The following symptoms indicate that the Monitoring Applicationís Database is damaged: Some data that have been collected earlier are missing, the accumulated statistics is missing, or the Monitoring Application cannot be loaded (provided that the problem is not caused by a bad connection).

All the database server's errors are logged in the file firebird.log. Please note that the following error messages can appear in this log:

INET/inet_error: read errno = 10038

and

INET/inet_error: read errno = 10054

These errors are recorded when the program's client part disconnects from the database server for a short period of time for some reason. This can happen thanks to various system applications that can affect the network traffic and connections (antivirus programs, the Firewall). These log records are not crytical and do not mean that there are some serious problems with your database.

 

Restoring a damaged Firebird database

  1. Stop the Firebird Server, 10-Strike Network Monitor Pro Service, 10-Strike Network Monitor Watchdog services, and close the application.
  2. Copy the database file from the folder c:\ProgramData\10-Strike\Network Monitor Pro\NETMONITOR.FDB to the folder where Firebird is installed: c:\Program Files (x86)\ 10-Strike Network Monitoring Pro\firebird\
  3. Start the Firebird Server service.
  4. Run the cmd.exe command with administrator rights and go to the console in the folder with Firebird installed: cd "c:\Program Files (x86)\10-Strike Network Monitoring Pro\firebird\" .
  5. Check the database for damage with the command:

    gfix.exe -v -full -user sysdba -password masterke netmonitor.fdb

    Specify the database user name in the -user parameter, and the user password in the -password parameter. These parameters must be specified for all database recovery commands.

  6. If there are errors in the report, correct them with the command:

    gfix.exe -mend -user sysdba -password masterke netmonitor.fdb

  7. Check the database again for damage:

    gfix.exe -v -full -user sysdba -password masterke netmonitor.fdb

  8. If errors or warnings persist, make a database backup:

    gbak -b -v -ig -g  -user sysdba -password masterke netmonitor.fdb backup.fbk

    Main parameters:

    netmonitor.fdb – corrupted database file
    backup.fbk – backup file

    -ig – checksum errors will be ignored
    -g – disable garbage collection during backup

  9. Restore a database from a backup:

    gbak -c -v -user sysdba -password masterke backup.fbk netmonitor-new.fdb

  10. Check the new database for errors:

    gfix.exe -v -full -user sysdba -password masterke netmonitor-new.fdb

  11. If there are no errors, then rename netmonitor-new.fdb to netmonitor.fdb
  12. Stop the Firebird Server service.
  13. Place a new file netmonitor.fdb in the c:\ProgramData\10-Strike\Network Monitor Pro\
  14. folder
  15. Start Firebird Server, 10-Strike Network Monitor Pro Service, 10-Strike Network Monitor Watchdog.

 

Setting Firebird Parameters

The Monitoring Application's Database has been optimally preconfigured, so you do not have to change anything. But if you want to optimize Firebirdís operation (to speed it up, to enable write caching, etc.), read more about its parameters in the documentation: https://www.ibphoenix.com/resources/documents/general/doc_55

 

Creating User Accounts

You can manage the user list and their access rights in the program settings (in the Users and rights section). Learn more about the user account configuration in the Users and rights topic.

 

 

 

Related Links: