# Infra Exporter

Infra Exporter is a Prometheus exporter for infrastructure metrics. It exposes metrics about Infra API CRs.

## Add a new metric

1. Follow `resources/network.go` as an example, add a new file under `resources` directory for the new metric.
2. Add a new collector to `func GetAllCollectors()` in `resources/interface.go`.

## Test

1. Run the infra exporter locally:
```bash
go run main.go --infra-kubeconfig <path to dev infra apiserver kubeconfig>
```

2. Open the metrics endpoint in a browser: http://localhost:8090/metrics

3. Check if metrics are being exported correctly.
