alpine: fix node exporter dashboard

This commit is contained in:
Tristan 2025-06-22 16:36:33 +01:00
parent 83cacc4a05
commit eb3094369e
2 changed files with 6 additions and 4 deletions

View file

@ -5,9 +5,9 @@
name = "dashboards";
paths = map mkDashboard dashboards;
};
mkDashboard = {name, url, sha256}: pkgs.writeTextFile {
mkDashboard = {name, url, sha256, patch ? lib.id}: pkgs.writeTextFile {
inherit name;
text = builtins.readFile ( builtins.fetchurl {inherit url sha256;} );
text = patch (builtins.readFile ( builtins.fetchurl {inherit url sha256;} ));
destination = "/dash/${name}.json";
};
in {
@ -42,6 +42,8 @@ in {
name = "node-exporter";
url = "https://grafana.com/api/dashboards/1860/revisions/37/download";
sha256 = "sha256:0qza4j8lywrj08bqbww52dgh2p2b9rkhq5p313g72i57lrlkacfl";
# https://github.com/rfmoz/grafana-dashboards/issues/169
patch = builtins.replaceStrings ["$__rate_interval"] ["$__range"];
}
{
name = "synapse";