@pftdm007 said in Snort intermittently seems to crash, trying to find why:
@bmeeks
Thanks for letting me know that! I did not happen to browse the forums about this specific issue/topic... I think these services should not be available in Watchdog's available services to monitor if this is that critical? Anyways, +1 for implementing a real monitoring feature for such critical processes I think..
Snort and Suricata are unique in how they operate. They are quite different from services such as the ntpd daemon or something like sshd, for example. The two main differences are Snort and Suricata spawn separate executables for each configured interface, and both services restart themselves following a rules update. If you have LAN and WAN instances of Snort or Suricata configured, that means two separate snort or suricata processes are running: one per interface. Service Watchdog simply does the equivalent of a
ps -ax | grep snort
to see if a monitored process is running. So if it finds any snort process with that query, it is happy. But Snort might be running on the LAN yet have crashed on the WAN. Service Watchdog would never know that.
The other thing that trips up Service Watchdog is that it does not understand that Snort and Suricata restart themselves following a rules update. So if Service Watchdog happens to test for the existence of a Snort or Suricata process during that rules update restart, it will find no running instance and immediately try to start one up. That will likely collide with the restarting Snort or Suricata is doing itself following the rules update and can result in a crash.