Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,10 @@ Authorization, ACLs, and Role Based Access Control (RBAC):

- See [docs/authorization.md](docs/authorization.md)

Monitoring and metrics (Prometheus / Grafana):

- See [docs/prometheus_metrics.md](docs/prometheus_metrics.md)

## Writing Client Applications

As a REST service, clients be developed using almost any programming language. The
Expand Down
37 changes: 37 additions & 0 deletions admin/docker/docker-compose.metrics.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Local monitoring overlay: adds Prometheus + Grafana to any HSDS compose stack.
#
# ./build.sh --no-lint # build the HSDS image from this branch (has /metrics)
# docker compose \
# -f admin/docker/docker-compose.posix.yml \
# -f admin/docker/docker-compose.metrics.yml \
# up -d --scale sn=1 --scale dn=2
#
# Prometheus: http://localhost:9090 Grafana: http://localhost:3000 (anonymous admin)
#
# Grafana comes with the Prometheus datasource pre-wired. Import the dashboard by hand
# (Dashboards -> New -> Import, paste admin/grafana/hsds-dashboard.json): it is Grafana
# schema v2 and needs Grafana 12+, which does not support loading v2 via file provisioning.
services:
prometheus:
image: prom/prometheus:latest
restart: ${RESTART_POLICY}
ports:
- "9090:9090"
volumes:
- ${PWD}/admin/prometheus/:/etc/prometheus/
command:
- --config.file=/etc/prometheus/prometheus.yml

grafana:
image: grafana/grafana:latest
restart: ${RESTART_POLICY}
ports:
- "3000:3000"
environment:
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_DISABLE_LOGIN_FORM=true
volumes:
- ${PWD}/admin/docker/grafana/provisioning/:/etc/grafana/provisioning/
depends_on:
- prometheus
7 changes: 7 additions & 0 deletions admin/docker/grafana/provisioning/datasources/datasource.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: 1
datasources:
- name: Prometheus
type: prometheus
access: proxy
url: http://prometheus:9090
isDefault: true
Loading
Loading