Files
datastore/tests/integration/compose/docker_compose_prometheus.yml
zooqueen 38c257c602 Hanzo Datastore overlay on ClickHouse 26.5.3.1
Real fork of ClickHouse/ClickHouse with the Hanzo overlay applied on top of the
26.5 release lineage (parent is upstream/26.5, so future upstream syncs are clean
3-way merges). Overlay: cmd/zap-bridge (:9999 ZAP duplex), Dockerfile.hanzo +
hanzoai/debian13 bases, hanzo/ config + schema, white-label hanzo-datastore
branding, arcd CI, hanzo-* packaging.

FOLLOW-UP: re-apply Phase-1 CMake decisions (single-binary ENABLE_DATASTORE_KEEPER=OFF;
disabled external engines) + full build on hanzo-build-linux-amd64.
2026-06-21 13:19:10 -07:00

120 lines
4.3 KiB
YAML

services:
# Service "prometheus_writer" runs a prometheus server which scrapes some metrics and sends them via the RemoteWrite
# protocol to ClickHouse by url ${PROMETHEUS_REMOTE_WRITE_HANDLER}.
prometheus_writer:
image: prom/prometheus:v3.5.0
hostname: ${PROMETHEUS_WRITER_HOSTNAME:-prometheus_writer}
restart: always
entrypoint: |
/bin/sh -c '
if [ -z ${PROMETHEUS_WRITER_PORT} ]; then
exit 0
fi
cat << EOF > /etc/prometheus/prometheus.yml
global:
scrape_interval: 1s
scrape_configs:
- job_name: "prometheus"
static_configs:
- targets: ["localhost:${PROMETHEUS_WRITER_PORT}"]
remote_write: ${PROMETHEUS_REMOTE_WRITE_HANDLERS}
storage:
tsdb:
out_of_order_time_window: 100y
EOF
exec /bin/prometheus --config.file="/etc/prometheus/prometheus.yml" --storage.tsdb.path="/prometheus" --web.listen-address="0.0.0.0:${PROMETHEUS_WRITER_PORT}" --enable-feature=promql-experimental-functions &> /var/log/prometheus/prometheus.log
'
expose:
- ${PROMETHEUS_WRITER_PORT}
healthcheck:
test: |
/bin/sh -c '
if [ -z ${PROMETHEUS_WRITER_PORT} ]; then
exit 0
fi
curl -f "https://localhost:${PROMETHEUS_WRITER_PORT}/api/v1/status/runtimeinfo" || exit 1
'
interval: 5s
timeout: 3s
retries: 30
volumes:
- type: ${PROMETHEUS_WRITER_LOGS_FS:-tmpfs}
source: ${PROMETHEUS_WRITER_LOGS:-}
target: /var/log/prometheus
stop_grace_period: 5s
cpus: 3
# Service "prometheus_reader" runs a prometheus server which scrapes nothing and can request data via the RemoteRead protocol
# from ClickHouse by url ${PROMETHEUS_REMOTE_READ_HANDLER}.
prometheus_reader:
image: prom/prometheus:v3.5.0
hostname: ${PROMETHEUS_READER_HOSTNAME:-prometheus_reader}
restart: always
entrypoint: |
/bin/sh -c '
if [ -z ${PROMETHEUS_READER_PORT} ]; then
exit 0
fi
cat << EOF > /etc/prometheus/prometheus.yml
remote_read: ${PROMETHEUS_REMOTE_READ_HANDLERS}
storage:
tsdb:
out_of_order_time_window: 100y
EOF
exec /bin/prometheus --config.file="/etc/prometheus/prometheus.yml" --storage.tsdb.path="/prometheus" --web.listen-address="0.0.0.0:${PROMETHEUS_READER_PORT}" --enable-feature=promql-experimental-functions &> /var/log/prometheus/prometheus.log
'
expose:
- ${PROMETHEUS_READER_PORT}
healthcheck:
test: |
/bin/sh -c '
if [ -z ${PROMETHEUS_READER_PORT} ]; then
exit 0
fi
curl -f "https://localhost:${PROMETHEUS_READER_PORT}/api/v1/status/runtimeinfo" || exit 1
'
interval: 5s
timeout: 3s
retries: 30
volumes:
- type: ${PROMETHEUS_READER_LOGS_FS:-tmpfs}
source: ${PROMETHEUS_READER_LOGS:-}
target: /var/log/prometheus
stop_grace_period: 5s
cpus: 3
# Service "prometheus_receiver" runs a prometheus server which accepts data sent by the RemoteWrite protocol to Prometheus to api/v1/write.
prometheus_receiver:
image: prom/prometheus:v3.5.0
hostname: ${PROMETHEUS_HOSTNAME:-prometheus_receiver}
restart: always
entrypoint: |
/bin/sh -c '
if [ -z ${PROMETHEUS_RECEIVER_PORT} ]; then
exit 0
fi
cat << EOF > /etc/prometheus/prometheus.yml
storage:
tsdb:
out_of_order_time_window: 100y
EOF
exec /bin/prometheus --config.file="/etc/prometheus/prometheus.yml" --storage.tsdb.path="/prometheus" --web.listen-address="0.0.0.0:${PROMETHEUS_RECEIVER_PORT}" --storage.tsdb.retention.time=100y --enable-feature=remote-write-receiver --web.enable-remote-write-receiver --enable-feature=promql-experimental-functions &> /var/log/prometheus/prometheus.log
'
expose:
- ${PROMETHEUS_RECEIVER_PORT}
healthcheck:
test: |
/bin/sh -c '
if [ -z ${PROMETHEUS_RECEIVER_PORT} ]; then
exit 0
fi
curl -f "https://localhost:${PROMETHEUS_RECEIVER_PORT}/api/v1/status/runtimeinfo" || exit 1
'
interval: 5s
timeout: 3s
retries: 30
volumes:
- type: ${PROMETHEUS_RECEIVER_LOGS_FS:-tmpfs}
source: ${PROMETHEUS_RECEIVER_LOGS:-}
target: /var/log/prometheus
stop_grace_period: 5s
cpus: 3