From 79f2858037c933d370f723d3fba253b5befaba9f Mon Sep 17 00:00:00 2001 From: Simon Matic Langford Date: Mon, 17 Nov 2025 13:56:04 +0000 Subject: [PATCH 1/3] Improve Jenkins node alerts to better handle servers with multiple nodes (#484) --- _data/rules.yml | 11 ++++++++--- dist/rules/jenkins/metric-plugin.yml | 17 +++++++++++++---- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/_data/rules.yml b/_data/rules.yml index bf2ee22..f4c66c1 100644 --- a/_data/rules.yml +++ b/_data/rules.yml @@ -3259,9 +3259,14 @@ groups: slug: metric-plugin doc_url: https://plugins.jenkins.io/prometheus/ rules: - - name: Jenkins offline - description: "Jenkins offline: `{{$labels.instance}}` in realm {{$labels.realm}}/{{$labels.env}} ({{$labels.region}})" - query: "jenkins_node_offline_value > 1" + - name: Jenkins node offline + description: "At least one Jenkins node offline: `{{$labels.instance}}` in realm {{$labels.realm}}/{{$labels.env}} ({{$labels.region}})" + query: "jenkins_node_offline_value > 0" + severity: critical + for: 5m + - name: Jenkins no node online + description: "No Jenkins nodes are online: `{{$labels.instance}}` in realm {{$labels.realm}}/{{$labels.env}} ({{$labels.region}})" + query: "jenkins_node_online_value == 0" severity: critical - name: Jenkins healthcheck description: "Jenkins healthcheck score: {{$value}}. Healthcheck failure for `{{$labels.instance}}` in realm {{$labels.realm}}/{{$labels.env}} ({{$labels.region}})" diff --git a/dist/rules/jenkins/metric-plugin.yml b/dist/rules/jenkins/metric-plugin.yml index 57c9cf6..5271e1e 100644 --- a/dist/rules/jenkins/metric-plugin.yml +++ b/dist/rules/jenkins/metric-plugin.yml @@ -5,14 +5,23 @@ groups: rules: - - alert: JenkinsOffline - expr: 'jenkins_node_offline_value > 1' + - alert: JenkinsNodeOffline + expr: 'jenkins_node_offline_value > 0' + for: 5m + labels: + severity: critical + annotations: + summary: Jenkins node offline (instance {{ $labels.instance }}) + description: "At least one Jenkins node offline: `{{$labels.instance}}` in realm {{$labels.realm}}/{{$labels.env}} ({{$labels.region}})\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" + + - alert: JenkinsNoNodeOnline + expr: 'jenkins_node_online_value == 0' for: 0m labels: severity: critical annotations: - summary: Jenkins offline (instance {{ $labels.instance }}) - description: "Jenkins offline: `{{$labels.instance}}` in realm {{$labels.realm}}/{{$labels.env}} ({{$labels.region}})\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" + summary: Jenkins no node online (instance {{ $labels.instance }}) + description: "No Jenkins nodes are online: `{{$labels.instance}}` in realm {{$labels.realm}}/{{$labels.env}} ({{$labels.region}})\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" - alert: JenkinsHealthcheck expr: 'jenkins_health_check_score < 1' From 766b224c67cf6fb1f3daa7e15078d6a805816966 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 21:34:15 +0100 Subject: [PATCH 2/3] build(deps): bump actions/checkout from 5 to 6 (#485) Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 6. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- .github/workflows/dist.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dist.yml b/.github/workflows/dist.yml index dda9251..a11105b 100644 --- a/.github/workflows/dist.yml +++ b/.github/workflows/dist.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Set up Ruby uses: ruby/setup-ruby@v1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1439a67..f004bcb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v5 + uses: actions/checkout@v6 - name: Set up Ruby uses: ruby/setup-ruby@v1 From ffa260b39db00410b5e7a797dfb3d2da26c89711 Mon Sep 17 00:00:00 2001 From: 5bentz <10729484+5bentz@users.noreply.github.com> Date: Mon, 8 Dec 2025 15:19:11 +0100 Subject: [PATCH 3/3] Update sleep-peacefully.md (#487) Fix business hours (9:00 to 18:00) --- sleep-peacefully.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sleep-peacefully.md b/sleep-peacefully.md index 58c9335..6ae0d9a 100644 --- a/sleep-peacefully.md +++ b/sleep-peacefully.md @@ -55,9 +55,9 @@ groups: expr: absent(europe_paris_weekday) - record: europe_london_business_hours - expr: 9 < europe_london_hour < 18 + expr: 9 <= europe_london_hour < 18 - record: europe_paris_business_hours - expr: 9 < europe_paris_hour < 18 + expr: 9 <= europe_paris_hour < 18 # opposite - record: not_europe_london_business_hours expr: absent(europe_london_business_hours)