OPNsense Forum

English Forums => Zenarmor (Sensei) => Topic started by: rfox on April 06, 2025, 02:20:06 PM

Title: Weekly Proxmox Backup of OPNSense VM w/ Zenarmor - Reporting database stops ?!?
Post by: rfox on April 06, 2025, 02:20:06 PM
I have been successfully running my OPNSense box under Proxmox as a VM - all works well with Zenarmor - but once a week I perform a PBS backup of the VM (using snapshot mode) - and every time the Zenarmor reporting database seems to stop after the backup and needs to be manually restarted ??  Naturally I can schedule a fresh reboot of the VM after the backup, but that seems harsh . . . not sure if there's a way to simply restart Zenarmor or just the reporting database using cron or something ?? 

Any tips welcome!


Title: Re: Weekly Proxmox Backup of OPNSense VM w/ Zenarmor - Reporting database stops ?!?
Post by: sy on April 07, 2025, 08:33:49 AM
Hi,

Which database are you using? Could you please share its version?
Title: Re: Weekly Proxmox Backup of OPNSense VM w/ Zenarmor - Reporting database stops ?!?
Post by: rfox on April 07, 2025, 04:56:27 PM
Quote from: sy on April 07, 2025, 08:33:49 AMHi,

Which database are you using? Could you please share its version?


Elasticsearch 8.11.3
Title: Re: Weekly Proxmox Backup of OPNSense VM w/ Zenarmor - Reporting database stops ?!?
Post by: sy on April 08, 2025, 08:02:27 AM
Hi,

Use the following command to restart Elasticsearch: service elasticsearch restart.
Title: Re: Weekly Proxmox Backup of OPNSense VM w/ Zenarmor - Reporting database stops ?!?
Post by: rfox on April 08, 2025, 08:49:04 AM
Quote from: sy on April 08, 2025, 08:02:27 AMHi,

Use the following command to restart Elasticsearch: service elasticsearch restart.

Thanks - can I schedule that with cron to happen right after the backup?  If yes - any hints on how?  I'm not the strongest using cron . . .
Title: Re: Weekly Proxmox Backup of OPNSense VM w/ Zenarmor - Reporting database stops ?!?
Post by: sy on April 08, 2025, 02:31:39 PM
Hi,

OPNsense remove after cron service restart if you add a manuel entry to cron file. To make it permanent in GUI please do the followings

1- create a file in "/usr/local/opnsense/service/conf/actions.d/actions_reportingdb.conf"

2- File content should be
[start]
command:service elasticsearch restart
parameters:
type:script
message:Zenarmor Reporting DB is restarting
description:Zenarmor Reporting DB Restart

3- Navigate System - Settings - Cron

4- Add a new cron, set the time and date settings and select "Zenarmor Reporting DB Restart" in Command field and save the cron.


Title: Re: Weekly Proxmox Backup of OPNSense VM w/ Zenarmor - Reporting database stops ?!?
Post by: rfox on April 08, 2025, 05:30:59 PM
Quote from: sy on April 08, 2025, 02:31:39 PMHi,

OPNsense remove after cron service restart if you add a manuel entry to cron file. To make it permanent in GUI please do the followings

1- create a file in "/usr/local/opnsense/service/conf/actions.d/actions_reportingdb.conf"

2- File content should be
[start]
command:service elasticsearch restart
parameters:
type:script
message:Zenarmor Reporting DB is restarting
description:Zenarmor Reporting DB Restart

3- Navigate System - Settings - Cron

4- Add a new cron, set the time and date settings and select "Zenarmor Reporting DB Restart" in Command field and save the cron.




Just what the doctor ordered!  Many thanks - will try this shortly!