Metadata-Version: 2.4
Name: flowspec_exporter
Version: 0.1.1
Summary: Add your description here
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: netaddr>=1.3.0
Requires-Dist: asyncssh>=2.20.0
Requires-Dist: dataclasses-json>=0.6.7
Provides-Extra: all
Requires-Dist: python-json-logger>=3.2.1; extra == "all"
Requires-Dist: pytimeparse>=1.1.8; extra == "all"
Requires-Dist: tenacity>=9.0.0; extra == "all"
Requires-Dist: asyncpg>=0.30.0; extra == "all"
Requires-Dist: prometheus-client>=0.23.1; extra == "all"
Requires-Dist: fastapi[standard-no-fastapi-cloud-cli]>=0.118.0; extra == "all"
Dynamic: license-file

# FlowSpec Exporter

A tool to export FlowSpec rules from routers and parse them into a structured format.

You can either collect the data directly into a PostgreSQL database or export it and use Prometheus to scrape it.

## Supported Routers

- Cisco IOS
- Juniper JunOS
- Huawei VRP

## Kwown Issues / Limitations

- Long rules may be truncated in the routers output. Hence, the parser may not be able to parse them correctly.
- Routers can interpret rules differently. So even if you send the same rule to different routers, they may appear differently in the output.

## How to Use

- Install the dependencies:

```bash
uv sync --extra all
```

- Edit the `config.toml` with your own values.

- Make sure you have a PostgreSQL database running:

```bash
docker run -d --name timescaledb -p 5432:5432 -e POSTGRES_PASSWORD=password timescale/timescaledb-ha:pg17
```

- Run the worker:

```bash
python -m src.worker
```
