Skip to content

Commit

Permalink
Auto create variables and dashboards
Browse files Browse the repository at this point in the history
  • Loading branch information
ThetaSinner committed Mar 6, 2024
1 parent 5bba75c commit e895e62
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,17 @@
configure_influx() {
influx setup --host http://localhost:8087 --username windtunnel --password windtunnel --org holo --bucket windtunnel --force
use_influx
# Import variables
ls influx/templates/variables/ | xargs -I % influx apply --host "$INFLUX_HOST" --token "$INFLUX_TOKEN" --org holo --file "`pwd`/influx/templates/variables/%" -quiet --force yes
# Import dashboards
ls influx/templates/dashboards/ | xargs -I % influx apply --host "$INFLUX_HOST" --token "$INFLUX_TOKEN" --org holo --file "`pwd`/influx/templates/dashboards/%" --quiet --force yes
}
# Remove data and config
clear_influx() {
curl http://localhost:8087/debug/flush
curl "http://localhost:8087/debug/flush"
rm "$INFLUX_CONFIGS_PATH"
}
'';
Expand Down

0 comments on commit e895e62

Please sign in to comment.