socallinuxexpo / scale-network

SCaLE's on-site expo network configurations, wifi, tooling, and scripts
https://www.socallinuxexpo.org/
BSD 3-Clause "New" or "Revised" License
40 stars 16 forks source link

[READY] Generate prometheus config from inventory #649

Closed jshcmpbll closed 5 months ago

jshcmpbll commented 5 months ago

Description of PR

Adding a new function to the inventory script to generate a Prometheus config for the monitor nix machine

Previous Behavior

No Prometheus config generation

New Behavior

Prometheus config generation

Tests

nix build

jshcmpbll commented 5 months ago
nix/machines git:(jc/prometheus_config*)nix build .#nixosConfigurations.monitor.config.system.build.vm -L
path '/home/jsh/git/scale-network/nix/machines' does not contain a 'flake.nix', searching up
warning: Git tree '/home/jsh/git/scale-network' is dirty
prometheus.yml-checkconfig-checked> Checking /nix/store/5m91kiakaircymmy291y40hwpnd39xv4-prometheus.yml-checkconfig-checked
prometheus.yml-checkconfig-checked>   SUCCESS: 1 rule files found
prometheus.yml-checkconfig-checked>  SUCCESS: /nix/store/5m91kiakaircymmy291y40hwpnd39xv4-prometheus.yml-checkconfig-checked is valid prometheus config file syntax
prometheus.yml-checkconfig-checked> Checking /nix/store/kscvk5xl7l4rk10bdz57c4grfipd2cfx-rules-checkrules-checked
prometheus.yml-checkconfig-checked>   SUCCESS: 0 rules found
sarcasticadmin commented 5 months ago

Epic, thanks @jshcmpbll ! This pairs really nicely now that we have prometheus in the AP image

Ignoring CI, the failed test is fixed in #642