User Tools

Site Tools


monit:monitoring_and_maintain_trisul_process

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
monit:monitoring_and_maintain_trisul_process [2018/10/03 12:44]
dhinesh
monit:monitoring_and_maintain_trisul_process [2018/10/03 14:49] (current)
veera [Monit Trisul Process]
Line 1: Line 1:
 ====== Monit Trisul Process ​ =====  ====== Monit Trisul Process ​ ===== 
  
-You can use Monit to monitor daemon processes or similar programs running on localhost.+You can use Monit to monitor daemon processes or similar programs running on localhost. ​This document explains how you can use monit to keep your Trisul Probe processes running.  ​
  
-==== Install Monit on Ubuntu 16.04 ====+<note important>​Your Trisul Probe processes should never stop. If you are seeing crashes or memory issues , please read "​[[admin:​debuggingcrash|Debugging Trisul Probe Crashes]]"​ and help us debug your setup. This guide is useful when Trisul is in production and you want to ensure uptime.  
 + 
 +</​note>​ 
 + 
 +===== Install Monit on Ubuntu 16.04 =====
  
 <code bash> apt-get install monit </​code>​ <code bash> apt-get install monit </​code>​
  
  
-=== Edit Configuration ​ ===+===== Edit Configuration  ​=====
  
 1. Open the monitrc configuration file  1. Open the monitrc configuration file 
Line 16: Line 20:
  
 2. Add following lines at the end of file  2. Add following lines at the end of file 
 +
  
 <​code>​ <​code>​
-check process trisul_flushd_context0 with pidfile /​usr/​local/​var/​lib/​trisul-hub/​domain0/​hub0/​context0/​run/​flushd.pid 
-  start program = "/​usr/​local/​bin/​trisulctl_hub start context context0"​ 
-  stop program = "/​usr/​local/​bin/​trisulctl_hub stop context context0"​ 
 check process trisul_probe_context0 with pidfile /​usr/​local/​var/​lib/​trisul-probe/​domain0/​probe0/​context0/​run/​trisul-probe.pid check process trisul_probe_context0 with pidfile /​usr/​local/​var/​lib/​trisul-probe/​domain0/​probe0/​context0/​run/​trisul-probe.pid
   start program = "/​usr/​local/​bin/​trisulctl_probe start context context0@probe0"​   start program = "/​usr/​local/​bin/​trisulctl_probe start context context0@probe0"​
Line 26: Line 28:
  
 </​code>​ </​code>​
 +
 +This snippet monitors the trisul probe process and restarts if stopped.
 +
  
 3. Restart the monit  3. Restart the monit 
Line 36: Line 41:
 <code bash> systemctl enable monit </​code>​ <code bash> systemctl enable monit </​code>​
  
 +
 +====== Advanced configuration - email when monit restarts ​ ======
 +
 +You can have monit restart stopped processes and email you when that happens. Just copy the following snippet into /​etc/​monit/​monitrc
  
 ===== Email configuration for monit ===== ===== Email configuration for monit =====
monit/monitoring_and_maintain_trisul_process.1538570661.txt.gz · Last modified: 2018/10/03 12:44 by dhinesh