Skip to content

Commit

Permalink
add utility commands for metrics in justfile (#143)
Browse files Browse the repository at this point in the history
### What

I want to open our various dashboards in the browser, but I don't want
to remember ports and open up my browser and type addresses. this makes
it a bit easier.

### How

Adding new justfile commands: `open-jaeger`, `open-prometheus`,
`open-grafana`.
  • Loading branch information
soupi committed Nov 3, 2023
1 parent 287dd6e commit 4be0b1d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ A benchmark history can be viewed [here](https://hasura.github.io/ndc-postgres/d

## Testing metrics

We have a Prometheus / Grafana set up in Docker. Run `just start-metrics` to
start them, you can then navigation to `localhost:3001` for Grafana, or
`localhost:9090` for Prometheus.
We have a Prometheus / Grafana set up in Docker. Run `just open-prometheus` or
`just open-grafana` to start them and navigate to the prometheus or grafana
dashboards respectively.

### Editing Grafana dashboard

Expand Down
13 changes: 13 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,19 @@ run-engine: start-dependencies
--metadata-path ./static/postgres/chinook-metadata.json \
--authn-config-path ./static/auth_config.json

# Navigate to the jaeger console
open-jaeger:
open http://localhost:4002/search?service=ndc-postgres

# Navigate to the grafana console
open-grafana: start-metrics
@echo "The login and password are admin:grafana"
open http://localhost:3001

# Navigate to the prometheus console
open-prometheus: start-metrics
open http://localhost:9090

# start a postgres docker image and connect to it using psql
repl-postgres:
@docker compose up --wait postgres
Expand Down

0 comments on commit 4be0b1d

Please sign in to comment.