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:
- Click Zenarmor on your OPNsense UI.
- Click Settings menu on the left-hand sidebar.
- Click Database menu under Reporting & Data.
- Scroll down to the Reporting Database Settings pane.
- Enter the new path into the Directory Storing Database Files field.
- Click Change Path button.
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:
- Click Zenarmor on your OPNsense UI.
- Click Settings menu on the left-hand sidebar.
- Click Database menu under Reporting & Data.
- Scroll down to the Reporting Database Settings pane.
- Enter the new database prefix into the Database Prefix field.
- Click Change Prefix button.
Database Prefix customization feature is only available for SOHO and Business Editions.