Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/csullivanupgrade/opa-exporter
https://github.com/csullivanupgrade/opa-exporter
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/csullivanupgrade/opa-exporter
- Owner: csullivanupgrade
- License: apache-2.0
- Fork: true (runyontr/opa-scorecard)
- Created: 2022-06-23T20:07:10.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-02T10:05:09.000Z (over 1 year ago)
- Last Synced: 2024-06-21T14:14:48.294Z (5 months ago)
- Language: Go
- Size: 16.1 MB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# opa-exporter
A simple exporter for monitoring OPA Constraint Violations in realtime.
Inspired by this
[blog
post](https://itnext.io/expose-open-policy-agent-gatekeeper-constraint-violations-with-prometheus-and-grafana-6b7ac92ea07f),
from which the exporter code itself originates.## Why fork?
The source was written as a proof of concept. My needs dictate a production-ready product with timely updates. This fork
intends to be that.## Contributing
Pull requests are welcome! Please read [CONTRIBUTING.md](CONTRIBUTING.md) before beginning.
This repo makes heavy use of [Taskfiles](https://taskfile.dev). Install this first.
Please check that you have the other necessary prerequisites installed by running:
```
task req
```### Setting up an environment
First create your cluster:
```
task kind:create
```Deploy gatekeeper and observability stack:
```
task gk:deploy
# OR IF USING EXTERNAL DATA IN YOUR POLICIES:
task gk:deploy ED_ENABLED=true
```Deploy the prometheus stack:
```
task prom:deploy
```Build the container image:
```
task build
```Deploy the container image:
```
task deploy
```Run port-forwarding for the local grafana:
```
task prom:port-forward
```At this point you may open grafana at localhost:3000 and view the OPA dashboard. You can test your policies and see
the violations appear in this dashboard.