-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
closes: #6
- Loading branch information
Showing
5 changed files
with
153 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,38 @@ | ||
[![CI](https://github.com/famedly/openmetrics-vici-expoter/actions/workflows/build.yml/badge.svg?event=release)](https://github.com/famedly/openmetrics-vici-expoter/actions/workflows/build.yml) | ||
|
||
# openmetrics-vici-exporter | ||
|
||
provides an openmetrics compatible endpoint for strongSwan charon's VICI. | ||
initally tested against strongSwan 5.9 and strongSwan 6.0. | ||
|
||
## deployment | ||
pull container image from `ghcr.io`, see `docker-compose.yml` in this repo | ||
## Usage | ||
### Deployment | ||
for pre-build binaries see [Releases](/releases) | ||
we also provide a docker container. | ||
`docker pull docker-oss.nexus.famedly.de/openmetrics-vici-exporter` | ||
|
||
## Configuration | ||
|
||
an exhaustive default configuration is provided as [`config.yml`](/blob/main/config.yml) | ||
<br> | ||
all the keys can also be set as environment variables if you prefer this. | ||
they will be prefixed with `VICI_EXPORTER` | ||
for example, you would configure the vici polling interval by setting `VICI_EXPORTER_VICI_INTERVAL=10` | ||
|
||
## development | ||
|
||
## Development | ||
you need to make sure to have strongswan running and some connections configured and running, aswell as your user to haev the necessary permissions to access the socket. | ||
|
||
1. `nix develop` | ||
1. `sudo groupadd vici` | ||
2. `sudo chown root:vici /var/run/charon.vici` | ||
3. `sudo chmod 0770 /var/run/charon.vici` | ||
4. `sudo usermod -aG vici $user` | ||
4. `sudo usermod -aG vici $(whoami)` | ||
5. `cargo run` | ||
6. `curl http://localhost:8001/metrics` | ||
|
||
|
||
## license | ||
## License | ||
|
||
[AGPL-3.0-only](LICENSE.md) | ||
|
||
## authors | ||
## Authors | ||
|
||
- Evelyn Alicke <e.alicke@famedly.com> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,16 @@ | ||
version: '3' | ||
|
||
services: | ||
ove: | ||
openmetrics-vici-exporter: | ||
image: docker-oss.famedly.de/openmetrics-vici-exporter | ||
restart: "unless-stopped" | ||
environment: | ||
- VICI_EXPORTER_VICI_SOCKET="/var/run/charon.vici" | ||
- VICI_EXPORTER_VICI_INTERVAL=10 | ||
- VICI_EXPORTER_SERVER_ADDRESS=0.0.0.0 | ||
- VICI_EXPORTER_SERVER_PORT=8001 | ||
volumes: | ||
#- ./config.yml:/opt/openmetrics-vici-exporter/config.yml | ||
# - ./config.yml:/opt/openmetrics-vici-exporter/config.yml | ||
- /var/run/charon.vici:/var/run/charon.vici | ||
ports: | ||
- 8111:80/tcp | ||
- 8001:8001/tcp |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.