Install with Docker¶
The Docker path generates a self-contained Compose directory. Click-Dog runs as a container, while its editable YAML and ClickHouse credential stay on the host.
Prerequisites¶
- a Linux host with Docker Engine and Docker Compose
- ClickHouse reachable from that host
- an OTLP/gRPC receiver address
- a ClickHouse monitoring user with
SELECTonsystem.opentelemetry_span_logandsystem.query_log - the ClickHouse password in
CLICKHOUSE_PASSWORD
The generated Compose service uses host networking, so its default
clickhouse.host: localhost reaches ClickHouse on the same Linux host. Edit the
generated config before starting when ClickHouse is elsewhere.
Generate the deployment¶
If click-dog is available on the machine where you prepare deployment files:
export CLICKHOUSE_PASSWORD="your-monitoring-password"
click-dog deploy docker -c otel-collector.internal:4317 --otel-secure=false
For a fresh machine, the release installer can run the same generator from the published container image:
curl -fsSL https://github.com/coltconsulting/click-dog/releases/latest/download/install.sh -o install.sh
export CLICKHOUSE_PASSWORD="your-monitoring-password"
bash install.sh docker -c otel-collector.internal:4317
The installer wrapper requires Docker plus envsubst from the gettext
package. It generates files only; it does not install a host binary or systemd
service. It runs the image as your user, or as root in the container under
rootless Docker, so the generated files belong to you.
Choose the OTLP transport¶
click-dog deploy docker cannot see the receiver's network, so it does not
guess. For a receiver that is not loopback it needs --otel-secure=true or
--otel-secure=false, and refuses to write anything without one; the error
names both values and notes that Compose and in-cluster collectors usually
serve plaintext. With the flag, the rendered click-dog.yaml sets
secure: true or secure: false under exporters.otel. A collector on the
host's network (localhost:4317) needs no flag: the config gets a comment
stating the rule instead of a secure key, and plaintext is chosen
automatically (OTLP transport). Write the
value with =; --otel-secure false is refused, pointing to
--otel-secure=false. The generator never connects to the receiver.
install.sh docker decides with the image it deploys. Without
--otel-secure, it asks the image for the transport (docker run --network
host IMAGE init --print-otel-secure): TLS for a remote receiver, plaintext
for a loopback one. When the result is TLS, it runs click-dog test tls from
the image on the host network, the namespace the generated Compose service
uses (on Docker Desktop, the VM's), and stops before writing anything if the
receiver serves plaintext, naming --otel-secure=false as the fix. An
unreachable receiver gets a note and no check.
The wrapper refuses --otel-ca-cert, because the compose
file mounts only click-dog.yaml: for a self-signed or private-CA collector,
mount the CA into the container yourself and set exporters.otel[].ca_cert to
its path there.
Both paths create click-dog-docker/ containing:
docker-compose.ymlwith an exact Click-Dog image tagclick-dog.yaml, mounted read-only into the container.env, containing the ClickHouse password.gitignore, which excludes.envand update backups
Both paths write .env with mode 0600 and click-dog.yaml with 0644:
the container reads the config as the image's own user, not as you, and the
password stays in .env. Treat the whole output directory as deployment
configuration and never commit .env.
Use -o DIR / --out-dir DIR to choose another output directory, -u USER
for another ClickHouse username, or -v VERSION to pin a release. Prefer the
environment variable over -p: a password flag appears in process listings
and shell history.
Review and start¶
Review click-dog.yaml, particularly the ClickHouse address, OTLP receiver,
TLS, and query-text posture. Then
start Compose:
The service uses restart: unless-stopped and mounts only the generated config.
The container runs as user and group 65532 (clickdog), the same identity
the Kubernetes manifests set. Both generators write click-dog.yaml with mode
0644, which that user can read; one from an earlier install.sh docker is
0600, so run chmod 0644 click-dog.yaml before docker compose up. The file
holds no password, which stays in .env. A file you add, such as a collector
CA, must be readable by that user or group, and a directory Click-Dog writes
to, such as one for log_file, must be writable by it:
sudo chown 65532:65532 DIR. Log files are created with mode 0640 and group
65532, so a log shipper on the host needs that group, and a restart to pick
it up:
sudo groupadd -g 65532 click-dog-logs
sudo usermod -aG click-dog-logs filebeat
sudo systemctl restart filebeat
Earlier images ran as 100:101. Re-own anything you gave that account, and
replace a user: "100" or --user 100 with 65532: uid 100 no longer has
an account, so it would run in group 0.
Verify¶
Check container state and logs:
Run the config and data-path checks inside the container:
docker compose exec click-dog \
click-dog validate --config /etc/click-dog/click-dog.yaml
docker compose exec click-dog \
click-dog check --config /etc/click-dog/click-dog.yaml
The generated config enables health on :8686 and Prometheus metrics on
:9090. With host networking they are reachable on the Docker host unless you
change those listener addresses.
Update¶
Resolve the latest stable version, update only the Compose image reference, review the generated backup, then recreate the service:
LATEST_URL="$(curl -fsSL -o /dev/null -w '%{url_effective}' \
https://github.com/coltconsulting/click-dog/releases/latest)" || exit 1
VERSION="${LATEST_URL##*/v}"
click-dog deploy docker --update -v "$VERSION" -o click-dog-docker
cd click-dog-docker
docker compose up -d
The update creates docker-compose.yml.bak and changes only the image tag. It
does not merge or rewrite click-dog.yaml. See Updating for the
shared config-default and prerelease contract.
If only the installer wrapper is available, the equivalent generator command is:
Remove¶
Stop and remove the Compose service from its generated directory:
After retaining any configuration you need, remove the generated directory
through your normal file-management workflow. click-dog deploy uninstall is
for the standard systemd installation and deliberately does not touch Docker.