Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions k8s/manifests/kube-prometheus/lib/rtsl_exporter_alerts.libsonnet
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
local addMixin = (import 'kube-prometheus/lib/mixin.libsonnet');

local prometheusRules = {
prometheusRules+:: {
groups+: [
{
name: 'rtsl-exporter.rules',
rules: [
{
alert: 'RtslExporterDown',
expr: |||
absent_over_time(up{job="rtsl-exporter", namespace="rtsl-exporter", service="rtsl-exporter"}[1m])
|||,
'for': '1m',
labels: {
severity: 'critical'
},
annotations: {
summary: "RTSL Exporter service down",
description: "No metrics have been received from the RTSL Exporter service for the past 1 minute."
}
}
],
},
],
},
};

local rtslExporterMixin = addMixin({
name: 'rtsl-exporter',
dashboardFolder: 'RTSL Exporter',
mixin: prometheusRules
});

{
prometheusRules: rtslExporterMixin.prometheusRules
}
3 changes: 2 additions & 1 deletion k8s/manifests/kube-prometheus/monitoring.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ local dhis2Server = (import 'lib/dhis2-server.libsonnet');
local alphasms = (import 'lib/alphasms.libsonnet');
local loki = (import 'lib/loki.libsonnet');
local sendgrid = (import 'lib/sendgrid.libsonnet');
local rtslExporterAlerts = (import 'lib/rtsl_exporter_alerts.libsonnet');

local environment = std.extVar('ENVIRONMENT');
local namespace = 'monitoring';
Expand Down Expand Up @@ -127,6 +128,6 @@ local manifests =
[postgres.prometheusRules] +
postgres.monitors(config.postgresNamespaces).exporterServices +
postgres.monitors(config.postgresNamespaces).serviceMonitors +
(if isEnvSandbox then [alphasms.prometheusRules] + [sendgrid.prometheusRules] + [loki.prometheusRules] else []);
(if isEnvSandbox then [alphasms.prometheusRules] + [sendgrid.prometheusRules] + [loki.prometheusRules] + [rtslExporterAlerts.prometheusRules] else []);

argocd.addArgoAnnotations(manifests, kp.values.common.namespace)
10 changes: 10 additions & 0 deletions token.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"kind": "ExecCredential",
"apiVersion": "client.authentication.k8s.io/v1beta1",
"spec": {},
"status": {
"expirationTimestamp": "2024-10-14T10:09:37Z",
"token": "k8s-aws-v1.aHR0cHM6Ly9zdHMuYXAtc291dGgtMS5hbWF6b25hd3MuY29tLz9BY3Rpb249R2V0Q2FsbGVySWRlbnRpdHkmVmVyc2lvbj0yMDExLTA2LTE1JlgtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQTRKR0JRTDVaWFVFUEE3S0UlMkYyMDI0MTAxNCUyRmFwLXNvdXRoLTElMkZzdHMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MTAxNFQwOTU1MzdaJlgtQW16LUV4cGlyZXM9NjAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JTNCeC1rOHMtYXdzLWlkJlgtQW16LVNpZ25hdHVyZT05MTY3ZTI3MDE1M2QwNTRjZDgyOWYxNDgyNzM3YjkzNWEwZWYwNDA0NTBiN2ZkYzU2MjIyNDU2NTkwYzk1Yjk0"
}
}