fuuko: Add hcloud_exporter

This commit is contained in:
Simon Bruder 2021-08-28 13:53:38 +02:00
parent 74955039f3
commit 9f4ffa5932
Signed by: simon
GPG key ID: 8D3C82F9F309F8EC
4 changed files with 30 additions and 14 deletions

View file

@ -214,11 +214,11 @@
]
},
"locked": {
"lastModified": 1629636545,
"narHash": "sha256-I98lOZxgG2NId549fp/2TAEVQACKKJLEqXCxvOxFmlQ=",
"lastModified": 1630150828,
"narHash": "sha256-nwabQfj/8/YIoyY7+x0jZbQyvA/D3/OipoEQCT3JWLM=",
"ref": "master",
"rev": "d408a21736f685dec0426edd0bf12fbbd229b778",
"revCount": 28,
"rev": "f28ea2244d33d0ed663e7864de55a77899e7f226",
"revCount": 31,
"type": "git",
"url": "https://git.sbruder.de/simon/nixpkgs-overlay"
},

View file

@ -50,6 +50,7 @@
, krops
, nix-pre-commit-hooks
, nixpkgs
, nixpkgs-overlay
, ...
}@inputs: flake-utils.lib.eachDefaultSystem
(system:
@ -195,7 +196,8 @@
aria2_exporter.nixosModules.aria2_exporter
bang-evaluator.nixosModules.bang-evaluator
]) ++ extraModules;
]) ++ (builtins.attrValues nixpkgs-overlay.nixosModules)
++ extraModules;
})
(import ./machines inputs);
};

View file

@ -2,6 +2,7 @@ drone-rpc-environment: ENC[AES256_GCM,data:2Alck43ZrOFzhY7fKonIyboROD5qGuKkalTXl
drone-server-environment: ENC[AES256_GCM,data:73uDSq+u3nGiKhLqdhdegTIvec9mF9jxVLJLtCjer5jUiFEZu5PkeYv0AWAyLWbB7s8b0V+4fxNQo/QsAfBWH0eP2TVOAy1TAo/sOso9PEVRaQCdilw39UJBdT8II3dy9YIfGFUXRUXCMU+1xfzUFjhU0s7sc+mYQ4jEj2ZX90UbUDcbgppNjC7KIHo8mQdrxFHeMq+wQpaoncwFMlwwzn8lFlG75+dMnkPGYa4xSqkwjHn2tewLM8f9dCiBQVoMVQCWo+1RieMq2cd3CYEkP7MPl+y3OA==,iv:kggBBXdN01LJ82azzxOZap1lfWglshC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Q==,type:str]
nix-binary-cache-htpasswd: ENC[AES256_GCM,data:IktPHrrvExeZlCPmP82W9AovC59ILPbMQExVDO7U2S9lJ9cQKP14mQPuYwA+yKTycIdA01MwRDbt/SxhVleZ+aKkyOPwx/iG5B0cQX6cVqQWVTNVmxlW2sjupnnwwibcdikU21CIw6YsDKs7pMqRAfC/U2OJ3POo2qH5GgFY,iv:ofzEQ143HQQGZIEVkdWCrcENz0i6JPljLDGmG0A7aJ8=,tag:a557cdgRD25jWHhZeT+CnQ==,type:str]
prometheus-htpasswd: ENC[AES256_GCM,data:eJOWrcTC3YISJJLuQV6sxzD0r8Gr8uoUt48D9sSEHhsbNUUy3pDgIPqJHrkG0ek2sIF6NvpWdDGK1kFcduRAL9h7nLxQLOtf7dxsdObGlPH5nwe6CwdR+1wTE/2WzrsmTGnUrMjMiBgLPV2yRiQg3VJ7W1Me8tHPYHrqYhM=,iv:WvgwIoIfxc3vyjF+znyUzOElv+sd/thoYpxWVaIavx0=,tag:9FnRw7ol++1PCbl1c2IyoA==,type:str]
restic-password: ENC[AES256_GCM,data:IVFXmuzzvvqDS0T3P0R5ZMIn2wdkbE1AqwDMkWqMpDdCOVMP4/HhP4jF+tEarq22,iv:Eu6Wspzm0rPl0CuSoYTTLz+MmaEtmwCD57nH2JTBuaA=,tag:tKqt5Z7nF7lLcSsDKS4E3A==,type:str]
@ -15,10 +16,11 @@ sops:
gcp_kms: []
azure_kv: []
hc_vault: []
lastmodified: '2021-05-02T11:00:36Z'
mac: ENC[AES256_GCM,data:/6fzsH4xIoJtjUY68pfYBGNT8a22SwJ/JITqHMEdwqEMclZKbKLiU56RMREc88kqXz8Fj4sSTCc4lE4Q0o6IhWD3LXdh31PjrNatvxjobgXPsGP64j+g/7xlw1Q/o+MyNpnrK8+1oxswPNiLs2vivFY18PtIiCDZW+6tJ1SuLic=,iv:8J6743R+21xNlGohLyZ46f9a8VjCdLN3Ezm5t5uoRq8=,tag:YZ4hbYTRgYtgCB/myv5+tw==,type:str]
age: []
lastmodified: "2021-08-28T11:43:22Z"
mac: ENC[AES256_GCM,data:vMOdapzHflV6LtUQbSmP2y0wgPXFxKqC3XtVfThy7DvBcZNSa/TN/ZOGMdKXx4qX0na1lwd8JEQ97i4FOgyediCwshjJXVFLqcFP5roXlA+hgeWtWEsrWdnZlz9KoWsFX5Cm+QU3oV+0g8tAnznfXCwDPlBTnqPAnj8BtjQVSIc=,iv:8F07K351cJBpNA0BURSeVYeW7CuC9hpNeODNF8Qq2W4=,tag:BHx83f+hHghPEt7q5xzVyg==,type:str]
pgp:
- created_at: '2021-04-06T11:27:21Z'
- created_at: "2021-04-06T11:27:21Z"
enc: |
-----BEGIN PGP MESSAGE-----
@ -38,7 +40,7 @@ sops:
=dltN
-----END PGP MESSAGE-----
fp: 47E7559E037A35652DBBF8AA8D3C82F9F309F8EC
- created_at: '2021-04-06T11:27:21Z'
- created_at: "2021-04-06T11:27:21Z"
enc: |
-----BEGIN PGP MESSAGE-----
@ -59,4 +61,4 @@ sops:
-----END PGP MESSAGE-----
fp: 2372651C56E22972C2D9F3F569C8187C9C43754E
unencrypted_suffix: _unencrypted
version: 3.6.0
version: 3.7.1

View file

@ -119,6 +119,10 @@ in
replacement = "fuuko.home.sbruder.de";
};
}
{
job_name = "hcloud";
static_configs = mkStaticTarget config.services.hcloud_exporter.listenAddress;
}
];
rules =
@ -184,6 +188,14 @@ in
# get rid of “could not call action: authorization required” every scrape
systemd.services.prometheus-fritzbox-exporter.serviceConfig.StandardOutput = "null";
# exporters that are not part of nixpkgs prometheus infrastructure
services.hcloud_exporter = {
enable = true;
listenAddress = "127.0.0.1:9501";
environmentFile = config.sops.secrets.hcloud_exporter-environment.path;
};
sops.secrets.hcloud_exporter-environment.sopsFile = ../secrets.yaml;
sops.secrets.prometheus-htpasswd = {
owner = "nginx";
sopsFile = ../secrets.yaml;