Skip to content

hohu monitoring ​

Manage Prometheus and Grafana from the deployment templates using the Compose monitoring profile. This does not replace application deployment, database backups or business health checks.

Prerequisites ​

Docker and Docker Compose are available, and hohu deploy init has completed. Run from the deployment configuration's parent directory or a subdirectory. Check application deployment status and available server ports.

Command reference ​

CommandPurpose
hohu monitoring initSynchronize templates and prepare Grafana credentials
hohu monitoring upStart Prometheus and Grafana
hohu monitoring psShow service status with the monitoring profile enabled
hohu monitoring logsRead monitoring logs
hohu monitoring restartRestart monitoring services
hohu monitoring downStop and remove monitoring containers

Initialize and start ​

bash
hohu monitoring init

Synchronize deployment templates and replace a template placeholder GRAFANA_ADMIN_PASSWORD with a generated password, preserving existing non-placeholder values. --force overwrites outdated templates and defaults to off; save custom changes first.

Check the Grafana password, GRAFANA_PORT and PROMETHEUS_PORT in .hohu/deploy/.env, plus Compose port bindings and scrape configuration. Default ports are 3000 for Grafana and 9090 for Prometheus. Default publishing is not restricted to localhost; configure firewall or proxy access for your server and avoid exposing monitoring administration ports to everyone.

Start services ​

bash
hohu monitoring up

Start prometheus and grafana in the background. No additional options. Monitoring image pulls do not use deploy --image-source fallback.

Verify operation ​

bash
hohu monitoring ps

Show Compose status with the monitoring profile enabled; application services may also appear. Visit Grafana at the configured address, using the default username admin and deployment GRAFANA_ADMIN_PASSWORD.

Check Grafana data sources and dashboards and Prometheus scrape target status. Changing .env does not reset a password already stored in an existing Grafana data volume.

Logs and restart ​

bash
hohu monitoring logs
hohu monitoring logs -f prometheus

Accepts one or more service names, defaulting to prometheus and grafana. --follow / -f follows output and defaults to off; press Ctrl+C to exit.

Restart services ​

bash
hohu monitoring restart
hohu monitoring restart grafana

Defaults to both monitoring services. For logs and restart, specify only prometheus or grafana to avoid operating on other services. Use up for container recreation; restart does not recreate containers.

Stop monitoring ​

bash
hohu monitoring down

Stop and remove only prometheus and grafana containers, without a whole-stack Compose down or named volume removal. No additional options.

Troubleshooting ​

SymptomAction
Deployment configuration missingRun hohu deploy init and check the directory
Services do not startCheck image pulls, port conflicts and container logs
Grafana sign-in failsDistinguish initial credentials from passwords in existing volumes; do not delete volumes to recover an account
Dashboard has no dataCheck data sources, scrape targets and application metrics connectivity