grafana: fix bootstrap and errors log panels
Some checks failed
Run nix flake check / flake-check (push) Has been cancelled
Some checks failed
Run nix flake check / flake-check (push) Has been cancelled
- Bootstrap logs are plain text, not JSON - remove json parsing - Use | keep host instead of | drop MESSAGE to explicitly show only the host label for upgrade log panels Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -208,7 +208,7 @@
|
|||||||
"datasource": {"type": "loki", "uid": "loki"},
|
"datasource": {"type": "loki", "uid": "loki"},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "{systemd_unit=\"nixos-upgrade.service\", host=~\"$host\"} |= \"Done. The new configuration is\" | json | line_format \"{{.MESSAGE}}\" | drop MESSAGE",
|
"expr": "{systemd_unit=\"nixos-upgrade.service\", host=~\"$host\"} |= \"Done. The new configuration is\" | json | line_format \"{{.MESSAGE}}\" | keep host",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -231,7 +231,7 @@
|
|||||||
"datasource": {"type": "loki", "uid": "loki"},
|
"datasource": {"type": "loki", "uid": "loki"},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "{systemd_unit=\"nixos-upgrade.service\", host=~\"$host\"} |= \"building\" | json | line_format \"{{.MESSAGE}}\" | drop MESSAGE",
|
"expr": "{systemd_unit=\"nixos-upgrade.service\", host=~\"$host\"} |= \"building\" | json | line_format \"{{.MESSAGE}}\" | keep host",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -254,7 +254,7 @@
|
|||||||
"datasource": {"type": "loki", "uid": "loki"},
|
"datasource": {"type": "loki", "uid": "loki"},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "{job=\"bootstrap\", host=~\"$host\"} | json | line_format \"{{.MESSAGE}}\" | drop MESSAGE",
|
"expr": "{job=\"bootstrap\", host=~\"$host\"}",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -277,7 +277,7 @@
|
|||||||
"datasource": {"type": "loki", "uid": "loki"},
|
"datasource": {"type": "loki", "uid": "loki"},
|
||||||
"targets": [
|
"targets": [
|
||||||
{
|
{
|
||||||
"expr": "{systemd_unit=\"nixos-upgrade.service\", host=~\"$host\"} |~ \"(?i)error|failed\" | json | line_format \"{{.MESSAGE}}\" | drop MESSAGE",
|
"expr": "{systemd_unit=\"nixos-upgrade.service\", host=~\"$host\"} |~ \"(?i)error|failed\" | json | line_format \"{{.MESSAGE}}\" | keep host",
|
||||||
"refId": "A"
|
"refId": "A"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
Reference in New Issue
Block a user