diff --git a/README.md b/README.md index 144bc45f..bcbe9ef2 100644 --- a/README.md +++ b/README.md @@ -172,3 +172,5 @@ $> ./cli.sh project test The project is monitored with prometheus and grafana. You can access the grafana dashboard at http://localhost:3000 with anonymous access. You will have dashboards for kafka cluster and the different components of the project. + +Check the [Grafana documentation](docs/Grafana.md) for more information. diff --git a/components/website-backend/tests/app/core/test_config.py b/components/website-backend/tests/app/core/test_config.py index 11e81108..62817da8 100644 --- a/components/website-backend/tests/app/core/test_config.py +++ b/components/website-backend/tests/app/core/test_config.py @@ -35,6 +35,7 @@ def test_env_dev_override_db_type_sqlite(monkeypatch: pytest.MonkeyPatch): def test_env_prod(monkeypatch: pytest.MonkeyPatch): monkeypatch.setenv("SECRET_KEY", "FAKE_VALUE") + monkeypatch.setenv("BASE_ACCOUNT_USERNAME", "FAKE_VALUE") monkeypatch.setenv("BASE_ACCOUNT_PASSWORD", "FAKE_VALUE") monkeypatch.setenv("POSTGRES_HOST", "localhost") monkeypatch.setenv("POSTGRES_DB", "FAKE_VALUE") diff --git a/docs/Grafana.md b/docs/Grafana.md new file mode 100644 index 00000000..aea62201 --- /dev/null +++ b/docs/Grafana.md @@ -0,0 +1,77 @@ +# Grafana Dashboards + +## Introduction + +Grafana is a multi-platform open source analytics and interactive visualization web application. It provides charts, graphs, and alerts for the web when connected to supported data sources. It is expandable through a plug-in system. End users can create complex monitoring dashboards using interactive query builders. + +## Prometheus + +Prometheus is an open-source monitoring and alerting toolkit. It is a part of the Cloud Native Computing Foundation. It collects metrics from configured targets at given intervals, evaluates rule expressions, displays the results, and can trigger alerts if some condition is observed to be true. + +## Configuration + +The different configurations for the Grafana dashboards are stored in the `monitoring` directory. + +``` +monitoring/ +├── grafana +│ └── provisioning +│ ├── dashboards +│ │ ├── dashboards.yml +│ │ └── data +│ │ ├── Engine metrics +│ │ │ ├── Market Data Subscription.json +│ │ │ ├── Market Matcher.json +│ │ │ ├── Order Book.json +│ │ │ ├── Order stream.json +│ │ │ ├── Quickfix server.json +│ │ │ └── Trade stream.json +│ │ └── Kafka metrics +│ │ ├── KMinion Cluster Dashboard - Prometheus Exporter for Apache Kafka.json +│ │ ├── KMinion Consumer Group Dashboard - Prometheus Exporter for Apache Kafka.json +│ │ └── KMinion Topic Dashboard - Prometheus Exporter for Apache Kafka.json +│ └── datasources +│ └── datasources.yml +└── prometheus + └── prometheus.yml +``` + +The `grafana` directory contains the configuration for the Grafana dashboards. The `provisioning` directory contains the configuration for the dashboards and the data sources. The `prometheus` directory contains the configuration for the Prometheus server. + +## Dashboards + +### Quickfix Server + +![alt text](imgs/quickfix-server-grafana.png) + +--- + +### Order Book + +![alt text](imgs/order-book-grafana.png) + +--- + +### Order Stream + +![alt text](imgs/order-stream-grafana.png) + +--- + +### Market Matcher + +![alt text](imgs/market-matcher-grafana.png) + +--- + +### Market Data Subscription + +![alt text](imgs/market-data-grafana.png) + +--- + +### Trade Stream + +![alt text](imgs/trade-stream-grafana.png) + +--- diff --git a/docs/imgs/market-data-grafana.png b/docs/imgs/market-data-grafana.png new file mode 100644 index 00000000..d2af67c8 Binary files /dev/null and b/docs/imgs/market-data-grafana.png differ diff --git a/docs/imgs/market-matcher-grafana.png b/docs/imgs/market-matcher-grafana.png new file mode 100644 index 00000000..9cc8050d Binary files /dev/null and b/docs/imgs/market-matcher-grafana.png differ diff --git a/docs/imgs/order-book-grafana.png b/docs/imgs/order-book-grafana.png new file mode 100644 index 00000000..9736e47a Binary files /dev/null and b/docs/imgs/order-book-grafana.png differ diff --git a/docs/imgs/order-stream-grafana.png b/docs/imgs/order-stream-grafana.png new file mode 100644 index 00000000..f3e836b5 Binary files /dev/null and b/docs/imgs/order-stream-grafana.png differ diff --git a/docs/imgs/quickfix-server-grafana.png b/docs/imgs/quickfix-server-grafana.png new file mode 100644 index 00000000..5d3176fa Binary files /dev/null and b/docs/imgs/quickfix-server-grafana.png differ diff --git a/docs/imgs/trade-stream-grafana.png b/docs/imgs/trade-stream-grafana.png new file mode 100644 index 00000000..2924c84e Binary files /dev/null and b/docs/imgs/trade-stream-grafana.png differ