Skip to content

Commit 93919b1

Browse files
committed
Use Prometheus for storing and querying the metrics instead of SQLite
1 parent 2860123 commit 93919b1

File tree

15 files changed

+3300
-139
lines changed

15 files changed

+3300
-139
lines changed

stats-dashboard/Dockerfile

Lines changed: 0 additions & 2 deletions
This file was deleted.

stats-dashboard/README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ This Grafana dashboard allows to show metrics created from a series of librdkafk
44

55
Every line that looks like a librdkafka stats JSON is parsed and the corresponding metrics are put into a SQLite DB.
66

7+
From there the metrics are ingested into VictoriaMetrics to be queried with PromQL.
8+
79
Then a Grafana instance is started with a dashboard that queries those metrics, as soon as it's started the corresponding dashboard url
810
is opened.
911

10-
> **_NOTE:_** The dashboard uses the SQLite plugin for Grafana, later it can be modified to use PromQL and be reused for real time monitoring.
11-
1212
> **_NOTE:_** When mixing stats from different processes the instance name can be the same. To differentiate them, one can put in the same line a process id enclosed by the `####` separator e.g.: `####process 1####`.
1313
1414
Default password is `librdkafka:librdkafka`
@@ -20,16 +20,18 @@ Default password is `librdkafka:librdkafka`
2020

2121
## How to run
2222

23-
1. Generate the DB
23+
1. In a virtual environment install the dependencies with `pip install -r requirements.txt`
24+
25+
2. Generate the DB and open the dashboard
2426

2527
```
26-
./run.sh <text_file_to_parse.log>
28+
./run.py <text_file_to_parse.log>
2729
```
2830

2931
2. Later checks
3032

3133
```
32-
./run.sh
34+
./run.py
3335
```
3436

3537
## Preview

stats-dashboard/data/grafana.ini renamed to stats-dashboard/conf/grafana.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
;plugins = /var/lib/grafana/plugins
2828

2929
# folder that contains provisioning config files that grafana will apply on startup and while running.
30-
;provisioning = conf/provisioning
30+
provisioning = /usr/share/grafana/conf/provisioning
3131

3232
#################################### Server ####################################
3333
[server]

0 commit comments

Comments
 (0)