I’m looking for the best practice to monitor the health of Google Chrome. 
Am I right to understand that Chrome doesn’t have a PID file?

I’ve tried the following 2 techniques:

1. 
check program chrome with path /usr/bin/google-chrome
if status!=0 then exec “/usr/bin/pkill chrome”

(I have a script that auto reboots chrome with the correct settings when I kill 
chrome).
This is sort of working when I simulate a crash (type in chrome://crash in 
browser). The problem is that it keeps killing chrome every time monit runs.
I think it doesn’t reset the last exit value? When I type ‘monit status’ it 
keeps saying ‘last exit value = 1’. How do I fix this? 
Also I keep getting errors in M/Monit ‘cannot open display’. I think this is 
because monit keeps trying to reopen chrome by itself. I thought I could fix 
this by adding ‘mode passive’ but this doesn’t seem to be allowed here because 
I get a syntax error.

2. 
check process chrome matching “chrome”

The problem with this version is that nothing happens when I manually crash 
chrome. It keeps saying ‘status = Running’.

Hope someone can help me. I’m basically looking for the best technique to catch 
all possible issues with chrome. Thanks!
--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general

Reply via email to