Skip to content
This repository was archived by the owner on Mar 13, 2026. It is now read-only.

Commit e0229be

Browse files
committed
Update README
1 parent ecb8256 commit e0229be

2 files changed

Lines changed: 28 additions & 5 deletions

File tree

README.md

Lines changed: 28 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,41 @@
1-
# github-workflows-monitoring
1+
# GitHub Workflows Monitoring
22

33
[![Tests](https://github.com/midokura/github-workflows-monitoring/actions/workflows/tests.yaml/badge.svg)](https://github.com/midokura/github-workflows-monitoring/actions/workflows/tests.yaml)
44

55
## About
66

7-
Github Workflow Monitoring is a small Flask-based web server that connects to Github using websockets to monitor Github Actions workflows. It tracks each workflow's state (queued, in_progress, completed) and calculates the time spent in each state. The metrics are logged in logfmt format for easy consumption by Grafana.
7+
Github Workflows Monitoring is a small Python (Flask-based) application that processes [GitHub webhook calls] and logs them.
8+
It tracks each workflow's state (`queued`, `in_progress`, `completed`) and calculates the time spent in each state.
9+
10+
This application can be very useful to gather information about Organization Runners:
11+
- How much time is spent before a job starts processing?
12+
- What repositories are triggering lots of jobs?
13+
14+
The metrics are logged in `logfmt` format to simplify querying them (eg. with Grafana).
15+
16+
[GitHub webhook calls]: https://docs.github.com/en/developers/webhooks-and-events/webhooks/creating-webhooks
17+
18+
## Setup
19+
20+
Go to your **GitHub Organization** >> **Settings** >> **Webhooks** >> **Add new webhook**.
21+
22+
Expose your application to Internet (ngrok, Load Balancer, etc), and **use endpoint** `/github-webhook`.
23+
24+
![Example of Webhook configuration](media/github_setup.png)
25+
26+
The **events** that are currently supported are:
27+
- Workflow jobs
828

929
## Testing
1030

1131
Into a virtual environment, install the requirements:
1232

13-
pip install -r tests/requirements.txt
14-
33+
```sh
34+
pip install -r tests/requirements.txt
35+
```
1536

1637
To run the tests:
1738

18-
pytest --cov=src
39+
```sh
40+
pytest --cov=src
41+
```

media/github_setup.png

27.1 KB
Loading

0 commit comments

Comments
 (0)