This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import couchdb | |
if __name__ == '__main__': | |
srcurl, desturl = sys.argv[1:] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# on mfsbsd, before fzg | |
touch /boot/../mfsroot | |
mkdir -p /var/db/pkg | |
mount -t tmpfs tmpfs /var/db/pkg | |
mkdir -p /var/cache/pkg | |
mount -t tmpfs tmpfs /var/cache/pkg | |
mkdir -p /etc/pf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://andywenk.tumblr.com/post/31872057319/couchdb-monitoring-with-monit-really-working | |
check process couchdb with pidfile /usr/local/var/run/couchdb/couchdb.pid | |
group database | |
start program = "/etc/init.d/couchdb start -u couchdb" | |
stop program = "/etc/init.d/couchdb stop -u couchdb" | |
if failed host 127.0.0.1 port 5984 then restart | |
if cpu is greater than 40% for 2 cycles then alert | |
if cpu > 60% for 5 cycles then restart | |
if 10 restarts within 10 cycles then timeout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################# | |
# couchdb | |
# http://nikosmarkopoulos.com/monitoring-couchdb-with-monit/ | |
################################################################ | |
check process couchdb | |
with pidfile /var/run/couchdb/couchdb.pid | |
start program = "/etc/init.d/couchdb start" | |
stop program = "/etc/init.d/couchdb stop" | |
if failed host localhost port 5984 proto http then restart |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################################################################# | |
# couchdb | |
################################################################ | |
#check process couchdb by port number | |
check host couchdb with address localhost | |
if failed port 5984 then alert | |
if failed url https://localhost:5984/ and content == '"couchdb"' then alert | |
group couchdb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# from https://gist.github.com/cpetersen/581657 | |
NAME=$1 | |
HOME="/root" | |
PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" | |
/usr/bin/sudo -u root /usr/local/bin/couchdb -b -a /mnt/sde/$NAME/couchdb.ini -p /var/run/couchdb-$NAME.pid -e /var/log/couchdb-$NAME.err -o /var/log/couchdb-$NAME.out | |
sleep 1 | |
echo '' >> /var/run/couchdb-$NAME.pidroot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this config needs haproxy-1.1.28 or haproxy-1.2.1 | |
global | |
log 127.0.0.1 local0 | |
log 127.0.0.1 local1 notice | |
#log loghost local0 info | |
maxconn 4096 | |
#chroot /usr/share/haproxy | |
user haproxy | |
group haproxy |