1
General Discussion / Re: Monit settings help
« on: March 09, 2024, 05:12:04 am »
With the help of the OPNsense documentation and chatgpt I was able to get Monit to monitor crowdsec:
Services -> Monit-> Settings -> Service Test Settings Tab -> Add (+)
Name: no_pid
Condition: does not exist
Action: Restart
Services -> Monit-> Settings -> Service Test Settings Tab -> Add (+)
Name: RestartLimit5
Condition: 5 restarts within 5 cycles
Action: Unmonitor
Services -> Monit-> Settings -> Service Settings Tab -> Add (+)
Enable service checks -> Check
Name: crowdsec
Type -> Process
Pid File: /var/run/crowdsec.pid
Start: /usr/local/etc/rc.d/crowdsec start
Stop: /usr/local/etc/rc.d/crowdsec stop
Tests -> no_pid,RestartLimit5
Depends -> Nothing Selected
Description: check to see if crowdsec is running
Note: Match can be left blank.
See screenshots below.
Services -> Monit-> Settings -> Service Test Settings Tab -> Add (+)
Name: no_pid
Condition: does not exist
Action: Restart
Services -> Monit-> Settings -> Service Test Settings Tab -> Add (+)
Name: RestartLimit5
Condition: 5 restarts within 5 cycles
Action: Unmonitor
Services -> Monit-> Settings -> Service Settings Tab -> Add (+)
Enable service checks -> Check
Name: crowdsec
Type -> Process
Pid File: /var/run/crowdsec.pid
Start: /usr/local/etc/rc.d/crowdsec start
Stop: /usr/local/etc/rc.d/crowdsec stop
Tests -> no_pid,RestartLimit5
Depends -> Nothing Selected
Description: check to see if crowdsec is running
Note: Match can be left blank.
See screenshots below.