mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-10 14:50:40 +02:00
fix: rename influx org to machines; fix typo that prevented auth tokens from being created (organization>s<)
This commit is contained in:
parent
94b0d60ab5
commit
2120aefef5
7 changed files with 9 additions and 9 deletions
|
@ -28,7 +28,7 @@
|
|||
scrapeSensors = false;
|
||||
influxdb2 = {
|
||||
domain = config.networking.providedDomains.influxdb;
|
||||
organization = "servers";
|
||||
organization = "machines";
|
||||
bucket = "telegraf";
|
||||
node = "ward-influxdb";
|
||||
};
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
enable = true;
|
||||
influxdb2 = {
|
||||
domain = nodes.sentinel.config.networking.providedDomains.influxdb;
|
||||
organization = "servers";
|
||||
organization = "machines";
|
||||
bucket = "telegraf";
|
||||
node = "ward-influxdb";
|
||||
};
|
||||
|
|
|
@ -14,7 +14,7 @@ in {
|
|||
scrapeSensors = false;
|
||||
influxdb2 = {
|
||||
domain = sentinelCfg.networking.providedDomains.influxdb;
|
||||
organization = "servers";
|
||||
organization = "machines";
|
||||
bucket = "telegraf";
|
||||
node = "ward-influxdb";
|
||||
};
|
||||
|
|
|
@ -42,7 +42,7 @@ in {
|
|||
group = "influxdb2";
|
||||
};
|
||||
|
||||
services.influxdb2.provision.organization.servers.auths."grafana servers:telegraf (${config.node.name})" = {
|
||||
services.influxdb2.provision.organizations.machines.auths."grafana machines:telegraf (${config.node.name})" = {
|
||||
readBuckets = ["telegraf"];
|
||||
writeBuckets = ["telegraf"];
|
||||
tokenFile = nodes.ward-influxdb.config.age.secrets."grafana-influxdb-token-${config.node.name}".path;
|
||||
|
@ -132,14 +132,14 @@ in {
|
|||
enable = true;
|
||||
datasources.settings.datasources = [
|
||||
{
|
||||
name = "InfluxDB (servers)";
|
||||
name = "InfluxDB (machines)";
|
||||
type = "influxdb";
|
||||
access = "proxy";
|
||||
url = "https://${sentinelCfg.networking.providedDomains.influxdb}";
|
||||
orgId = 1;
|
||||
secureJsonData.token = "$__file{${config.age.secrets.grafana-influxdb-token.path}}";
|
||||
jsonData.version = "Flux";
|
||||
jsonData.organization = "servers";
|
||||
jsonData.organization = "machines";
|
||||
jsonData.defaultBucket = "telegraf";
|
||||
}
|
||||
# TODO duplicate above influxdb source (with scoped read tokens??) for each organization
|
||||
|
|
|
@ -91,7 +91,7 @@ in {
|
|||
passwordFile = config.age.secrets.influxdb-admin-password.path;
|
||||
tokenFile = config.age.secrets.influxdb-admin-token.path;
|
||||
};
|
||||
organizations.servers.buckets.telegraf = {};
|
||||
organizations.machines.buckets.telegraf = {};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ in {
|
|||
enable = true;
|
||||
influxdb2 = {
|
||||
domain = sentinelCfg.networking.providedDomains.influxdb;
|
||||
organization = "servers";
|
||||
organization = "machines";
|
||||
bucket = "telegraf";
|
||||
node = "ward-influxdb";
|
||||
};
|
||||
|
|
|
@ -66,7 +66,7 @@ in {
|
|||
group = "influxdb2";
|
||||
};
|
||||
|
||||
services.influxdb2.provision.organization.servers.auths."telegraf (${config.node.name})" = {
|
||||
services.influxdb2.provision.organizations.machines.auths."telegraf (${config.node.name})" = {
|
||||
readBuckets = ["telegraf"];
|
||||
writeBuckets = ["telegraf"];
|
||||
tokenFile = nodes.${cfg.influxdb2.node}.config.age.secrets."telegraf-influxdb-token-${config.node.name}".path;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue