squeakywheel/telegraf
Telegraf is an agent for collecting, processing, aggregating, and writing metrics. Design goals are to have a minimal memory footprint with a plugin system so that developers in the community can easily add support for collecting metrics. Read more on the Telegraf website.
1.15.2-focal
, 1.15.2
, 1.15-focal
, 1.15
, 1-focal
, 1
, focal
, beta
- /!\ this is a beta releaseamd64
, arm64
, ppc64el
, s390x
$ docker run -d --name telegraf -p 30273:9273 -e TZ=UTC squeakywheel/telegraf:edge
Access your Telegraf instance at localhost:30273
.
Parameters
Parameter | Description |
---|---|
-e TZ=UTC | Timezone. |
-p 30273:9273 | Expose Telegraf on localhost:30273 . |
-v /my/local/telegraf.conf:/etc/telegraf/telegraf.conf | Mount local configuration file telegraf.conf (download this example file). |
Testing/Debugging
In case you need to debug what it is happening with the container you can run docker logs <name_of_the_container>
. But if you want to get access to an interactive shell run:
$ docker exec -it <name_of_the_container> /bin/bash
You can use your favorite Kubernetes distribution; if you don't have one, consider installing MicroK8s.
With microk8s running, enable the dns
and storage
add-ons:
$ microk8s enable dns storage
$ microk8s kubectl create configmap telegraf-config --from-file=main-config=config/telegraf.conf
Use the sample deployment yaml provided here.
# telegraf-deployment.yml
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: telegraf-deployment
spec:
replicas: 1
selector:
matchLabels:
app: telegraf
template:
metadata:
labels:
app: telegraf
spec:
containers:
- name: telegraf
image: squeakywheel/telegraf:edge
ports:
- containerPort: 9273
name: telegraf
protocol: TCP
volumeMounts:
- name: telegraf-config-volume
mountPath: /etc/telegraf/telegraf.conf
subPath: telegraf.conf
volumes:
- name: telegraf-config-volume
configMap:
name: main-config
items:
- key: telegraf
path: telegraf.conf
---
apiVersion: v1
kind: Service
metadata:
name: telegraf-service
spec:
type: NodePort
selector:
app: telegraf
ports:
- protocol: TCP
port: 9273
targetPort: 9273
nodePort: 30273
name: telegraf
$ microk8s kubectl apply -f telegraf-deployment.yml
If you find a bug in our image or want to request a specific feature file a bug here:
https://bugs.launchpad.net/ubuntu-docker-images/+filebug
In the title of the bug add telegraf: <reason>
.
Make sure to include:
<tag>
with the one you used to run the image:$ docker images --no-trunc --quiet squeakywheel/telegraf:<tag>
docker pull squeakywheel/telegraf