Skip to content

Commit

Permalink
Add the ability to pass additional tags with `startstop'.
Browse files Browse the repository at this point in the history
It may be necessary to pass additional tags when running tcollector.
In our case we are monitoring host level OpenStack systems, and
want to roll up into availability zones and hypervisor type.

./startstop start -t az=paloalto0 hv=kvm

Change-Id: Id48e4442dd984cd670d4677bbd5f393368501621
Signed-off-by: Benoit Sigoure <tsunanet@gmail.com>
  • Loading branch information
retr0h authored and tsuna committed Jul 14, 2011
1 parent 8501fc6 commit 2b13f17
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions startstop
Expand Up @@ -13,7 +13,10 @@ HOSTNAME=$(hostname)
PIDFILE=${PIDFILE-'/var/run/tcollector.pid'} PIDFILE=${PIDFILE-'/var/run/tcollector.pid'}
PROG=$TCOLLECTOR_PATH/tcollector.py PROG=$TCOLLECTOR_PATH/tcollector.py
LOG=${LOG-'/var/log/tcollector.log'} LOG=${LOG-'/var/log/tcollector.log'}
COMMAND=$1
shift
ARGS="-c $TCOLLECTOR_PATH/collectors -H $TSD_HOST -t host=$HOSTNAME -P $PIDFILE" ARGS="-c $TCOLLECTOR_PATH/collectors -H $TSD_HOST -t host=$HOSTNAME -P $PIDFILE"
ARGS="$ARGS $@"


# Sanity checks. # Sanity checks.
test -d "$TCOLLECTOR_PATH" || { test -d "$TCOLLECTOR_PATH" || {
Expand Down Expand Up @@ -84,7 +87,7 @@ forcerestart () {
start start
} }


case $1 in case $COMMAND in
start) status || start start) status || start
;; ;;
force-restart) force-restart)
Expand Down Expand Up @@ -113,7 +116,7 @@ case $1 in
status) status status) status
exit $? exit $?
;; ;;
*) echo >&2 "usage: $0 <start|stop|restart|status|force-restart>" *) echo >&2 "usage: $0 <start [args]|stop|restart|status|force-restart>"
exit 1 exit 1
;; ;;
esac esac

0 comments on commit 2b13f17

Please sign in to comment.