Skip to content

Instantly share code, notes, and snippets.

@christianvozar
Last active December 17, 2015 15:09
Show Gist options
  • Save christianvozar/5629870 to your computer and use it in GitHub Desktop.
Save christianvozar/5629870 to your computer and use it in GitHub Desktop.
Upstart Script for Riemann (http://riemann.io/) Health deamon.
# Copyright 2013, Harvest Exchange Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Installation
# Copy to /etc/init/riemann-health.conf
# Usage
# start riemann-health host=192.168.1.1
# stop riemann-health
description "Control the Riemann Health service."
version "1.0"
author "Christian Vozar <christian@hvst.com>"
start on static-network-up
stop on stopping network
stop on starting shutdown
respawn
respawn limit 15 5
script
logger -t riemann-health "Starting Riemann Health service."
start-stop-daemon --start --make-pidfile --pidfile /var/run/riemann-health.pid --exec '/usr/local/bin/riemann-health' -- '--host ${host}'
emits riemann-health
end script
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment