OPNsense Forum

English Forums => Zenarmor (Sensei) => Topic started by: dinguz on September 20, 2021, 09:41:39 am

Title: Sensei database recommendations for about 7 days of traffic
Post by: dinguz on September 20, 2021, 09:41:39 am
I would like to have about 7 days of traffic data to base reporting on. The Sensei installer classifies my router as low-end hardware, and only allows to install a local Mongodb or a remote Elasticsearch instance.
When configuring Sensei, the GUI recommends to use Mongodb with up to 2 days of traffic data, and use Elasticsearch for longer periods, but as said, the installer won't let me install it.

I'm a bit stuck here. Should I - against the recommendations - use Mongodb with a longer retention period, or should I somehow seek to install Sensei with Elasticsearch?

The system is a Barracuda F18 (dual Atom-based, memory and storage upgraded to 8 GB RAM, 128GB SSD) and Sensei is its main task, it's not running any other resource-heavy services.
Title: Re: Sensei database recommendations for about 7 days of traffic
Post by: athurdent on September 20, 2021, 10:13:05 am
With an SSD and 8G RAM, I'd opt for Elasticsearch. I tried Mongo with more than 2 days in the past, and it was really slow displaying statistics compared to Elasticsearch.
Title: Re: Sensei database recommendations for about 7 days of traffic
Post by: dinguz on September 20, 2021, 11:25:12 am
The installer doesn't offer me the option to install Elasticsearch. Can I bypass this restriction somehow?
Title: Re: Sensei database recommendations for about 7 days of traffic
Post by: sy on September 23, 2021, 04:40:03 pm
Hi,

You can bypass by adding a static CPU score then can be installed Elasticsearch. Please follow the instructions:

-Log in to the console as root
- Open this this file: /usr/local/opnsense/scripts/OPNsense/Sensei/check_hardware.sh
- Add 37. line CPU_SCORE=301000
like;

CPU_SCORE=301000
if [ $CPU_SCORE -le 300000 ];
Title: Re: Sensei database recommendations for about 7 days of traffic
Post by: dinguz on September 24, 2021, 01:14:34 pm
Thanks for the info, I'll try it out.

Edit: it's running now, first impressions are fine. I now need to let it sit for a couple of days to allow data to be gathered, and then see how it goes. To be continued.