diff options
| author | Robert Günzler <r@gnzler.io> | 2026-02-23 14:19:55 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2026-02-23 14:19:55 +0100 |
| commit | c9197b9bfd5cd3ab49ee7dfdc81d207715ccd5d8 (patch) | |
| tree | ce772751fa5fbde24b69f8de95280fe0b01a5b6a /bundles/prometheus/files/consoles/node-cpu.html | |
| parent | 98470f7be2244d2c40c0bd547eeef5b3bde2e858 (diff) | |
prometheus: modernize console + alerts
Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to 'bundles/prometheus/files/consoles/node-cpu.html')
| -rw-r--r-- | bundles/prometheus/files/consoles/node-cpu.html | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/bundles/prometheus/files/consoles/node-cpu.html b/bundles/prometheus/files/consoles/node-cpu.html deleted file mode 100644 index 64a2cad..0000000 --- a/bundles/prometheus/files/consoles/node-cpu.html +++ /dev/null @@ -1,60 +0,0 @@ -{{ template "head" . }} - -{{ template "prom_right_table_head" }} - <tr> - <th colspan="2">CPU(s): {{ template "prom_query_drilldown" (args (printf "scalar(count(count by (cpu)(node_cpu_seconds_total{job='node-exporter',instance='%s'})))" .Params.instance)) }}</th> - </tr> -{{ range printf "sum by (mode)(irate(node_cpu_seconds_total{job='node-exporter',instance='%s'}[5m])) * 100 / scalar(count(count by (cpu)(node_cpu_seconds_total{job='node-exporter',instance='%s'})))" .Params.instance .Params.instance | query | sortByLabel "mode" }} - <tr> - <td>{{ .Labels.mode | title }} CPU</td> - <td>{{ .Value | printf "%.1f" }}%</td> - </tr> -{{ end }} - <tr><th colspan="2">Misc</th></tr> - <tr> - <td>Processes Running</td> - <td>{{ template "prom_query_drilldown" (args (printf "node_procs_running{job='node-exporter',instance='%s'}" .Params.instance) "" "humanize") }}</td> - </tr> - <tr> - <td>Processes Blocked</td> - <td>{{ template "prom_query_drilldown" (args (printf "node_procs_blocked{job='node-exporter',instance='%s'}" .Params.instance) "" "humanize") }}</td> - </tr> - <tr> - <td>Forks</td> - <td>{{ template "prom_query_drilldown" (args (printf "irate(node_forks_total{job='node-exporter',instance='%s'}[5m])" .Params.instance) "/s" "humanize") }}</td> - </tr> - <tr> - <td>Context Switches</td> - <td>{{ template "prom_query_drilldown" (args (printf "irate(node_context_switches_total{job='node-exporter',instance='%s'}[5m])" .Params.instance) "/s" "humanize") }}</td> - </tr> - <tr> - <td>Interrupts</td> - <td>{{ template "prom_query_drilldown" (args (printf "irate(node_intr_total{job='node-exporter',instance='%s'}[5m])" .Params.instance) "/s" "humanize") }}</td> - </tr> - <tr> - <td>1m Loadavg</td> - <td>{{ template "prom_query_drilldown" (args (printf "node_load1{job='node-exporter',instance='%s'}" .Params.instance)) }}</td> - </tr> -<tr> -</tr> -{{ template "prom_right_table_tail" }} - -{{ template "prom_content_head" . }} - <h1>Node CPU - {{ reReplaceAll "(.*?://)([^:/]+?)(:\\d+)?/.*" "$2" .Params.instance }}</h1> - - <h3>CPU Usage</h3> - <div id="cpuGraph"></div> - <script> - new PromConsole.Graph({ - node: document.querySelector("#cpuGraph"), - expr: "sum by (mode)(irate(node_cpu_seconds_total{job='node-exporter',instance='{{ .Params.instance }}',mode!='idle',mode!='iowait',mode!='steal'}[5m]))", - renderer: 'area', - max: {{ with printf "count(count by (cpu)(node_cpu_seconds_total{job='node-exporter',instance='%s'}))" .Params.instance | query }}{{ . | first | value }}{{ else}}undefined{{end}}, - yAxisFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix, - yHoverFormatter: PromConsole.NumberFormatter.humanizeNoSmallPrefix, - yTitle: 'Cores' - }) - </script> -{{ template "prom_content_tail" . }} - -{{ template "tail" }} |