Skip to content

Commit

Permalink
Drop dev Grafana integration
Browse files Browse the repository at this point in the history
  • Loading branch information
bersace committed Jun 28, 2024
1 parent 1e0ef58 commit 094a1a8
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 404 deletions.
24 changes: 0 additions & 24 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -471,30 +471,6 @@ and if not found, tries to download wheel from PyPI.
Use top level `make dist` to generate wheels.


## Testing with Grafana

temBoard exposes /metrics in OpenMetric format. Development environment
includes Prometheus and Grafana preconfigured with authenticated access and
file-based service discovery. You only need a couple of steps to view temBoard
metrics in Grafana.

- Start development temBoard UI and at lease one of agent0 or agent1.
- Generate Prometheus targets using `make prom-targets`.
- Go to [development Grafana import page](http://localhost:3000/dashboard/import).
- Import Dashboard ID [1860](https://grafana.com/grafana/dashboards/1860)
(*Node Exporter Full*) or [9628](https://grafana.com/grafana/dashboards/1860)
(*PostgreSQL Database*).
- Now wait a few minutes that Prometheus scrapes data. Scrape interval is 1
minute.

temBoard exposes only a subset of metrics from node\_exporter and
postgres\_exporter, plus a set of custom metrics prefixed with `x`, e.g.
`xpg_wal_files_bytes_total`. Thus a lot of panel will show *N/A*.

Prometheus also watch `dev/prometheus/targets/custom.yaml` files for hand
written targets.


## Investigate logs with lnav

[lnav] is an awesome tool to browse and analyze log files.
Expand Down
6 changes: 1 addition & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ ui/build/bin/prometheus ui/build/bin/promtool: dev/downloads/prometheus-$(PROMET
clean: #: Trash venv and containers.
docker compose down --volumes --remove-orphans
docker rmi --force dalibo/temboard-agent:dev
rm -rf dev/venv-py* .venv-py* dev/build/ dev/prometheus/targets/temboard-dev.yaml
rm -rf dev/venv-py* .venv-py* dev/build/
rm -vf ui/build/bin/prometheus ui/build/bin/promtool
rm -rf agent/build/ .env agent/.coverage
rm -rvf ui/build/ ui/.coverage
Expand Down Expand Up @@ -128,10 +128,6 @@ tests: #: Execute all tests.
clean-tests: #: Clean tests runtime files
rm -rf tests/downloads/ tests/logs/ tests/screenshots/

prom-targets: dev/prometheus/targets/temboard-dev.yaml #: Generate Prometheus dev targets.
dev/prometheus/targets/temboard-dev.yaml: dev/bin/mktargets .env
$^ > $@

VERSION=$(shell cd ui; python3 setup.py --version)
BRANCH?=master
# When stable branch v8 is created, use this:
Expand Down
24 changes: 0 additions & 24 deletions dev/bin/mktargets

This file was deleted.

12 changes: 0 additions & 12 deletions dev/grafana/rootfs/etc/grafana/provisioning/dashboards/perf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,3 @@ providers:
allowUiUpdates: true
options:
path: /usr/share/temboard/perf.json
- name: "Postgres from temBoard agent"
type: file
folder: ''
allowUiUpdates: true
options:
path: /usr/share/temboard/postgres.json
- name: "temBoard Prometheus"
type: file
folder: ''
allowUiUpdates: true
options:
path: /usr/share/temboard/temboard-prometheus.json
201 changes: 0 additions & 201 deletions dev/grafana/rootfs/usr/share/temboard/postgres.json

This file was deleted.

Loading

0 comments on commit 094a1a8

Please sign in to comment.