mirror of
https://github.com/SebastianStork/nixos-config.git
synced 2026-03-22 18:59:07 +01:00
Compare commits
2 commits
5a346cd856
...
de5314fc31
| Author | SHA1 | Date | |
|---|---|---|---|
| de5314fc31 | |||
| 2aacfb2689 |
4 changed files with 16 additions and 5 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
|
@ -89,14 +89,14 @@ jobs:
|
||||||
run: nix build .#checks.x86_64-linux.${{ matrix.check }} --print-build-logs
|
run: nix build .#checks.x86_64-linux.${{ matrix.check }} --print-build-logs
|
||||||
build-server:
|
build-server:
|
||||||
needs: parse-flake
|
needs: parse-flake
|
||||||
uses: ./.github/workflows/build-host.yml
|
uses: ./.github/workflows/_build-host.yml
|
||||||
with:
|
with:
|
||||||
hosts: ${{ needs.parse-flake.outputs.servers }}
|
hosts: ${{ needs.parse-flake.outputs.servers }}
|
||||||
secrets:
|
secrets:
|
||||||
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
CACHIX_AUTH_TOKEN: ${{ secrets.CACHIX_AUTH_TOKEN }}
|
||||||
build-workstation:
|
build-workstation:
|
||||||
needs: parse-flake
|
needs: parse-flake
|
||||||
uses: ./.github/workflows/build-host.yml
|
uses: ./.github/workflows/_build-host.yml
|
||||||
with:
|
with:
|
||||||
hosts: ${{ needs.parse-flake.outputs.workstations }}
|
hosts: ${{ needs.parse-flake.outputs.workstations }}
|
||||||
secrets:
|
secrets:
|
||||||
|
|
|
||||||
|
|
@ -83,7 +83,10 @@ in
|
||||||
notification = {
|
notification = {
|
||||||
topic = "splitleaf";
|
topic = "splitleaf";
|
||||||
priority = "default";
|
priority = "default";
|
||||||
templates.title = ''{{ if eq .Status "firing" }}{{ index .Annotations "summary" }}{{ else }}{{ index .Annotations "summary_resolved" }}{{ end }}'';
|
templates = {
|
||||||
|
title = ''{{ if eq .Status "firing" }}{{ index .Annotations "summary" }}{{ else }}{{ index .Annotations "summary_resolved" }}{{ end }}'';
|
||||||
|
description = ''{{ if eq .Status "firing" }}{{ index .Annotations "description" }}{{ else }}{{ index .Annotations "description_resolved" }}{{ end }}'';
|
||||||
|
};
|
||||||
tags = [
|
tags = [
|
||||||
{
|
{
|
||||||
condition = ''status == "resolved"'';
|
condition = ''status == "resolved"'';
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,8 @@ in
|
||||||
annotations = {
|
annotations = {
|
||||||
summary = "${hostName} is DOWN";
|
summary = "${hostName} is DOWN";
|
||||||
summary_resolved = "${hostName} is up again";
|
summary_resolved = "${hostName} is up again";
|
||||||
|
description = "No metrics received for over 2 minutes.";
|
||||||
|
description_resolved = "Metrics are being received again.";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
@ -107,8 +109,10 @@ in
|
||||||
expr = ''up{job=~"prometheus|alertmanager"} == 0'';
|
expr = ''up{job=~"prometheus|alertmanager"} == 0'';
|
||||||
for = "2m";
|
for = "2m";
|
||||||
annotations = {
|
annotations = {
|
||||||
summary = "{{ $labels.job }} on {{ $labels.instance }} is DOWN";
|
summary = "{{ $labels.job | title }} on {{ $labels.instance }} is DOWN";
|
||||||
summary_resolved = "{{ $labels.job }} on {{ $labels.instance }} is up again";
|
summary_resolved = "{{ $labels.job | title }} on {{ $labels.instance }} is up again";
|
||||||
|
description = "Unresponsive for over 2 minutes.";
|
||||||
|
description_resolved = "Responding normally.";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -117,6 +121,8 @@ in
|
||||||
annotations = {
|
annotations = {
|
||||||
summary = "{{ $labels.instance }} deployment failed";
|
summary = "{{ $labels.instance }} deployment failed";
|
||||||
summary_resolved = "{{ $labels.instance }} deployment recovered";
|
summary_resolved = "{{ $labels.instance }} deployment recovered";
|
||||||
|
description = "Deployment is not reaching \"done\" status.";
|
||||||
|
description_resolved = "Deployment completed successfully.";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
|
@ -126,6 +132,8 @@ in
|
||||||
annotations = {
|
annotations = {
|
||||||
summary = "Hosts are running different commits";
|
summary = "Hosts are running different commits";
|
||||||
summary_resolved = "All hosts are running the same commit again";
|
summary_resolved = "All hosts are running the same commit again";
|
||||||
|
description = "Possibly a failed deployment or incompatible configurations.";
|
||||||
|
description_resolved = "All hosts are in sync.";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue