forked from Altinity/clickhouse-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun_dev_metrics_exporter.sh
executable file
·38 lines (31 loc) · 1.26 KB
/
run_dev_metrics_exporter.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
# Run metrics-exporter
# Do not forget to update version
# Source configuration
CUR_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
source "${CUR_DIR}/go_build_config.sh"
LOG_DIR="${CUR_DIR}/log"
echo -n "Building ${METRICS_EXPORTER_BIN}, please wait..."
if "${CUR_DIR}/go_build_metrics_exporter.sh"; then
echo "successfully built ${METRICS_EXPORTER_BIN}. Starting"
mkdir -p "${LOG_DIR}"
rm -f "${LOG_DIR}"/clickhouse-operator.*.log.*
"${METRICS_EXPORTER_BIN}" \
-alsologtostderr=true \
-log_dir=log \
-v=1
# -logtostderr=true \
# -stderrthreshold=FATAL \
# -log_dir=log Log files will be written to this directory instead of the default temporary directory
# -alsologtostderr=true Logs are written to standard error as well as to files
# -logtostderr=true Logs are written to standard error instead of to files
# -stderrthreshold=FATAL Log events at or above this severity are logged to standard error as well as to files
# And clean binary after run. It'll be rebuilt next time
"${CUR_DIR}/go_build_metrics_exporter_clean.sh"
# echo "======================"
# echo "=== Logs available ==="
# echo "======================"
# ls "${LOG_DIR}"/*
else
echo "unable to build ${METRICS_EXPORTER_BIN}"
fi