-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstart-opentsdb-client.sh
executable file
·38 lines (26 loc) · 1.11 KB
/
start-opentsdb-client.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
##
# Start an opentsdb client.
#
# Supervisord restarts processes by sending a SIGTERM (by default).
# Handle signals, and kill subprocesses so we don't have orphaned processes
# proliferating on each restart
trap "kill 0" SIGINT SIGTERM EXIT
mkdir -p /tmp/tsd
true ${OPENTSDB_RESOURCE:=/usr/local/serviced/resources/opentsdb}
# Overwrite the default metric consumer config if available
if [ -e "$OPENTSDB_RESOURCE/metric-consumer-app/configuration.yaml" ]; then
cp $OPENTSDB_RESOURCE/metric-consumer-app/configuration.yaml /opt/zenoss/etc/metric-consumer-app/configuration.yaml
fi
# Overwrite the default open tsdb config if available
if [ -e "$OPENTSDB_RESOURCE/opentsdb.conf" ]; then
cp $OPENTSDB_RESOURCE/opentsdb.conf /opt/zenoss/etc/opentsdb/opentsdb.conf
fi
if [ -f "$OPENTSDB_RESOURCE/otsdb.env" ]; then
. "$OPENTSDB_RESOURCE/otsdb.env"
fi
echo "Starting nginx..."
nginx
# start opentsdb
export JVMARGS="${TSDB_JAVA_MEM_MB} -XX:+ExitOnOutOfMemoryError -enableassertions -enablesystemassertions"
exec /opt/opentsdb/build/tsdb tsd --port=4343 --config /opt/zenoss/etc/opentsdb/opentsdb.conf