This guide uses Docker to run RRDtool commands.
For Docker installation, see Docker.
RRDtool is a command-line utility, not a daemon. It’s typically used within scripts or as part of other monitoring tools (collectd, MRTG, etc.). For containerized usage, you’ll need to build a custom image or use it as a base for your monitoring scripts.
Create a directory to store your configuration and compose files.
mkdir -p /opt/rrdtool
cd /opt/rrdtool
Create a Dockerfile with RRDtool installed:
FROM alpine:latest
RUN apk add --no-cache rrdtool rrdtool-dev
WORKDIR /data
ENTRYPOINT ["rrdtool"]
Define a container for RRDtool operations.
services:
rrdtool:
build: .
volumes:
- rrd-data:/data
stdin_open: true
tty: true
volumes:
rrd-data:
Execute RRDtool commands:
docker compose run --rm rrdtool create metrics.rrd --step 300 \
DS:input:GAUGE:600:0:U \
RRA:AVERAGE:0.5:1:288
.rrd files and graph outputAny questions?
Feel free to contact us. Find all contact information on our contact page.