forked from appcelerator-archive/docker-telegraf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (44 loc) · 1.58 KB
/
Dockerfile
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
39
40
41
42
43
44
45
46
47
48
49
50
51
FROM appcelerator/alpine:3.7.0
ENV TELEGRAF_VERSION 1.5.2
RUN apk update && apk upgrade && \
apk --virtual build-deps add openssl git gcc musl-dev make binutils patch go && \
export GOPATH=/go && \
go version && \
go get -v github.com/influxdata/telegraf && \
cd $GOPATH/src/github.com/influxdata/telegraf && \
if [ $TELEGRAF_VERSION != "master" ]; then git checkout -q --detach "${TELEGRAF_VERSION}" ; fi && \
make && \
chmod +x $GOPATH/bin/* && \
mv $GOPATH/bin/* /bin/ && \
apk del build-deps && \
cd / && rm -rf /var/cache/apk/* $GOPATH && \
mkdir -p /etc/telegraf
EXPOSE 8094 9126
ENV INFLUXDB_URL http://localhost:8086
ENV INFLUXDB_DB telegraf
ENV INTERVAL 10s
ENV OUTPUT_INFLUXDB_ENABLED true
ENV OUTPUT_PROMETHEUS_ENABLED false
ENV OUTPUT_CLOUDWATCH_ENABLED false
ENV OUTPUT_KAFKA_ENABLED false
ENV OUTPUT_NATS_ENABLED false
ENV OUTPUT_FILE_ENABLED false
ENV INPUT_KAFKA_ENABLED false
ENV INPUT_NATS_ENABLED false
ENV INPUT_CPU_ENABLED true
ENV INPUT_DISK_ENABLED true
ENV INPUT_DISKIO_ENABLED true
ENV INPUT_KERNEL_ENABLED true
ENV INPUT_MEM_ENABLED true
ENV INPUT_PROCESS_ENABLED true
ENV INPUT_SWAP_ENABLED true
ENV INPUT_SYSTEM_ENABLED true
ENV INPUT_NET_ENABLED true
ENV INPUT_NETSTAT_ENABLED true
ENV INPUT_DOCKER_ENABLED true
ENV INPUT_LISTENER_ENABLED false
ENV INPUT_HAPROXY_ENABLED false
COPY telegraf.conf.tpl /etc/telegraf/telegraf.conf.tpl
COPY run.sh /run.sh
ENTRYPOINT ["/run.sh"]
CMD []