Skip to main content

Configuring Reporting Database Backend (Internal)

You can install and configure to use an Elasticsearch, MongoDB, or SQLite database as an internal database server on your OPNsense firewall.

The following tasks can be performed for Reporting Database Backend on Data Management page:

  • Changing Directory Storing Database Files
  • Changing Database Prefix

Changing Directory Storing Database Files

Directory Storing Database Files option allows you to change the directory path of the backend reporting data and indexes. The default path is as follows depending on the installed database:

  • /usr/local/datastore/elasticsearch for Elasticsearch
  • /usr/local/datastore/mongodb for MongoDB
  • /usr/local/datastore/sqlite for SQLite

You may modify your reporting database directory path with a new one. To change the database path you may follow the next steps:

  1. Click Zenarmor on your OPNsense UI.
  2. Click Settings menu on the left-hand sidebar.
  3. Click Database menu under Reporting & Data.
  4. Scroll down to the Reporting Database Settings pane.
  5. Enter the new path into the Directory Storing Database Files field.
  6. Click Change Path button.

Changing the Database Directory and Prefix

Figure 1. Changing the Database Directory and Prefix

Changing Database Prefix

The database prefix uniquely defines the source firewall. If you are using more than one firewall, you need to use a different database prefix to avoid a database file name conflict in your reporting database. Otherwise, the system will overwrite data on the same prefixed files. To change the database prefix you may follow the next steps:

  1. Click Zenarmor on your OPNsense UI.
  2. Click Settings menu on the left-hand sidebar.
  3. Click Database menu under Reporting & Data.
  4. Scroll down to the Reporting Database Settings pane.
  5. Enter the new database prefix into the Database Prefix field.
  6. Click Change Prefix button.
note

Database Prefix customization feature is only available for SOHO and Business Editions.