Skip to content

A POC for displaying KPI metrics of processes and services • This repository is defined and managed in Terraform

License

Notifications You must be signed in to change notification settings

ministryofjustice/operations-engineering-kpi-dashboard-poc

Repository files navigation

Operations Engineering KPI Dashboard

repo standards badge

⚠️ This is a Proof of concept and is not an application that Operations Engineering currently operate or support

The purpose of the KPI Dashboard is to enable Operations Engineering to easily track the value of systems and processes over time to make data-driven decisions about their future.

🏗️ Project Structure

.
├── app
│   ├── app.py # 👈 Where all application code is held at the moment
│   └── run.py # 👈 Entrypoint for Gunicorn to run the app
├── data # 👈 Ignored by git - use this directory to store sensitive data you want to load locally (copy `example_data` for a starting point)
│   └── support-stats.csv
│   └── ...
├── example-data # 👈 example data set, rename to data to so that app can use it
└── grafana # 👈 Where all grafana configuration lives
└── docker-compose.yaml

🥞 Technical Stack

The current solution is composed of two components, the Dashboard UI and a Database 📈 💿

  • UI
    • Dash and Plotly - for creating dashboards from data with no JavaScript 😱
      • Pandas - for reading in data from CSV, JSON, SQL etc. and converting it into a readable format by Dash/Plotly 🐼
    • Grafana UI Alternative - for creating dashboards from data 📊
  • Data Sources
    • PostgresDB - for storing data (that can be auto-populated by systems when/if this goes live 🙈)
    • CSV files - example CSV files stored in example-data though the application reads from ./data 💿

👾 Development

🚶 Prerequisites

To develop, deploy or run this app, you will need to install the following:

🏃 Running Locally

The application is currently composed of a Python Web Server and Postgres Database, that can be run locally through Docker Compose with the following command:

docker compose up --build

Sometimes this command can fail on the first run - if it does, spin down compose with docker compose down and re-launch! 🚀

You can then go to the UI to see graphs for the given data sets:

Name URL
Dash/Plotly http://localhost:4567

✌️ Grafana Locally

As an alternative dashboarding option - you can chose to also spin up a Grafana Dashboard locally using the following command:

docker compose -f docker-compose-grafana.yaml up --build

You can then go to the following UIs to see graphs for the given data sets:

Name URL
Grafana http://localhost:3000
Dash/Plotly http://localhost:4567

About

A POC for displaying KPI metrics of processes and services • This repository is defined and managed in Terraform

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published