@leverege/build-tools 2.57.2 → 2.57.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/circleate.sh +2 -2
- package/src/helm-charts/api-server/values-local.yaml +1 -1
- package/src/helm-charts/authz-server/values-local.yaml +1 -1
- package/src/helm-charts/db-curator/values-local.yaml +1 -1
- package/src/helm-charts/emailer/values-local.yaml +1 -1
- package/src/helm-charts/fota-server/values-local.yaml +4 -1
- package/src/helm-charts/message-processor/values-local.yaml +4 -1
- package/src/helm-charts/messenger/values-local.yaml +1 -1
- package/src/helm-charts/prom-operator/rules/cnpg-rules.yaml +125 -0
- package/src/helm-charts/prom-operator/rules/{elasticsearch-rules.yaml.ovh → elasticsearch-rules.yaml} +0 -10
- package/src/helm-charts/prom-operator/rules/{gcp-rules.yaml.ovh → gcp-rules.yaml} +0 -3
- package/src/helm-charts/prom-operator/rules/{kubernetes-rules.yaml.ovh → kubernetes-rules.yaml} +0 -3
- package/src/helm-charts/prom-operator/rules/{leverege-rules.yaml.ovh → leverege-rules.yaml} +0 -1
- package/src/helm-charts/prom-operator/rules/{postgres-rules.yaml.ovh → postgres-rules.yaml} +0 -18
- package/src/helm-charts/prom-operator/rules/{redis-rules.yaml.ovh → redis-rules.yaml} +0 -9
- package/src/helm-charts/prom-operator/rules/{traefik-rules.yaml.ovh → traefik-rules.yaml} +0 -1
- package/src/helm-charts/prom-operator/rules/{velero-rules.yaml.ovh → velero-rules.yaml} +0 -2
- package/src/helm-charts/resource-server/values-local.yaml +1 -1
- package/src/helm-charts/scheduler/values-local.yaml +1 -1
- package/src/helm-charts/transponder-bq/values-local.yaml +1 -1
- package/src/helm-charts/transponder-dh/values-local.yaml +1 -1
- package/src/helm-charts/transponder-rt/values-local.yaml +1 -1
- package/src/helm-charts/transponder-tsdb/values-local.yaml +1 -1
- package/src/helm-charts/vin-decoder-server/values-local.yaml +7 -0
- package/src/hook-and-release/Config.mjs +30 -19
- package/src/pkgck.sh +11 -2
- package/src/helm-charts/prom-operator/rules/gitignore +0 -1
- /package/src/helm-charts/prom-operator/rules/{prometheus-rules.yaml.ovh → prometheus-rules.yaml} +0 -0
package/package.json
CHANGED
package/src/circleate.sh
CHANGED
|
@@ -87,7 +87,7 @@ jobs:
|
|
|
87
87
|
at: ~/project
|
|
88
88
|
- run:
|
|
89
89
|
name: Check for vulnerabilities
|
|
90
|
-
command: npm audit --
|
|
90
|
+
command: npm audit --omit=dev --audit-level=moderate
|
|
91
91
|
|
|
92
92
|
license-check:
|
|
93
93
|
docker:
|
|
@@ -303,7 +303,7 @@ jobs:
|
|
|
303
303
|
at: ~/project
|
|
304
304
|
- run:
|
|
305
305
|
name: Check for vulnerabilities
|
|
306
|
-
command: npm audit --
|
|
306
|
+
command: npm audit --omit=dev --audit-level=moderate
|
|
307
307
|
|
|
308
308
|
license-check:
|
|
309
309
|
docker:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
image:
|
|
2
|
-
tag: #
|
|
2
|
+
tag: # v2.1.0
|
|
3
3
|
|
|
4
4
|
config:
|
|
5
5
|
LOG_CONFIG: '{"type":"pino","level":"warn"}'
|
|
@@ -9,3 +9,6 @@ config:
|
|
|
9
9
|
|
|
10
10
|
# CNPG override
|
|
11
11
|
# SQL_HOST: "cnpg-db-psql-stack-rw.cnpg-operands" # vs postgres-postgresql
|
|
12
|
+
|
|
13
|
+
serviceMonitor:
|
|
14
|
+
enabled: false
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
apiVersion: monitoring.coreos.com/v1
|
|
2
|
+
kind: PrometheusRule
|
|
3
|
+
metadata:
|
|
4
|
+
name: cnpg-default-alerts
|
|
5
|
+
spec:
|
|
6
|
+
groups:
|
|
7
|
+
- name: cnpg-default.rules
|
|
8
|
+
rules:
|
|
9
|
+
- alert: LongRunningTransaction
|
|
10
|
+
annotations:
|
|
11
|
+
description: Pod {{ $labels.pod }} is taking more than 5 minutes (300 seconds) for a query.
|
|
12
|
+
summary: A query is taking longer than 5 minutes.
|
|
13
|
+
expr: |-
|
|
14
|
+
cnpg_backends_max_tx_duration_seconds > 300
|
|
15
|
+
for: 1m
|
|
16
|
+
labels:
|
|
17
|
+
severity: warning
|
|
18
|
+
- alert: BackendsWaiting
|
|
19
|
+
annotations:
|
|
20
|
+
description: Pod {{ $labels.pod }} has been waiting for longer than 5 minutes
|
|
21
|
+
summary: If a backend is waiting for longer than 5 minutes
|
|
22
|
+
expr: |-
|
|
23
|
+
cnpg_backends_waiting_total > 300
|
|
24
|
+
for: 1m
|
|
25
|
+
labels:
|
|
26
|
+
severity: warning
|
|
27
|
+
- alert: PGDatabaseXidAge
|
|
28
|
+
annotations:
|
|
29
|
+
description: Over 150,000,000 transactions from frozen xid on pod {{ $labels.pod }}
|
|
30
|
+
summary: Number of transactions from the frozen XID to the current one
|
|
31
|
+
expr: |-
|
|
32
|
+
cnpg_pg_database_xid_age > 300000000
|
|
33
|
+
for: 1m
|
|
34
|
+
labels:
|
|
35
|
+
severity: warning
|
|
36
|
+
- alert: PGReplication
|
|
37
|
+
annotations:
|
|
38
|
+
description: Standby is lagging behind by over 300 seconds (5 minutes)
|
|
39
|
+
summary: The standby is lagging behind the primary
|
|
40
|
+
expr: |-
|
|
41
|
+
cnpg_pg_replication_lag > 300
|
|
42
|
+
for: 1m
|
|
43
|
+
labels:
|
|
44
|
+
severity: warning
|
|
45
|
+
- alert: LastFailedArchiveTime
|
|
46
|
+
annotations:
|
|
47
|
+
description: Archiving failed for {{ $labels.pod }}
|
|
48
|
+
summary: Checks the last time archiving failed. Will be < 0 when it has not failed.
|
|
49
|
+
expr: |-
|
|
50
|
+
(cnpg_pg_stat_archiver_last_failed_time - cnpg_pg_stat_archiver_last_archived_time) > 1
|
|
51
|
+
for: 1m
|
|
52
|
+
labels:
|
|
53
|
+
severity: warning
|
|
54
|
+
- alert: DatabaseDeadlockConflicts
|
|
55
|
+
annotations:
|
|
56
|
+
description: There are over 10 deadlock conflicts in {{ $labels.pod }}
|
|
57
|
+
summary: Checks the number of database conflicts
|
|
58
|
+
expr: |-
|
|
59
|
+
cnpg_pg_stat_database_deadlocks > 10
|
|
60
|
+
for: 1m
|
|
61
|
+
labels:
|
|
62
|
+
severity: warning
|
|
63
|
+
- alert: ReplicaFailingReplication
|
|
64
|
+
annotations:
|
|
65
|
+
description: Replica {{ $labels.pod }} is failing to replicate
|
|
66
|
+
summary: Checks if the replica is failing to replicate
|
|
67
|
+
expr: |-
|
|
68
|
+
cnpg_pg_replication_in_recovery > cnpg_pg_replication_is_wal_receiver_up
|
|
69
|
+
for: 1m
|
|
70
|
+
labels:
|
|
71
|
+
severity: warning
|
|
72
|
+
#
|
|
73
|
+
# folding in rules based on non-cnpg postgres metrics
|
|
74
|
+
#
|
|
75
|
+
- alert: PostgresqlDown
|
|
76
|
+
expr: cnpg_collector_up == 0
|
|
77
|
+
for: 0m
|
|
78
|
+
labels:
|
|
79
|
+
severity: critical
|
|
80
|
+
annotations:
|
|
81
|
+
summary: Postgresql down (instance {{ $labels.instance }})
|
|
82
|
+
description: "Postgresql instance is down\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
83
|
+
|
|
84
|
+
- alert: PostgresqlRestarted
|
|
85
|
+
expr: time() - cnpg_pg_postmaster_start_time < 60
|
|
86
|
+
for: 0m
|
|
87
|
+
labels:
|
|
88
|
+
severity: critical
|
|
89
|
+
annotations:
|
|
90
|
+
summary: Postgresql restarted (instance {{ $labels.instance }})
|
|
91
|
+
description: "Postgresql restarted\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
92
|
+
|
|
93
|
+
- alert: PostgresqlHighRollbackRate
|
|
94
|
+
expr: sum by (namespace,datname) ((rate(cnpg_pg_stat_database_xact_rollback{datname!~"template.*|postgres",datid!="0"}[3m])) / ((rate(cnpg_pg_stat_database_xact_rollback{datname!~"template.*|postgres",datid!="0"}[3m])) + (rate(cnpg_pg_stat_database_xact_commit{datname!~"template.*|postgres",datid!="0"}[3m])))) > 0.02
|
|
95
|
+
for: 0m
|
|
96
|
+
labels:
|
|
97
|
+
severity: warning
|
|
98
|
+
annotations:
|
|
99
|
+
summary: Postgresql high rollback rate (instance {{ $labels.instance }})
|
|
100
|
+
description: "Ratio of transactions being aborted compared to committed is > 2 %\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
101
|
+
|
|
102
|
+
# - alert: PostgresqlCommitRateLow
|
|
103
|
+
# expr: rate(pg_stat_database_xact_commit[1m]) < 10
|
|
104
|
+
# for: 2m
|
|
105
|
+
# labels:
|
|
106
|
+
# severity: critical
|
|
107
|
+
# annotations:
|
|
108
|
+
# summary: Postgresql commit rate low (instance {{ $labels.instance }})
|
|
109
|
+
# description: "Postgresql seems to be processing very few transactions\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" - alert: PostgresqlCommitRateLow
|
|
110
|
+
# expr: rate(cnpg_pg_stat_database_xact_commit[1m]) < 10
|
|
111
|
+
# for: 2m
|
|
112
|
+
# labels:
|
|
113
|
+
# severity: critical
|
|
114
|
+
# annotations:
|
|
115
|
+
# summary: Postgresql commit rate low (instance {{ $labels.instance }})
|
|
116
|
+
# description: "Postgresql seems to be processing very few transactions\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
117
|
+
|
|
118
|
+
# - alert: PostgresqlUnusedReplicationSlot
|
|
119
|
+
# expr: cnpg_pg_replication_slots_active == 0
|
|
120
|
+
# for: 1m
|
|
121
|
+
# labels:
|
|
122
|
+
# severity: warning
|
|
123
|
+
# annotations:
|
|
124
|
+
# summary: Postgresql unused replication slot (instance {{ $labels.instance }})
|
|
125
|
+
# description: "Unused Replication Slots\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
|
|
@@ -17,7 +17,6 @@ spec:
|
|
|
17
17
|
annotations:
|
|
18
18
|
summary: "Elasticsearch Heap Usage Too High (instance {{ $labels.instance }})"
|
|
19
19
|
description: "The heap usage is over 90% for 5m (currently at {{ $value }}% )"
|
|
20
|
-
dashboard: "OVH:<MONITORING>/elasticsearch"
|
|
21
20
|
|
|
22
21
|
- alert: ElasticsearchHeapUsageWarning
|
|
23
22
|
expr: (elasticsearch_jvm_memory_used_bytes{area="heap"} / elasticsearch_jvm_memory_max_bytes{area="heap"}) * 100 > 80
|
|
@@ -27,7 +26,6 @@ spec:
|
|
|
27
26
|
annotations:
|
|
28
27
|
summary: "Elasticsearch Heap Usage warning (instance {{ $labels.instance }})"
|
|
29
28
|
description: "The heap usage is over 80% for 5m (currently at {{ $value }}% )"
|
|
30
|
-
dashboard: "OVH:<MONITORING>/elasticsearch"
|
|
31
29
|
|
|
32
30
|
- alert: ElasticsearchDiskSpaceLow
|
|
33
31
|
expr: elasticsearch_filesystem_data_available_bytes / elasticsearch_filesystem_data_size_bytes * 100 < 20
|
|
@@ -37,7 +35,6 @@ spec:
|
|
|
37
35
|
annotations:
|
|
38
36
|
summary: "Elasticsearch disk space low (instance {{ $labels.instance }})"
|
|
39
37
|
description: "The disk usage is over 80% (currently at {{ $value }}% )"
|
|
40
|
-
dashboard: "OVH:<MONITORING>/elasticsearch"
|
|
41
38
|
|
|
42
39
|
- alert: ElasticsearchDiskOutOfSpace
|
|
43
40
|
expr: elasticsearch_filesystem_data_available_bytes / elasticsearch_filesystem_data_size_bytes * 100 < 10
|
|
@@ -48,7 +45,6 @@ spec:
|
|
|
48
45
|
annotations:
|
|
49
46
|
summary: "Elasticsearch disk out of space (instance {{ $labels.instance }})"
|
|
50
47
|
description: "The disk usage is over 90% (currently at {{ $value }}% )"
|
|
51
|
-
dashboard: "OVH:<MONITORING>/elasticsearch"
|
|
52
48
|
|
|
53
49
|
- alert: ElasticsearchClusterRed
|
|
54
50
|
expr: elasticsearch_cluster_health_status{color="red"} == 1
|
|
@@ -58,7 +54,6 @@ spec:
|
|
|
58
54
|
annotations:
|
|
59
55
|
summary: "Elasticsearch Cluster Red (instance {{ $labels.instance }})"
|
|
60
56
|
description: "Elastic Cluster is in an unhealthy state"
|
|
61
|
-
dashboard: "OVH:<MONITORING>/elasticsearch"
|
|
62
57
|
|
|
63
58
|
- alert: ElasticsearchClusterYellow
|
|
64
59
|
expr: elasticsearch_cluster_health_status{color="yellow"} == 1
|
|
@@ -68,7 +63,6 @@ spec:
|
|
|
68
63
|
annotations:
|
|
69
64
|
summary: "Elasticsearch Cluster Yellow (instance {{ $labels.instance }})"
|
|
70
65
|
description: "Elastic Cluster is in an unhealthy state"
|
|
71
|
-
dashboard: "OVH:<MONITORING>/elasticsearch"
|
|
72
66
|
|
|
73
67
|
- alert: ElasticsearchRelocationShards
|
|
74
68
|
expr: elasticsearch_cluster_health_relocating_shards > 0
|
|
@@ -78,7 +72,6 @@ spec:
|
|
|
78
72
|
annotations:
|
|
79
73
|
summary: "Elasticsearch relocation shards (instance {{ $labels.instance }})"
|
|
80
74
|
description: "Number of relocation shards for 20 min is {{ $value }}"
|
|
81
|
-
dashboard: "OVH:<MONITORING>/elasticsearch"
|
|
82
75
|
|
|
83
76
|
- alert: ElasticsearchInitializingShards
|
|
84
77
|
expr: elasticsearch_cluster_health_initializing_shards > 0
|
|
@@ -88,7 +81,6 @@ spec:
|
|
|
88
81
|
annotations:
|
|
89
82
|
summary: "Elasticsearch initializing shards (instance {{ $labels.instance }})"
|
|
90
83
|
description: "Number of initializing shards for 10 min is {{ $value }}"
|
|
91
|
-
dashboard: "OVH:<MONITORING>/elasticsearch"
|
|
92
84
|
|
|
93
85
|
- alert: ElasticsearchUnassignedShards
|
|
94
86
|
expr: elasticsearch_cluster_health_unassigned_shards > 0
|
|
@@ -98,7 +90,6 @@ spec:
|
|
|
98
90
|
annotations:
|
|
99
91
|
summary: "Elasticsearch unassigned shards (instance {{ $labels.instance }})"
|
|
100
92
|
description: "Number of unassigned shards for 2 min is {{ $value }}"
|
|
101
|
-
dashboard: "OVH:<MONITORING>/elasticsearch"
|
|
102
93
|
|
|
103
94
|
- alert: ElasticsearchPendingTasks
|
|
104
95
|
expr: elasticsearch_cluster_health_number_of_pending_tasks > 0
|
|
@@ -108,4 +99,3 @@ spec:
|
|
|
108
99
|
annotations:
|
|
109
100
|
summary: "Elasticsearch pending tasks (instance {{ $labels.instance }})"
|
|
110
101
|
description: "Number of pending tasks for 10 min is {{ $value }}. Cluster is working slowly."
|
|
111
|
-
dashboard: "OVH:<MONITORING>/elasticsearch"
|
|
@@ -25,7 +25,6 @@ spec:
|
|
|
25
25
|
annotations:
|
|
26
26
|
summary: "High Firebase load detected"
|
|
27
27
|
description: "Firebase load is above 90% (current value is: {{ $value | humanize }}%)"
|
|
28
|
-
dashboard: "OVH:<MONITORING>/firebase"
|
|
29
28
|
- alert: PubSubUndeliveredMessages
|
|
30
29
|
expr: sum(stackdriver_pubsub_subscription_pubsub_googleapis_com_subscription_num_undelivered_messages) by (subscription_id) > 1000
|
|
31
30
|
for: 5m
|
|
@@ -35,7 +34,6 @@ spec:
|
|
|
35
34
|
annotations:
|
|
36
35
|
summary: "High Number of Undelivered Messages on PubSub"
|
|
37
36
|
description: "Undelivered message count on topic {{$labels.subscription_id}} is greater than 1000"
|
|
38
|
-
dashboard: "OVH:<MONITORING>/stackdriver"
|
|
39
37
|
- alert: PubSubOldUnackedMessages
|
|
40
38
|
expr: stackdriver_pubsub_subscription_pubsub_googleapis_com_subscription_oldest_unacked_message_age > 900
|
|
41
39
|
for: 5m
|
|
@@ -44,4 +42,3 @@ spec:
|
|
|
44
42
|
annotations:
|
|
45
43
|
summary: "Old messages left unacked on PubSub"
|
|
46
44
|
description: "Messages on {{$labels.subscription_id}} has been unacked for more than 15m"
|
|
47
|
-
dashboard: "OVH:<MONITORING>/stackdriver"
|
package/src/helm-charts/prom-operator/rules/{kubernetes-rules.yaml.ovh → kubernetes-rules.yaml}
RENAMED
|
@@ -58,7 +58,6 @@ spec:
|
|
|
58
58
|
annotations:
|
|
59
59
|
summary: "Kubernetes PVC Free Space < 10%"
|
|
60
60
|
description: "PVC volume {{ $labels.persistentvolumeclaim }} is almost full - down to {{ $value | humanize }}% available"
|
|
61
|
-
dashboard: "OVH:<MONITORING>/k8s-pvc/pvc-usage?var-volume={{ $labels.persistentvolumeclaim }}"
|
|
62
61
|
|
|
63
62
|
# - alert: KubernetesVolumeFullInFourDays
|
|
64
63
|
# expr: predict_linear(kubelet_volume_stats_available_bytes[6h], 4 * 24 * 3600) < 0
|
|
@@ -68,7 +67,6 @@ spec:
|
|
|
68
67
|
# annotations:
|
|
69
68
|
# summary: "Kubernetes Volume full in four days "
|
|
70
69
|
# description: "{{ $labels.namespace }}/{{ $labels.persistentvolumeclaim }} is expected to fill up within four days. Currently {{ $value | humanize }}% is available."
|
|
71
|
-
# dashboard: "OVH:<MONITORING>/pvc"
|
|
72
70
|
|
|
73
71
|
- alert: KubernetesPersistentvolumeError
|
|
74
72
|
expr: kube_persistentvolume_status_phase{phase=~"Failed|Pending",job="kube-state-metrics"} > 0
|
|
@@ -88,7 +86,6 @@ spec:
|
|
|
88
86
|
annotations:
|
|
89
87
|
summary: "Kubernetes HPA scale capability"
|
|
90
88
|
description: "Kubernetes has scaled {{ $labels.hpa }} to max number of scaled pods."
|
|
91
|
-
dashboard: "OVH:<MONITORING>/k8-deployment"
|
|
92
89
|
|
|
93
90
|
- alert: KubernetesPodNotHealthy
|
|
94
91
|
expr: kube_pod_status_phase{phase=~"Pending|Unknown|Failed"} == 1
|
|
@@ -17,7 +17,6 @@ spec:
|
|
|
17
17
|
annotations:
|
|
18
18
|
summary: "Postgresql down"
|
|
19
19
|
description: "Postgresql instance is down: check {{ $labels.release }}"
|
|
20
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
21
20
|
|
|
22
21
|
- alert: PostgresqlRestarted
|
|
23
22
|
expr: time() - pg_postmaster_start_time_seconds < 60
|
|
@@ -27,7 +26,6 @@ spec:
|
|
|
27
26
|
annotations:
|
|
28
27
|
summary: "Postgresql restarted"
|
|
29
28
|
description: "Postgresql restarted: check {{ $labels.release }}"
|
|
30
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
31
29
|
|
|
32
30
|
- alert: PostgresqlExporterError
|
|
33
31
|
expr: pg_exporter_last_scrape_error > 0
|
|
@@ -37,7 +35,6 @@ spec:
|
|
|
37
35
|
annotations:
|
|
38
36
|
summary: "Postgresql exporter error for {{ $labels.release }}"
|
|
39
37
|
description: "Postgresql exporter is showing errors. Metrics may be outdated"
|
|
40
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
41
38
|
|
|
42
39
|
- alert: PostgresqlReplicationLag
|
|
43
40
|
expr: (pg_replication_lag > 10) and ON(instance) (pg_replication_is_replica == 1)
|
|
@@ -47,7 +44,6 @@ spec:
|
|
|
47
44
|
annotations:
|
|
48
45
|
summary: "Postgresql replication lag"
|
|
49
46
|
description: "PostgreSQL replication lag is going up (> 10s): check {{ $labels.release }}"
|
|
50
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
51
47
|
|
|
52
48
|
- alert: PostgresqlTableNotVacuumed
|
|
53
49
|
expr: (pg_stat_user_tables_last_autovacuum > 0) and (time() - pg_stat_user_tables_last_autovacuum > 60 * 60 * 24)
|
|
@@ -57,7 +53,6 @@ spec:
|
|
|
57
53
|
annotations:
|
|
58
54
|
summary: "Postgresql table not vacuumed"
|
|
59
55
|
description: "Table has not been vacuum for 24 hours: check {{ $labels.instance }}"
|
|
60
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
61
56
|
|
|
62
57
|
- alert: PostgresqlTableNotAutoAnalyzed
|
|
63
58
|
expr: (pg_stat_user_tables_last_autoanalyze > 0) and (time() - pg_stat_user_tables_last_autoanalyze > 60 * 60 * 24)
|
|
@@ -67,7 +62,6 @@ spec:
|
|
|
67
62
|
annotations:
|
|
68
63
|
summary: "Postgresql table not analyzed (instance {{ $labels.instance }})"
|
|
69
64
|
description: "Table {{ $labels.relname }} has not been analyzed for 24 hours: check {{ $labels.release }} - {{ $labels.datname }}"
|
|
70
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
71
65
|
|
|
72
66
|
- alert: PostgresqlDeadLocks
|
|
73
67
|
expr: rate(pg_stat_database_deadlocks{datname!~"template.*|postgres"}[1m]) > 0
|
|
@@ -77,7 +71,6 @@ spec:
|
|
|
77
71
|
annotations:
|
|
78
72
|
summary: "Postgresql dead locks"
|
|
79
73
|
description: "PostgreSQL has dead-locks: check {{ $labels.release }} - {{ $labels.datname }}"
|
|
80
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
81
74
|
|
|
82
75
|
- alert: PostgresqlSlowQueries
|
|
83
76
|
expr: pg_slow_queries > 0
|
|
@@ -87,7 +80,6 @@ spec:
|
|
|
87
80
|
annotations:
|
|
88
81
|
summary: "Postgresql slow queries"
|
|
89
82
|
description: "PostgreSQL executing slow queries"
|
|
90
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
91
83
|
|
|
92
84
|
- alert: PostgresqlHighRollbackRate
|
|
93
85
|
expr: rate(pg_stat_database_xact_rollback{datname!~"template.*"}[3m]) / rate(pg_stat_database_xact_commit{datname!~"template.*"}[3m]) > 0.02
|
|
@@ -97,7 +89,6 @@ spec:
|
|
|
97
89
|
annotations:
|
|
98
90
|
summary: "Postgresql high rollback rate on {{ $labels.release }} - {{ $labels.datname }}"
|
|
99
91
|
description: "Ratio of transactions being aborted compared to committed is > 2 %"
|
|
100
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
101
92
|
|
|
102
93
|
- alert: PostgresqlCommitRateLow
|
|
103
94
|
expr: rate(pg_stat_database_xact_commit[1m]) < 10
|
|
@@ -107,7 +98,6 @@ spec:
|
|
|
107
98
|
annotations:
|
|
108
99
|
summary: "Postgresql commit rate low on {{ $labels.release }} - {{ $labels.datname }}"
|
|
109
100
|
description: "Postgres seems to be processing very few transactions"
|
|
110
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
111
101
|
|
|
112
102
|
- alert: PostgresqlLowXidConsumption
|
|
113
103
|
expr: rate(pg_txid_current[1m]) < 5
|
|
@@ -117,7 +107,6 @@ spec:
|
|
|
117
107
|
annotations:
|
|
118
108
|
summary: "Postgresql low XID consumption on {{ $labels.release }} - {{ $labels.datname }}"
|
|
119
109
|
description: "Postgresql seems to be consuming transaction IDs very slowly"
|
|
120
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
121
110
|
|
|
122
111
|
- alert: PostgresqllowXlogConsumption
|
|
123
112
|
expr: rate(pg_xlog_position_bytes[1m]) < 100
|
|
@@ -127,7 +116,6 @@ spec:
|
|
|
127
116
|
annotations:
|
|
128
117
|
summary: "Postgresqllow XLOG consumption on {{ $labels.release }} - {{ $labels.datname }}"
|
|
129
118
|
description: "Postgres seems to be consuming XLOG very slowly"
|
|
130
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
131
119
|
|
|
132
120
|
- alert: PostgresqlWaleReplicationStopped
|
|
133
121
|
expr: rate(pg_xlog_position_bytes[1m]) == 0
|
|
@@ -137,7 +125,6 @@ spec:
|
|
|
137
125
|
annotations:
|
|
138
126
|
summary: "Postgresql WAL-E replication stopped on {{ $labels.release }} - {{ $labels.datname }}"
|
|
139
127
|
description: "WAL-E replication seems to be stopped"
|
|
140
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
141
128
|
|
|
142
129
|
- alert: PostgresqlHighRateStatementTimeout
|
|
143
130
|
expr: rate(postgresql_errors_total{type="statement_timeout"}[5m]) > 3
|
|
@@ -147,7 +134,6 @@ spec:
|
|
|
147
134
|
annotations:
|
|
148
135
|
summary: "Postgresql high rate statement timeout"
|
|
149
136
|
description: "Postgres transactions showing high rate of statement timeouts on {{ $labels.release }} - {{ $labels.datname }}"
|
|
150
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
151
137
|
|
|
152
138
|
- alert: PostgresqlHighRateDeadlock
|
|
153
139
|
expr: rate(postgresql_errors_total{type="deadlock_detected"}[1m]) * 60 > 1
|
|
@@ -157,7 +143,6 @@ spec:
|
|
|
157
143
|
annotations:
|
|
158
144
|
summary: "Postgresql high rate deadlock"
|
|
159
145
|
description: "Postgres detected deadlocks on {{ $labels.release }} - {{ $labels.datname }}"
|
|
160
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
161
146
|
|
|
162
147
|
- alert: PostgresqlReplicationLabBytes
|
|
163
148
|
expr: (pg_xlog_position_bytes and pg_replication_is_replica == 0) - on (environment) group_right(instance) (pg_xlog_position_bytes and pg_replication_is_replica == 1) > 1e+09
|
|
@@ -167,7 +152,6 @@ spec:
|
|
|
167
152
|
annotations:
|
|
168
153
|
summary: "Postgresql replication lab bytes"
|
|
169
154
|
description: "Postgres Replication lag (in bytes) is high on {{ $labels.release }} - {{ $labels.datname }}"
|
|
170
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
171
155
|
|
|
172
156
|
- alert: PostgresqlTooManyDeadTuples
|
|
173
157
|
expr: ((pg_stat_user_tables_n_dead_tup > 10000) / (pg_stat_user_tables_n_live_tup + pg_stat_user_tables_n_dead_tup)) >= 0.1 unless ON(instance) (pg_replication_is_replica == 1)
|
|
@@ -177,7 +161,6 @@ spec:
|
|
|
177
161
|
annotations:
|
|
178
162
|
summary: "Postgresql too many dead tuples"
|
|
179
163
|
description: "PostgreSQL dead tuples is too large ( {{ $value }} dead tuples) on {{ $labels.release }} - {{ $labels.datname }}"
|
|
180
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
181
164
|
|
|
182
165
|
- alert: PostgresqlTooManyLocksAcquired
|
|
183
166
|
expr: ((sum (pg_locks_count)) / (pg_settings_max_locks_per_transaction * pg_settings_max_connections)) > 0.20
|
|
@@ -187,4 +170,3 @@ spec:
|
|
|
187
170
|
annotations:
|
|
188
171
|
summary: "Postgresql too many locks acquired on {{ $labels.statefulset.kubernetes.io_pod_name }}"
|
|
189
172
|
description: "Too many locks acquired on the database. If this alert happens frequently, we may need to increase the postgres setting max_locks_per_transaction."
|
|
190
|
-
dashboard: "OVH:<MONITORING>/postgres"
|
|
@@ -16,7 +16,6 @@ spec:
|
|
|
16
16
|
annotations:
|
|
17
17
|
summary: "Redis down (instance {{ $labels.instance }})"
|
|
18
18
|
description: "Redis instance is down"
|
|
19
|
-
dashboard: "OVH:<MONITORING>/redis"
|
|
20
19
|
|
|
21
20
|
- alert: RedisMissingMaster
|
|
22
21
|
expr: count(redis_instance_info{role="master"}) == 0
|
|
@@ -26,7 +25,6 @@ spec:
|
|
|
26
25
|
annotations:
|
|
27
26
|
summary: "Redis missing master (instance {{ $labels.instance }})"
|
|
28
27
|
description: "Redis cluster has no node marked as master."
|
|
29
|
-
dashboard: "OVH:<MONITORING>/redis"
|
|
30
28
|
|
|
31
29
|
- alert: RedisTooManyMasters
|
|
32
30
|
expr: count(redis_instance_info{role="master"}) > 1
|
|
@@ -36,7 +34,6 @@ spec:
|
|
|
36
34
|
annotations:
|
|
37
35
|
summary: "Redis too many masters (instance {{ $labels.instance }})"
|
|
38
36
|
description: "Redis cluster has too many nodes marked as master."
|
|
39
|
-
dashboard: "OVH:<MONITORING>/redis"
|
|
40
37
|
|
|
41
38
|
- alert: RedisDisconnectedSlaves
|
|
42
39
|
expr: count without (instance, job) (redis_connected_slaves) - sum without (instance, job) (redis_connected_slaves) - 1 > 1
|
|
@@ -46,7 +43,6 @@ spec:
|
|
|
46
43
|
annotations:
|
|
47
44
|
summary: "Redis disconnected slaves (instance {{ $labels.instance }})"
|
|
48
45
|
description: "Redis not replicating for all slaves. Consider reviewing the redis replication status."
|
|
49
|
-
dashboard: "OVH:<MONITORING>/redis"
|
|
50
46
|
|
|
51
47
|
- alert: RedisReplicationBroken
|
|
52
48
|
expr: delta(redis_connected_slaves[1m]) < 0
|
|
@@ -56,7 +52,6 @@ spec:
|
|
|
56
52
|
annotations:
|
|
57
53
|
summary: "Redis replication broken (instance {{ $labels.instance }})"
|
|
58
54
|
description: "Redis instance lost a slave"
|
|
59
|
-
dashboard: "OVH:<MONITORING>/redis"
|
|
60
55
|
|
|
61
56
|
- alert: RedisClusterFlapping
|
|
62
57
|
expr: changes(redis_connected_slaves[5m]) > 2
|
|
@@ -66,7 +61,6 @@ spec:
|
|
|
66
61
|
annotations:
|
|
67
62
|
summary: "Redis cluster flapping (instance {{ $labels.instance }})"
|
|
68
63
|
description: "Changes have been detected in Redis replica connection. This can occur when replica nodes lose connection to the master and reconnect (a.k.a flapping)."
|
|
69
|
-
dashboard: "OVH:<MONITORING>/redis"
|
|
70
64
|
|
|
71
65
|
- alert: RedisOutOfMemory
|
|
72
66
|
expr: redis_memory_used_bytes / redis_total_system_memory_bytes * 100 > 90
|
|
@@ -76,7 +70,6 @@ spec:
|
|
|
76
70
|
annotations:
|
|
77
71
|
summary: "Redis out of memory (instance {{ $labels.instance }})"
|
|
78
72
|
description: "Redis is running out of memory ( {{ $value }}% )"
|
|
79
|
-
dashboard: "OVH:<MONITORING>/redis"
|
|
80
73
|
|
|
81
74
|
- alert: RedisRejectedConnections
|
|
82
75
|
expr: increase(redis_rejected_connections_total[1m]) > 0
|
|
@@ -86,5 +79,3 @@ spec:
|
|
|
86
79
|
annotations:
|
|
87
80
|
summary: "Redis rejected connections (instance {{ $labels.instance }})"
|
|
88
81
|
description: "Some connections to Redis has been rejected. Please check {{ $labels.app }}"
|
|
89
|
-
dashboard: "OVH:<MONITORING>/redis"
|
|
90
|
-
|
|
@@ -16,7 +16,6 @@ spec:
|
|
|
16
16
|
annotations:
|
|
17
17
|
summary: "Velero schedule {{ $labels.schedule }} backup failed to execute properly"
|
|
18
18
|
description: "It has been over 30 hours since the last successful backup"
|
|
19
|
-
dashboard: "OVH:<MONITORING>/velero"
|
|
20
19
|
- alert: NoVeleroBackups
|
|
21
20
|
expr: velero_backup_success_total{schedule!=""} == 0
|
|
22
21
|
for: 30h
|
|
@@ -25,4 +24,3 @@ spec:
|
|
|
25
24
|
annotations:
|
|
26
25
|
summary: "Velero has not made any backups yet"
|
|
27
26
|
description: "No backups have successfully been made since velero was initialized (or restarted), go check it out ASAP"
|
|
28
|
-
dashboard: "OVH:<MONITORING>/velero"
|
|
@@ -44,29 +44,18 @@ const cliSections = [
|
|
|
44
44
|
handle git hooks in standard git repositories as well as git monorepos. It
|
|
45
45
|
connects into a repository's git hook system after a repo is cloned. The hook
|
|
46
46
|
connection is made during the {yellow.bold npm install} phase, which will execute the
|
|
47
|
-
{yellow.bold npm prepare} script as defined in the package.json scripts section
|
|
47
|
+
{yellow.bold npm prepare} script as defined in the package.json scripts section.
|
|
48
48
|
|
|
49
49
|
{yellow.bold "scripts": {
|
|
50
50
|
...
|
|
51
51
|
"prepare": "[ $SKIP_PREPARE ] && exit 0 || hook-and-release",
|
|
52
52
|
...
|
|
53
|
-
}
|
|
53
|
+
\\} }
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
template in order to avoid setting up the
|
|
55
|
+
The {yellow SKIP_PREPARE} flag will be set in the {yellow docker-to-registry} Dockerfile
|
|
56
|
+
template in order to avoid setting up the hook during the image build
|
|
57
57
|
process. The hook is only relevant when doing local development and is
|
|
58
58
|
totally divorced from the image building process.
|
|
59
|
-
|
|
60
|
-
The hook-and-release script can be invoked directly from the command line,
|
|
61
|
-
typically for first-time initialization, or from the git hook scripts located
|
|
62
|
-
in the .har subdirectory in the root of a repository. Running with the {yellow.bold --init}
|
|
63
|
-
command line switch will create the .har subdirectory at the repo root with a
|
|
64
|
-
config.json file and two standard hook scripts, pre-commit and pre-push:
|
|
65
|
-
|
|
66
|
-
{yellow.bold .har
|
|
67
|
-
├── config.json
|
|
68
|
-
├── pre-commit
|
|
69
|
-
└── pre-push}
|
|
70
59
|
}`
|
|
71
60
|
},
|
|
72
61
|
{
|
|
@@ -74,8 +63,21 @@ config.json file and two standard hook scripts, pre-commit and pre-push:
|
|
|
74
63
|
optionList : cliOptionList,
|
|
75
64
|
},
|
|
76
65
|
{
|
|
77
|
-
header :
|
|
66
|
+
header : `
|
|
67
|
+
Configuration Setup and Hook Scripts`,
|
|
78
68
|
content : [
|
|
69
|
+
`{green To add hook-and-release to a repository simply run:
|
|
70
|
+
|
|
71
|
+
{yellow.bold hook-and-release --init}
|
|
72
|
+
|
|
73
|
+
which will create the {yellow.bold .har} subdirectory at the repo root with a {yellow.bold config.json}
|
|
74
|
+
file and two standard hook scripts, {yellow.bold pre-commit} and {yellow.bold pre-push}:
|
|
75
|
+
|
|
76
|
+
{yellow.bold .har
|
|
77
|
+
├── config.json
|
|
78
|
+
├── pre-commit
|
|
79
|
+
└── pre-push}
|
|
80
|
+
}`,
|
|
79
81
|
`{bold .har/config.json} {green controls branch, script and package config
|
|
80
82
|
{white.bold protected-branches} list of branch names to protect
|
|
81
83
|
{white.bold npm-scripts} list of npm scripts to run on protected branches
|
|
@@ -98,11 +100,11 @@ config.json file and two standard hook scripts, pre-commit and pre-push:
|
|
|
98
100
|
|
|
99
101
|
{white.bold Example pre-commit script file contents}
|
|
100
102
|
|
|
101
|
-
hook-and-release --debug
|
|
103
|
+
{yellow hook-and-release --debug}
|
|
102
104
|
|
|
103
|
-
which
|
|
105
|
+
which tells HAR to run with debugging enabled. This will display copious
|
|
104
106
|
amounts of information and prevents the git command from succeeding, so
|
|
105
|
-
it's more like a debug with dry-run. Removing the {yellow
|
|
107
|
+
it's more like a debug with dry-run. Removing the {yellow --debug} will
|
|
106
108
|
allow everything to run normally.
|
|
107
109
|
}`
|
|
108
110
|
]
|
|
@@ -140,6 +142,7 @@ export default class Config {
|
|
|
140
142
|
|
|
141
143
|
if ( this.cliArgs.init ) {
|
|
142
144
|
await this.initializeConfiguration( this.harDir )
|
|
145
|
+
process.exit( 0 )
|
|
143
146
|
}
|
|
144
147
|
|
|
145
148
|
// Start with the basics, is there a root har directory?
|
|
@@ -224,6 +227,14 @@ export default class Config {
|
|
|
224
227
|
|
|
225
228
|
makeHarHookScript( `${harDir}/pre-commit` )
|
|
226
229
|
makeHarHookScript( `${harDir}/pre-push` )
|
|
230
|
+
|
|
231
|
+
const huskyWarningAndPrepare = `
|
|
232
|
+
Heads Up! Remove ${chalk.red.bold( 'husky' )} references from the package.json dependencies
|
|
233
|
+
and replace the ${chalk.yellow.bold( 'prepare' )} script with this:
|
|
234
|
+
|
|
235
|
+
${chalk.green.bold( '"prepare": "[ $SKIP_PREPARE ] && exit 0 || hook-and-release",' )}
|
|
236
|
+
`
|
|
237
|
+
log( huskyWarningAndPrepare )
|
|
227
238
|
}
|
|
228
239
|
|
|
229
240
|
async runNpmScripts( runDirectories = [] ) {
|
package/src/pkgck.sh
CHANGED
|
@@ -39,6 +39,14 @@ check_babel () {
|
|
|
39
39
|
printf $C_stat
|
|
40
40
|
}
|
|
41
41
|
|
|
42
|
+
check_har () {
|
|
43
|
+
local C_stat=$(bad)
|
|
44
|
+
local prep="`node -p \"require('./package.json').scripts.prepare\"`"
|
|
45
|
+
local isHar=`echo $prep | egrep -e "hook-and-release"`
|
|
46
|
+
[ ! -z "$isHar" ] && C_stat=$(good)
|
|
47
|
+
printf $C_stat
|
|
48
|
+
}
|
|
49
|
+
|
|
42
50
|
check_circle () {
|
|
43
51
|
local C_stat=$(bad)
|
|
44
52
|
[ -f ".circleci/config.yml" ] && C_stat=$(good)
|
|
@@ -128,13 +136,14 @@ check_repo() {
|
|
|
128
136
|
[ $? -ne 0 ] && needspush='!tags'
|
|
129
137
|
fi
|
|
130
138
|
local babel7=$(check_babel)
|
|
139
|
+
local hookar=$(check_har)
|
|
131
140
|
local circle=$(check_circle)
|
|
132
141
|
local eslint=$(check_eslint)
|
|
133
142
|
local esmlib=$(check_ESM)
|
|
134
143
|
local license=$(check_license)
|
|
135
144
|
local scoped=$(check_scope)
|
|
136
|
-
[ $(( $repos % 15)) -eq 0 ] && printf "\n%35s pkg git cln scop cir lic ESM
|
|
137
|
-
printf "%32s: %-8s %-16s %s %8s %s %s %s %s %s\n" ${dir:0:32} $pkgver $(check_git_version $gitver $pkgver) $localmods $scoped $circle $license $esmlib $
|
|
145
|
+
[ $(( $repos % 15)) -eq 0 ] && printf "\n%35s pkg git cln scop cir lic ESM har\n"
|
|
146
|
+
printf "%32s: %-8s %-16s %s %8s %s %s %s %s %s\n" ${dir:0:32} $pkgver $(check_git_version $gitver $pkgver) $localmods $scoped $circle $license $esmlib $hookar "$needspush"
|
|
138
147
|
let "repos++"
|
|
139
148
|
cd - &> /dev/null
|
|
140
149
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
*.yaml
|
/package/src/helm-charts/prom-operator/rules/{prometheus-rules.yaml.ovh → prometheus-rules.yaml}
RENAMED
|
File without changes
|