This guide uses Docker to run Diamond.
For Docker installation, see Docker.
Create a directory to store your configuration and compose files.
mkdir -p /opt/diamond
cd /opt/diamond
Define a container for Diamond.
services:
diamond:
image: python:3.9-slim
hostname: "${HOSTNAME}"
volumes:
- ./diamond.conf:/etc/diamond/diamond.conf:ro
- ./handlers:/etc/diamond/handlers:ro
- ./collectors:/etc/diamond/collectors:ro
- /proc:/host/proc:ro
- /sys:/host/sys:ro
environment:
- GRAPHITE_HOST=graphite
- GRAPHITE_PORT=2003
networks:
- monitoring
networks:
monitoring:
driver: bridge
Create diamond.conf with your Graphite settings:
[server]
handlers = GraphiteHandler
handlers_config_graphite = host=${GRAPHITE_HOST} port=${GRAPHITE_PORT}
[collectors]
[[default]]
enabled = True
Start the container in the background.
docker compose up -d
RUN pip install diamond to a custom Dockerfile for production2003/tcp (plaintext) or 2004/tcp (pickle)Any questions?
Feel free to contact us. Find all contact information on our contact page.