adjust monit for broken init script / ceph osds

This commit is contained in:
Nico Schottelius 2020-07-02 21:42:46 +02:00
parent 4682ed9a3a
commit 36b23a4bd9

View file

@ -20,13 +20,26 @@ if echo $to_monitor | grep ^osd; then
depends="${depends}, ${to_monitor}-whoami"
osd="yes"
osdid=$(echo $to_monitor | cut -d. -f2)
fi
cat > "$conf" <<EOF
# Generated by $0
check process ${to_monitor} with pidfile /var/run/ceph/${to_monitor}.pid
start program = "/usr/bin/ceph-osd -i ${osdid} --pid-file /var/run/ceph/osd.${osdid}.pid -c /etc/ceph/ceph.conf --cluster ceph --setuser ceph --setgroup ceph" with timeout 3600 seconds
EOF
cat > "$conf" <<EOF
else
# monitor, mgr
cat > "$conf" <<EOF
# Generated by $0
check process ${to_monitor} with pidfile /var/run/ceph/${to_monitor}.pid
start program = "/etc/init.d/ceph start ${to_monitor}" with timeout 60 seconds
EOF
fi
# final clause same for both
cat >> "$conf" <<EOF
stop program = "/etc/init.d/ceph stop ${to_monitor}"
group ceph