pinpoint-docker-fork/pinpoint-agent/build/scripts/configure-agent.sh

28 lines
2.7 KiB
Bash
Raw Normal View History

2018-05-11 09:30:45 +00:00
#!/bin/bash
set -e
set -x
2020-09-10 13:14:21 +00:00
#sed -i "/profiler.transport.module=/ s/=.*/=${PROFILER_TRANSPORT_MODULE}/" /pinpoint-agent/pinpoint.config
sed -i "/profiler.transport.module=/ s/=.*/=${PROFILER_TRANSPORT_MODULE}/" /pinpoint-agent/profiles/local/pinpoint.config /pinpoint-agent/profiles/release/pinpoint.config
2020-03-24 05:42:11 +00:00
sed -i "/profiler.collector.ip=/ s/=.*/=${COLLECTOR_IP}/" /pinpoint-agent/profiles/local/pinpoint.config /pinpoint-agent/profiles/release/pinpoint.config
2020-09-10 13:14:21 +00:00
sed -i "/profiler.collector.tcp.port=/ s/=.*/=${COLLECTOR_TCP_PORT}/" /pinpoint-agent/pinpoint-root.config
sed -i "/profiler.collector.stat.port=/ s/=.*/=${COLLECTOR_STAT_PORT}/" /pinpoint-agent/pinpoint-root.config
sed -i "/profiler.collector.span.port=/ s/=.*/=${COLLECTOR_SPAN_PORT}/" /pinpoint-agent/pinpoint-root.config
2020-03-24 05:42:11 +00:00
2020-09-10 13:14:21 +00:00
#sed -i "/profiler.transport.grpc.collector.ip=/ s/=.*/=${COLLECTOR_IP}/" /pinpoint-agent/pinpoint.config
sed -i "/profiler.transport.grpc.collector.ip=/ s/=.*/=${COLLECTOR_IP}/" /pinpoint-agent/profiles/local/pinpoint.config /pinpoint-agent/profiles/release/pinpoint.config
2020-09-10 13:14:21 +00:00
sed -i "/profiler.transport.grpc.agent.collector.port=/ s/=.*/=${PROFILER_TRANSPORT_AGENT_COLLECTOR_PORT}/" /pinpoint-agent/pinpoint-root.config
sed -i "/profiler.transport.grpc.metadata.collector.port=/ s/=.*/=${PROFILER_TRANSPORT_METADATA_COLLECTOR_PORT}/" /pinpoint-agent/pinpoint-root.config
sed -i "/profiler.transport.grpc.stat.collector.port=/ s/=.*/=${PROFILER_TRANSPORT_STAT_COLLECTOR_PORT}/" /pinpoint-agent/pinpoint-root.config
sed -i "/profiler.transport.grpc.span.collector.port=/ s/=.*/=${PROFILER_TRANSPORT_SPAN_COLLECTOR_PORT}/" /pinpoint-agent/pinpoint-root.config
sed -i "/profiler.sampling.type=/ s/=.*/=${PROFILER_SAMPLING_TYPE}/" /pinpoint-agent/profiles/local/pinpoint.config /pinpoint-agent/profiles/release/pinpoint.config
sed -i "/profiler.sampling.counting.sampling-rate=/ s/=.*/=${PROFILER_SAMPLING_COUNTING_SAMPLING_RATE}/" /pinpoint-agent/profiles/local/pinpoint.config /pinpoint-agent/profiles/release/pinpoint.config
sed -i "/profiler.sampling.percent.sampling-rate=/ s/=.*/=${PROFILER_SAMPLING_PERCENT_SAMPLING_RATE}/" /pinpoint-agent/profiles/local/pinpoint.config /pinpoint-agent/profiles/release/pinpoint.config
sed -i "/profiler.sampling.new.throughput=/ s/=.*/=${PROFILER_SAMPLING_NEW_THROUGHPUT}/" /pinpoint-agent/profiles/local/pinpoint.config /pinpoint-agent/profiles/release/pinpoint.config
sed -i "/profiler.sampling.continue.throughput=/ s/=.*/=${PROFILER_SAMPLING_CONTINUE_THROUGHPUT}/" /pinpoint-agent/profiles/local/pinpoint.config /pinpoint-agent/profiles/release/pinpoint.config
2018-05-11 09:30:45 +00:00
sed -i "/Root level=/ s/=.*/=\"${DEBUG_LEVEL}\">/g" /pinpoint-agent/profiles/local/log4j2.xml /pinpoint-agent/profiles/release/log4j2.xml
2018-05-11 09:30:45 +00:00
exec "$@"