alpine: fix node exporter dashboard
This commit is contained in:
parent
83cacc4a05
commit
eb3094369e
2 changed files with 6 additions and 4 deletions
|
|
@ -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";
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
inherit (config.services) prometheus;
|
||||
nodes = [
|
||||
"alpine"
|
||||
"100.106.49.128"
|
||||
"zenix"
|
||||
"100.106.49.128" # laptop
|
||||
"100.65.29.110" # gaming pc
|
||||
];
|
||||
addPort = ip: "${ip}:${toString prometheus.exporters.node.port}";
|
||||
in {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue