Dump core when killing buildmanager from monit
This commit is contained in:
parent
c4a1c3cfa7
commit
ebf80bdd13
3 changed files with 10 additions and 1 deletions
|
@ -9,6 +9,7 @@ ENV HOME /root
|
|||
RUN apt-get update # 02NOV2016
|
||||
RUN apt-get install -y \
|
||||
g++ \
|
||||
gdb \
|
||||
gdebi-core \
|
||||
git \
|
||||
libevent-2.0.5 \
|
||||
|
@ -31,6 +32,7 @@ RUN apt-get install -y \
|
|||
nginx \
|
||||
nodejs \
|
||||
npm \
|
||||
python-dbg \
|
||||
python-dev \
|
||||
python-pip \
|
||||
python-virtualenv
|
||||
|
@ -113,6 +115,7 @@ ADD conf/init/zz_boot.sh /etc/my_init.d/
|
|||
ADD conf/init/service/ /etc/service/
|
||||
RUN rm -rf /etc/service/syslog-forwarder
|
||||
|
||||
ADD conf/kill-buildmanager.sh /usr/local/bin/kill-buildmanager.sh
|
||||
ADD conf/monitrc /etc/monit/monitrc
|
||||
RUN chmod 0600 /etc/monit/monitrc
|
||||
|
||||
|
|
6
conf/kill-buildmanager.sh
Executable file
6
conf/kill-buildmanager.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/sh
|
||||
|
||||
PID=$(cat /etc/service/buildmanager/supervise/pid)
|
||||
gcore -o /tmp/buildman.core $PID
|
||||
|
||||
/usr/bin/sv kill /etc/service/buildmanager
|
|
@ -7,7 +7,7 @@ set httpd port 2812 and
|
|||
|
||||
check host buildmanager with address localhost
|
||||
start program = "/usr/bin/sv start /etc/service/buildmanager" with timeout 10 seconds
|
||||
stop program = "/usr/bin/sv kill /etc/service/buildmanager"
|
||||
stop program = "/usr/local/bin/kill-buildmanager.sh"
|
||||
if failed port 8787 protocol http
|
||||
request "/"
|
||||
status = 405
|
||||
|
|
Reference in a new issue