Expand the Heracles dashboard a bit

This commit is contained in:
Jeremy Wall 2024-02-28 11:13:56 -05:00
parent d75180b59b
commit effb7cede8
2 changed files with 87 additions and 16 deletions

View File

@ -55,19 +55,13 @@
{
title = "CPU and Mem Used";
query_type = "Range";
plots = [
{ # CPU plot
source = "http://${config.services.prometheus.listen}";
query = ''
sum by (job,instance, mode)(irate(node_cpu_seconds_total[5m]))
/ ignoring(mode) group_left
sum by (job,instance)(irate(node_cpu_seconds_total[5m]))
'';
meta = {
name_format = "`\${labels.instance} - \${labels.mode}`";
d3_tick_format = "~%";
};
yaxes = [
{
anchor = "y";
tickformat = "~%";
}
];
plots = [
{ # Memory Usage
source = "http://${config.services.prometheus.listen}";
query = ''
@ -78,7 +72,84 @@
'';
meta = {
name_format = "`\${labels.instance} - Memory`";
d3_tick_format = "~%";
yaxis = "y";
fill = "tozeroy";
};
}
{ # CPU plot
source = "http://${config.services.prometheus.listen}";
query = ''
sum by (job,instance, mode)(irate(node_cpu_seconds_total{mode!="idle"}[5m]))
/ ignoring(mode) group_left
sum by (job,instance)(irate(node_cpu_seconds_total{mode!="idle"}[5m]))
'';
meta = {
name_format = "`\${labels.instance} - \${labels.mode}`";
axis = "y";
};
}
];
}
{
title = "Network Traffic Bytes";
query_type = "Range";
d3_tick_format = "~s";
yaxes = [
{
anchor = "y";
}
];
plots = [
{
source = "http://${config.services.prometheus.listen}";
query = ''
irate(node_network_receive_bytes_total{device=~"(lo|en).*"}[5m])
'';
meta = {
name_format = "`\${labels.device} Rx`";
yaxis = "y";
};
}
{
source = "http://${config.services.prometheus.listen}";
query = ''
irate(node_network_transmit_bytes_total{device=~"(lo|en).*"}[5m])
'';
meta = {
name_format = "`\${labels.device} Tx`";
yaxis = "y";
};
}
];
}
{
title = "Network problems";
query_type = "Range";
d3_tick_format = "~s";
yaxes = [
{
anchor = "y";
}
];
plots = [
{
source = "http://${config.services.prometheus.listen}";
query = ''
irate(node_network_transmit_errs_total{device=~'(lo|en).*'}[5m]) / irate(node_network_transmit_packets_total{device=~'(lo|en).*'}[5m])
'';
meta = {
name_format = "`\${labels.device} Tx Err rate`";
yaxis = "y";
};
}
{
source = "http://${config.services.prometheus.listen}";
query = ''
irate(node_network_receive_drop_total{device=~'(lo|en).*'}[5m]) / irate(node_network_receive_packets_total{device=~'(lo|en).*'}[5m])
'';
meta = {
name_format = "`\${labels.device} Rx drop rate`";
yaxis = "y";
};
}
];

View File

@ -329,11 +329,11 @@
"rust-overlay": "rust-overlay"
},
"locked": {
"lastModified": 1708705477,
"narHash": "sha256-8E0RSUf/UJSAANOhPRj/EE0de35m/l11SU4AJggNtxA=",
"lastModified": 1708869798,
"narHash": "sha256-ptDmgUUJBZ5SYkRNqmcfrSqIcsARsBO4CrOxKlFVmZY=",
"owner": "zaphar",
"repo": "Heracles",
"rev": "b1b65bbbecd20a7921711dba2d6dc34a4687d139",
"rev": "ac52aea6c84870afb6104d0184b4371ba689db89",
"type": "github"
},
"original": {