No description
  • Rust 90%
  • Nix 7.5%
  • Dockerfile 2.5%
Find a file
Evelyn Alicke a5659b70d6
All checks were successful
Build legacy Nix package on Ubuntu / build (push) Successful in 7m12s
docs: update to reflect reality
2026-04-26 20:42:52 +02:00
.forgejo/workflows bonk ci? 2025-02-13 16:06:47 +01:00
src chore: update dependencies 2026-04-26 20:05:34 +02:00
.dockerignore chore(everything): too much honestly 2023-06-27 21:00:25 +02:00
.envrc chore(nix): update dev flake 2024-09-23 22:28:31 +02:00
.gitignore fix nix build 2025-02-13 16:01:40 +01:00
Cargo.lock chore: update dependencies 2026-04-26 20:05:34 +02:00
Cargo.toml chore: update dependencies 2026-04-26 20:05:34 +02:00
config.yml chore(everything): too much honestly 2023-06-27 21:00:25 +02:00
default.nix fix nix build 2025-02-13 16:01:40 +01:00
docker-compose.yml chore(gh-actions): provide both docker and binary releases 2024-09-23 22:28:23 +02:00
Dockerfile chore(everything): too much honestly 2023-06-27 21:00:25 +02:00
flake.lock chore: update dependencies 2026-04-26 20:05:34 +02:00
flake.nix fix nix build 2025-02-13 16:01:40 +01:00
LICENSE.md docs(license, readme): improve documentation and add license 2023-07-03 10:53:44 +02:00
README.md docs: update to reflect reality 2026-04-26 20:42:52 +02:00
shell.nix fix nix build 2025-02-13 16:01:40 +01:00

openmetrics-vici-exporter

Provides an openmetrics compatible endpoint for strongSwan charon's VICI.

Features

as of v0.1.0 the following metrics are exporterd:

name
sa_uptime seconds since state changed to up
sa_rekey_time seconds to next renewal
name
sa_child_bytes_in bytes recieved
sa_child_bytes_out bytes send
sa_child_packets_in packets received
sa_child_packets_out packets sent

Planned Features:

  • v0.2.0
    • rewrite to use open-metrics protobuf format
  • v0.3.0
    • an info metric showing the applied configuration
    • an enum metric showing the current state / queued jobs per connection

Usage

Configuration

All values have defaults, no configuration is necessary, but an exhaustive default configuration is still provided, see config.yml.

You can also set these as environment variables, prefixed with VICI_EXPORTER

Key Default
vici.socket /var/run/charon.vici unix socket where vici is reachable
vici.interval 10 how often to get data from the vici, in seconds
server.address 0.0.0.0 any bind address, ipv6 is also allowed [::1]
server.port 8000

Development

if you'd like to contribute you are free to do so.

we provide a nix flake (nix develop) to setup the rust enviroment for you, but there's still some manual setup to do.

you need charon running with the vici plugin enabled in the configuration.

make sure your user has the required permissions to access the vici socket.

on a debian system you can just run the following to give yourself access:

sudo groupadd vici
sudo chown root:vici /var/run/charon.vici
sudo chmod 0770 /var/run/charon.vici
sudo usermod -aG vici $(whoami)

cargo run && curl http://[::1]:8001/metrics

License

AGPL-3.0-only

Authors

This software was intially authored and maintained as open-source by Famedly's Infrastructure Team. In 2025, evlli hard-forked the project for further development.

since 2025

2023 to 2024