@zigordev/stack 1.8.1 → 1.9.0
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/observability/alert-app-cannot-be-reached-from-outside.json +60 -0
- package/observability/alert-email-failed-for-good.json +60 -0
- package/observability/alert-jobs-are-waiting.json +60 -0
- package/observability/alert-kafka-broker-is-down.json +1 -1
- package/observability/alert-mail-server-cannot-be-reached.json +60 -0
- package/observability/dashboard-app.json +56 -0
- package/observability/dashboard-platform.json +155 -0
- package/package.json +1 -1
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiVersion": "rules.alerting.grafana.app/v1beta1",
|
|
3
|
+
"kind": "AlertRule",
|
|
4
|
+
"metadata": {
|
|
5
|
+
"name": "app-cannot-be-reached-from-outside",
|
|
6
|
+
"annotations": {
|
|
7
|
+
"grafana.app/folder": "zigordev"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"spec": {
|
|
11
|
+
"title": "An app cannot be reached from outside",
|
|
12
|
+
"trigger": {
|
|
13
|
+
"interval": "1m"
|
|
14
|
+
},
|
|
15
|
+
"for": "5m",
|
|
16
|
+
"noDataState": "Ok",
|
|
17
|
+
"execErrState": "Error",
|
|
18
|
+
"labels": {
|
|
19
|
+
"severity": "phone"
|
|
20
|
+
},
|
|
21
|
+
"annotations": {
|
|
22
|
+
"summary": "The latest outside check of {{ $labels.product }} has failed from every place for 5 minutes, so its visitors likely cannot reach it either",
|
|
23
|
+
"runbook_url": "https://github.com/zigordev/platform/blob/main/docs/runbooks/app-cannot-be-reached-from-outside.md",
|
|
24
|
+
"__dashboardUid__": "platform",
|
|
25
|
+
"__panelId__": "17"
|
|
26
|
+
},
|
|
27
|
+
"expressions": {
|
|
28
|
+
"A": {
|
|
29
|
+
"datasourceUID": "prometheus",
|
|
30
|
+
"relativeTimeRange": {
|
|
31
|
+
"from": "10m",
|
|
32
|
+
"to": "0s"
|
|
33
|
+
},
|
|
34
|
+
"model": {
|
|
35
|
+
"refId": "A",
|
|
36
|
+
"expr": "(1 - max by (product) (probe_success{product!=\"\"})) > 0",
|
|
37
|
+
"instant": true
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"B": {
|
|
41
|
+
"source": true,
|
|
42
|
+
"model": {
|
|
43
|
+
"refId": "B",
|
|
44
|
+
"type": "threshold",
|
|
45
|
+
"expression": "A",
|
|
46
|
+
"conditions": [
|
|
47
|
+
{
|
|
48
|
+
"evaluator": {
|
|
49
|
+
"type": "gt",
|
|
50
|
+
"params": [
|
|
51
|
+
0
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiVersion": "rules.alerting.grafana.app/v1beta1",
|
|
3
|
+
"kind": "AlertRule",
|
|
4
|
+
"metadata": {
|
|
5
|
+
"name": "email-failed-for-good",
|
|
6
|
+
"annotations": {
|
|
7
|
+
"grafana.app/folder": "zigordev"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"spec": {
|
|
11
|
+
"title": "An email failed for good",
|
|
12
|
+
"trigger": {
|
|
13
|
+
"interval": "1m"
|
|
14
|
+
},
|
|
15
|
+
"for": "0s",
|
|
16
|
+
"noDataState": "Ok",
|
|
17
|
+
"execErrState": "Error",
|
|
18
|
+
"labels": {
|
|
19
|
+
"severity": "email"
|
|
20
|
+
},
|
|
21
|
+
"annotations": {
|
|
22
|
+
"summary": "An email that {{ $labels.producer }} asked {{ $labels.service_name }} to send has failed for good, so its recipient will not get it",
|
|
23
|
+
"runbook_url": "https://github.com/zigordev/platform/blob/main/docs/runbooks/email-failed-for-good.md",
|
|
24
|
+
"__dashboardUid__": "platform",
|
|
25
|
+
"__panelId__": "15"
|
|
26
|
+
},
|
|
27
|
+
"expressions": {
|
|
28
|
+
"A": {
|
|
29
|
+
"datasourceUID": "prometheus",
|
|
30
|
+
"relativeTimeRange": {
|
|
31
|
+
"from": "10m",
|
|
32
|
+
"to": "0s"
|
|
33
|
+
},
|
|
34
|
+
"model": {
|
|
35
|
+
"refId": "A",
|
|
36
|
+
"expr": "sum by (service_name, producer) (increase(notifications_email_deliveries_total{outcome=\"failed\"}[10m])) > 0",
|
|
37
|
+
"instant": true
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"B": {
|
|
41
|
+
"source": true,
|
|
42
|
+
"model": {
|
|
43
|
+
"refId": "B",
|
|
44
|
+
"type": "threshold",
|
|
45
|
+
"expression": "A",
|
|
46
|
+
"conditions": [
|
|
47
|
+
{
|
|
48
|
+
"evaluator": {
|
|
49
|
+
"type": "gt",
|
|
50
|
+
"params": [
|
|
51
|
+
0
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiVersion": "rules.alerting.grafana.app/v1beta1",
|
|
3
|
+
"kind": "AlertRule",
|
|
4
|
+
"metadata": {
|
|
5
|
+
"name": "jobs-are-waiting",
|
|
6
|
+
"annotations": {
|
|
7
|
+
"grafana.app/folder": "zigordev"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"spec": {
|
|
11
|
+
"title": "Jobs are waiting",
|
|
12
|
+
"trigger": {
|
|
13
|
+
"interval": "1m"
|
|
14
|
+
},
|
|
15
|
+
"for": "15m",
|
|
16
|
+
"noDataState": "Ok",
|
|
17
|
+
"execErrState": "Error",
|
|
18
|
+
"labels": {
|
|
19
|
+
"severity": "phone"
|
|
20
|
+
},
|
|
21
|
+
"annotations": {
|
|
22
|
+
"summary": "{{ $labels.service_name }} has had jobs ready to start on its queue {{ $labels.messaging_destination_name }} for 15 minutes, so their work is late",
|
|
23
|
+
"runbook_url": "https://github.com/zigordev/platform/blob/main/docs/runbooks/jobs-are-waiting.md",
|
|
24
|
+
"__dashboardUid__": "app",
|
|
25
|
+
"__panelId__": "15"
|
|
26
|
+
},
|
|
27
|
+
"expressions": {
|
|
28
|
+
"A": {
|
|
29
|
+
"datasourceUID": "prometheus",
|
|
30
|
+
"relativeTimeRange": {
|
|
31
|
+
"from": "10m",
|
|
32
|
+
"to": "0s"
|
|
33
|
+
},
|
|
34
|
+
"model": {
|
|
35
|
+
"refId": "A",
|
|
36
|
+
"expr": "max by (service_name, messaging_destination_name) (pgboss_queue_jobs{pgboss_job_state=\"ready\"}) > 0",
|
|
37
|
+
"instant": true
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"B": {
|
|
41
|
+
"source": true,
|
|
42
|
+
"model": {
|
|
43
|
+
"refId": "B",
|
|
44
|
+
"type": "threshold",
|
|
45
|
+
"expression": "A",
|
|
46
|
+
"conditions": [
|
|
47
|
+
{
|
|
48
|
+
"evaluator": {
|
|
49
|
+
"type": "gt",
|
|
50
|
+
"params": [
|
|
51
|
+
0
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"apiVersion": "rules.alerting.grafana.app/v1beta1",
|
|
3
|
+
"kind": "AlertRule",
|
|
4
|
+
"metadata": {
|
|
5
|
+
"name": "mail-server-cannot-be-reached",
|
|
6
|
+
"annotations": {
|
|
7
|
+
"grafana.app/folder": "zigordev"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"spec": {
|
|
11
|
+
"title": "The mail server cannot be reached",
|
|
12
|
+
"trigger": {
|
|
13
|
+
"interval": "1m"
|
|
14
|
+
},
|
|
15
|
+
"for": "10m",
|
|
16
|
+
"noDataState": "Ok",
|
|
17
|
+
"execErrState": "Error",
|
|
18
|
+
"labels": {
|
|
19
|
+
"severity": "email"
|
|
20
|
+
},
|
|
21
|
+
"annotations": {
|
|
22
|
+
"summary": "{{ $labels.service_name }} has failed to reach its mail server, or to sign in to it, for 10 minutes, so it holds every email until it can",
|
|
23
|
+
"runbook_url": "https://github.com/zigordev/platform/blob/main/docs/runbooks/mail-server-cannot-be-reached.md",
|
|
24
|
+
"__dashboardUid__": "platform",
|
|
25
|
+
"__panelId__": "16"
|
|
26
|
+
},
|
|
27
|
+
"expressions": {
|
|
28
|
+
"A": {
|
|
29
|
+
"datasourceUID": "prometheus",
|
|
30
|
+
"relativeTimeRange": {
|
|
31
|
+
"from": "10m",
|
|
32
|
+
"to": "0s"
|
|
33
|
+
},
|
|
34
|
+
"model": {
|
|
35
|
+
"refId": "A",
|
|
36
|
+
"expr": "(1 - max by (service_name) (notifications_provider_up)) > 0",
|
|
37
|
+
"instant": true
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"B": {
|
|
41
|
+
"source": true,
|
|
42
|
+
"model": {
|
|
43
|
+
"refId": "B",
|
|
44
|
+
"type": "threshold",
|
|
45
|
+
"expression": "A",
|
|
46
|
+
"conditions": [
|
|
47
|
+
{
|
|
48
|
+
"evaluator": {
|
|
49
|
+
"type": "gt",
|
|
50
|
+
"params": [
|
|
51
|
+
0
|
|
52
|
+
]
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -716,6 +716,62 @@
|
|
|
716
716
|
"refId": "A"
|
|
717
717
|
}
|
|
718
718
|
]
|
|
719
|
+
},
|
|
720
|
+
{
|
|
721
|
+
"type": "row",
|
|
722
|
+
"collapsed": false,
|
|
723
|
+
"id": 0,
|
|
724
|
+
"panels": [],
|
|
725
|
+
"title": "Jobs",
|
|
726
|
+
"gridPos": {
|
|
727
|
+
"x": 0,
|
|
728
|
+
"y": 55,
|
|
729
|
+
"h": 1,
|
|
730
|
+
"w": 24
|
|
731
|
+
}
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"type": "timeseries",
|
|
735
|
+
"transparent": false,
|
|
736
|
+
"repeatDirection": "h",
|
|
737
|
+
"options": {
|
|
738
|
+
"legend": {
|
|
739
|
+
"displayMode": "list",
|
|
740
|
+
"placement": "bottom",
|
|
741
|
+
"showLegend": false,
|
|
742
|
+
"calcs": []
|
|
743
|
+
},
|
|
744
|
+
"tooltip": {
|
|
745
|
+
"mode": "single",
|
|
746
|
+
"sort": "asc"
|
|
747
|
+
}
|
|
748
|
+
},
|
|
749
|
+
"fieldConfig": {
|
|
750
|
+
"defaults": {
|
|
751
|
+
"custom": {},
|
|
752
|
+
"unit": "short"
|
|
753
|
+
},
|
|
754
|
+
"overrides": []
|
|
755
|
+
},
|
|
756
|
+
"id": 15,
|
|
757
|
+
"title": "Jobs ready to start, by queue",
|
|
758
|
+
"datasource": {
|
|
759
|
+
"type": "prometheus",
|
|
760
|
+
"uid": "prometheus"
|
|
761
|
+
},
|
|
762
|
+
"gridPos": {
|
|
763
|
+
"h": 8,
|
|
764
|
+
"w": 12,
|
|
765
|
+
"x": 0,
|
|
766
|
+
"y": 56
|
|
767
|
+
},
|
|
768
|
+
"targets": [
|
|
769
|
+
{
|
|
770
|
+
"expr": "max by (messaging_destination_name) (pgboss_queue_jobs{service_name=\"$app\", pgboss_job_state=\"ready\"})",
|
|
771
|
+
"legendFormat": "{{messaging_destination_name}}",
|
|
772
|
+
"refId": "A"
|
|
773
|
+
}
|
|
774
|
+
]
|
|
719
775
|
}
|
|
720
776
|
]
|
|
721
777
|
}
|
|
@@ -701,6 +701,161 @@
|
|
|
701
701
|
"refId": "A"
|
|
702
702
|
}
|
|
703
703
|
]
|
|
704
|
+
},
|
|
705
|
+
{
|
|
706
|
+
"type": "row",
|
|
707
|
+
"collapsed": false,
|
|
708
|
+
"id": 0,
|
|
709
|
+
"panels": [],
|
|
710
|
+
"title": "Email",
|
|
711
|
+
"gridPos": {
|
|
712
|
+
"x": 0,
|
|
713
|
+
"y": 57,
|
|
714
|
+
"h": 1,
|
|
715
|
+
"w": 24
|
|
716
|
+
}
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"type": "timeseries",
|
|
720
|
+
"transparent": false,
|
|
721
|
+
"repeatDirection": "h",
|
|
722
|
+
"options": {
|
|
723
|
+
"legend": {
|
|
724
|
+
"displayMode": "list",
|
|
725
|
+
"placement": "bottom",
|
|
726
|
+
"showLegend": false,
|
|
727
|
+
"calcs": []
|
|
728
|
+
},
|
|
729
|
+
"tooltip": {
|
|
730
|
+
"mode": "single",
|
|
731
|
+
"sort": "asc"
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
"fieldConfig": {
|
|
735
|
+
"defaults": {
|
|
736
|
+
"custom": {},
|
|
737
|
+
"unit": "short"
|
|
738
|
+
},
|
|
739
|
+
"overrides": []
|
|
740
|
+
},
|
|
741
|
+
"id": 15,
|
|
742
|
+
"title": "Emails that ended, by app and outcome",
|
|
743
|
+
"datasource": {
|
|
744
|
+
"type": "prometheus",
|
|
745
|
+
"uid": "prometheus"
|
|
746
|
+
},
|
|
747
|
+
"gridPos": {
|
|
748
|
+
"h": 8,
|
|
749
|
+
"w": 12,
|
|
750
|
+
"x": 0,
|
|
751
|
+
"y": 58
|
|
752
|
+
},
|
|
753
|
+
"targets": [
|
|
754
|
+
{
|
|
755
|
+
"expr": "sum by (producer, outcome) (increase(notifications_email_deliveries_total[$__rate_interval]))",
|
|
756
|
+
"legendFormat": "{{producer}}, {{outcome}}",
|
|
757
|
+
"refId": "A"
|
|
758
|
+
}
|
|
759
|
+
]
|
|
760
|
+
},
|
|
761
|
+
{
|
|
762
|
+
"type": "timeseries",
|
|
763
|
+
"transparent": false,
|
|
764
|
+
"repeatDirection": "h",
|
|
765
|
+
"options": {
|
|
766
|
+
"legend": {
|
|
767
|
+
"displayMode": "list",
|
|
768
|
+
"placement": "bottom",
|
|
769
|
+
"showLegend": false,
|
|
770
|
+
"calcs": []
|
|
771
|
+
},
|
|
772
|
+
"tooltip": {
|
|
773
|
+
"mode": "single",
|
|
774
|
+
"sort": "asc"
|
|
775
|
+
}
|
|
776
|
+
},
|
|
777
|
+
"fieldConfig": {
|
|
778
|
+
"defaults": {
|
|
779
|
+
"custom": {},
|
|
780
|
+
"unit": "short"
|
|
781
|
+
},
|
|
782
|
+
"overrides": []
|
|
783
|
+
},
|
|
784
|
+
"id": 16,
|
|
785
|
+
"title": "The mail server answers",
|
|
786
|
+
"datasource": {
|
|
787
|
+
"type": "prometheus",
|
|
788
|
+
"uid": "prometheus"
|
|
789
|
+
},
|
|
790
|
+
"gridPos": {
|
|
791
|
+
"h": 8,
|
|
792
|
+
"w": 12,
|
|
793
|
+
"x": 12,
|
|
794
|
+
"y": 58
|
|
795
|
+
},
|
|
796
|
+
"targets": [
|
|
797
|
+
{
|
|
798
|
+
"expr": "max by (service_name) (notifications_provider_up)",
|
|
799
|
+
"legendFormat": "{{service_name}}",
|
|
800
|
+
"refId": "A"
|
|
801
|
+
}
|
|
802
|
+
]
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
"type": "row",
|
|
806
|
+
"collapsed": false,
|
|
807
|
+
"id": 0,
|
|
808
|
+
"panels": [],
|
|
809
|
+
"title": "From outside",
|
|
810
|
+
"gridPos": {
|
|
811
|
+
"x": 0,
|
|
812
|
+
"y": 66,
|
|
813
|
+
"h": 1,
|
|
814
|
+
"w": 24
|
|
815
|
+
}
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
"type": "timeseries",
|
|
819
|
+
"transparent": false,
|
|
820
|
+
"repeatDirection": "h",
|
|
821
|
+
"options": {
|
|
822
|
+
"legend": {
|
|
823
|
+
"displayMode": "list",
|
|
824
|
+
"placement": "bottom",
|
|
825
|
+
"showLegend": false,
|
|
826
|
+
"calcs": []
|
|
827
|
+
},
|
|
828
|
+
"tooltip": {
|
|
829
|
+
"mode": "single",
|
|
830
|
+
"sort": "asc"
|
|
831
|
+
}
|
|
832
|
+
},
|
|
833
|
+
"fieldConfig": {
|
|
834
|
+
"defaults": {
|
|
835
|
+
"custom": {},
|
|
836
|
+
"unit": "short"
|
|
837
|
+
},
|
|
838
|
+
"overrides": []
|
|
839
|
+
},
|
|
840
|
+
"id": 17,
|
|
841
|
+
"title": "Outside checks that pass, by product and place",
|
|
842
|
+
"datasource": {
|
|
843
|
+
"type": "prometheus",
|
|
844
|
+
"uid": "prometheus"
|
|
845
|
+
},
|
|
846
|
+
"gridPos": {
|
|
847
|
+
"h": 8,
|
|
848
|
+
"w": 12,
|
|
849
|
+
"x": 0,
|
|
850
|
+
"y": 67
|
|
851
|
+
},
|
|
852
|
+
"targets": [
|
|
853
|
+
{
|
|
854
|
+
"expr": "max by (product, probe) (probe_success{product!=\"\"})",
|
|
855
|
+
"legendFormat": "{{product}} from {{probe}}",
|
|
856
|
+
"refId": "A"
|
|
857
|
+
}
|
|
858
|
+
]
|
|
704
859
|
}
|
|
705
860
|
]
|
|
706
861
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zigordev/stack",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "The shared services of the zigordev platform for a laptop: the ingress, the telemetry agent, a local Grafana and a mail catcher, as compose files with one command that starts them",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"type": "module",
|