forked from mirrors_public/oddlama_nix-config
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;
|
scrapeSensors = false;
|
||||||
influxdb2 = {
|
influxdb2 = {
|
||||||
domain = config.networking.providedDomains.influxdb;
|
domain = config.networking.providedDomains.influxdb;
|
||||||
organization = "servers";
|
organization = "machines";
|
||||||
bucket = "telegraf";
|
bucket = "telegraf";
|
||||||
node = "ward-influxdb";
|
node = "ward-influxdb";
|
||||||
};
|
};
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
enable = true;
|
enable = true;
|
||||||
influxdb2 = {
|
influxdb2 = {
|
||||||
domain = nodes.sentinel.config.networking.providedDomains.influxdb;
|
domain = nodes.sentinel.config.networking.providedDomains.influxdb;
|
||||||
organization = "servers";
|
organization = "machines";
|
||||||
bucket = "telegraf";
|
bucket = "telegraf";
|
||||||
node = "ward-influxdb";
|
node = "ward-influxdb";
|
||||||
};
|
};
|
||||||
|
|
|
@ -14,7 +14,7 @@ in {
|
||||||
scrapeSensors = false;
|
scrapeSensors = false;
|
||||||
influxdb2 = {
|
influxdb2 = {
|
||||||
domain = sentinelCfg.networking.providedDomains.influxdb;
|
domain = sentinelCfg.networking.providedDomains.influxdb;
|
||||||
organization = "servers";
|
organization = "machines";
|
||||||
bucket = "telegraf";
|
bucket = "telegraf";
|
||||||
node = "ward-influxdb";
|
node = "ward-influxdb";
|
||||||
};
|
};
|
||||||
|
|
|
@ -42,7 +42,7 @@ in {
|
||||||
group = "influxdb2";
|
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"];
|
readBuckets = ["telegraf"];
|
||||||
writeBuckets = ["telegraf"];
|
writeBuckets = ["telegraf"];
|
||||||
tokenFile = nodes.ward-influxdb.config.age.secrets."grafana-influxdb-token-${config.node.name}".path;
|
tokenFile = nodes.ward-influxdb.config.age.secrets."grafana-influxdb-token-${config.node.name}".path;
|
||||||
|
@ -132,14 +132,14 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
datasources.settings.datasources = [
|
datasources.settings.datasources = [
|
||||||
{
|
{
|
||||||
name = "InfluxDB (servers)";
|
name = "InfluxDB (machines)";
|
||||||
type = "influxdb";
|
type = "influxdb";
|
||||||
access = "proxy";
|
access = "proxy";
|
||||||
url = "https://${sentinelCfg.networking.providedDomains.influxdb}";
|
url = "https://${sentinelCfg.networking.providedDomains.influxdb}";
|
||||||
orgId = 1;
|
orgId = 1;
|
||||||
secureJsonData.token = "$__file{${config.age.secrets.grafana-influxdb-token.path}}";
|
secureJsonData.token = "$__file{${config.age.secrets.grafana-influxdb-token.path}}";
|
||||||
jsonData.version = "Flux";
|
jsonData.version = "Flux";
|
||||||
jsonData.organization = "servers";
|
jsonData.organization = "machines";
|
||||||
jsonData.defaultBucket = "telegraf";
|
jsonData.defaultBucket = "telegraf";
|
||||||
}
|
}
|
||||||
# TODO duplicate above influxdb source (with scoped read tokens??) for each organization
|
# 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;
|
passwordFile = config.age.secrets.influxdb-admin-password.path;
|
||||||
tokenFile = config.age.secrets.influxdb-admin-token.path;
|
tokenFile = config.age.secrets.influxdb-admin-token.path;
|
||||||
};
|
};
|
||||||
organizations.servers.buckets.telegraf = {};
|
organizations.machines.buckets.telegraf = {};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
influxdb2 = {
|
influxdb2 = {
|
||||||
domain = sentinelCfg.networking.providedDomains.influxdb;
|
domain = sentinelCfg.networking.providedDomains.influxdb;
|
||||||
organization = "servers";
|
organization = "machines";
|
||||||
bucket = "telegraf";
|
bucket = "telegraf";
|
||||||
node = "ward-influxdb";
|
node = "ward-influxdb";
|
||||||
};
|
};
|
||||||
|
|
|
@ -66,7 +66,7 @@ in {
|
||||||
group = "influxdb2";
|
group = "influxdb2";
|
||||||
};
|
};
|
||||||
|
|
||||||
services.influxdb2.provision.organization.servers.auths."telegraf (${config.node.name})" = {
|
services.influxdb2.provision.organizations.machines.auths."telegraf (${config.node.name})" = {
|
||||||
readBuckets = ["telegraf"];
|
readBuckets = ["telegraf"];
|
||||||
writeBuckets = ["telegraf"];
|
writeBuckets = ["telegraf"];
|
||||||
tokenFile = nodes.${cfg.influxdb2.node}.config.age.secrets."telegraf-influxdb-token-${config.node.name}".path;
|
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