qontract-reconcile 0.10.2.dev266__py3-none-any.whl → 0.10.2.dev267__py3-none-any.whl
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.
- {qontract_reconcile-0.10.2.dev266.dist-info → qontract_reconcile-0.10.2.dev267.dist-info}/METADATA +1 -1
- {qontract_reconcile-0.10.2.dev266.dist-info → qontract_reconcile-0.10.2.dev267.dist-info}/RECORD +6 -6
- tools/alert_report.py +16 -0
- tools/qontract_cli.py +2 -0
- {qontract_reconcile-0.10.2.dev266.dist-info → qontract_reconcile-0.10.2.dev267.dist-info}/WHEEL +0 -0
- {qontract_reconcile-0.10.2.dev266.dist-info → qontract_reconcile-0.10.2.dev267.dist-info}/entry_points.txt +0 -0
{qontract_reconcile-0.10.2.dev266.dist-info → qontract_reconcile-0.10.2.dev267.dist-info}/METADATA
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: qontract-reconcile
|
3
|
-
Version: 0.10.2.
|
3
|
+
Version: 0.10.2.dev267
|
4
4
|
Summary: Collection of tools to reconcile services with their desired state as defined in the app-interface DB.
|
5
5
|
Project-URL: homepage, https://github.com/app-sre/qontract-reconcile
|
6
6
|
Project-URL: repository, https://github.com/app-sre/qontract-reconcile
|
{qontract_reconcile-0.10.2.dev266.dist-info → qontract_reconcile-0.10.2.dev267.dist-info}/RECORD
RENAMED
@@ -764,14 +764,14 @@ reconcile/utils/unleash/__init__.py,sha256=2PsN3GlLU8DOyWSvv5q9uzwuFn_vYtfEo-mmV
|
|
764
764
|
reconcile/utils/unleash/client.py,sha256=YrJnauxjcy1ml7W2AHg7dzIH_fVK_GugoRu7IFmk6e0,3505
|
765
765
|
reconcile/utils/unleash/server.py,sha256=907gDh9Ee8UxLqusnfpzE-7LUnttB38D4xhVJ0vMf_M,4439
|
766
766
|
tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
767
|
-
tools/alert_report.py,sha256=
|
767
|
+
tools/alert_report.py,sha256=cyQTei8_SYOggW_6uYvzhrF7Nae-9xOz-jmh9O9V8R8,5589
|
768
768
|
tools/app_interface_metrics_exporter.py,sha256=f1qwTmQfEcs98uBVRyBa0k7GQXdiSwd7w1hDVjhdGcQ,2303
|
769
769
|
tools/app_interface_reporter.py,sha256=0_oq1-mL0UOh1x5G8CoKaEVJqK-XTKE7PX7IbRTovBc,17224
|
770
770
|
tools/app_sre_tekton_access_reporter.py,sha256=o9prLUgQpwO3msRWc2as1xT1y9OB3znkpgvLr0Ys8_M,3146
|
771
771
|
tools/app_sre_tekton_access_revalidation.py,sha256=66nHEaY-bIqxIhpcmwN8AvQZu6ZXenfkg4Fut0pVZRM,2726
|
772
772
|
tools/glitchtip_access_reporter.py,sha256=o01A6b88t3Wie6tj_tJWWVo2J01LxQ_a9giGm4UzEaU,2901
|
773
773
|
tools/glitchtip_access_revalidation.py,sha256=PXN5wxl6OX8sxddPaakDF3X79nFLvpm-lz0mWLVelw0,2806
|
774
|
-
tools/qontract_cli.py,sha256=
|
774
|
+
tools/qontract_cli.py,sha256=DkIJX7jYRycBDKySQHVB6fNIAFpF3USkZaLJbcsYnDg,159204
|
775
775
|
tools/template_validation.py,sha256=wW22pH4bJBN5CcK74RuIEwtiVmQ3zI1eSvNMAE6fbyc,3377
|
776
776
|
tools/cli_commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
777
777
|
tools/cli_commands/container_images_report.py,sha256=_8GuBsl_qYP5qfa5aa9krwyKHYu82MSh02deHEroSa4,5459
|
@@ -797,7 +797,7 @@ tools/saas_promotion_state/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJ
|
|
797
797
|
tools/saas_promotion_state/saas_promotion_state.py,sha256=oF7C4hpIgyMTwTRm3Aun3cDCHIjVar65JoLp6NcJHlU,3909
|
798
798
|
tools/sre_checkpoints/__init__.py,sha256=CDaDaywJnmRCLyl_NCcvxi-Zc0hTi_3OdwKiFOyS39I,145
|
799
799
|
tools/sre_checkpoints/util.py,sha256=zEDbGr18ZeHNQwW8pUsr2JRjuXIPz--WAGJxZo9sv_Y,894
|
800
|
-
qontract_reconcile-0.10.2.
|
801
|
-
qontract_reconcile-0.10.2.
|
802
|
-
qontract_reconcile-0.10.2.
|
803
|
-
qontract_reconcile-0.10.2.
|
800
|
+
qontract_reconcile-0.10.2.dev267.dist-info/METADATA,sha256=8vXQoAu6tLPI2W0bpAPmQW3RzzD_eO20K4SvoXs-560,24501
|
801
|
+
qontract_reconcile-0.10.2.dev267.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
802
|
+
qontract_reconcile-0.10.2.dev267.dist-info/entry_points.txt,sha256=5i9l54La3vQrDLAdwDKQWC0iG4sV9RRfOb1BpvzOWLc,698
|
803
|
+
qontract_reconcile-0.10.2.dev267.dist-info/RECORD,,
|
tools/alert_report.py
CHANGED
@@ -12,17 +12,22 @@ class Alert:
|
|
12
12
|
message: str
|
13
13
|
timestamp: float
|
14
14
|
username: str
|
15
|
+
responsed: bool
|
15
16
|
|
16
17
|
|
17
18
|
class AlertStat:
|
18
19
|
def __init__(self) -> None:
|
19
20
|
self._triggered_alerts = 0
|
20
21
|
self._resolved_alerts = 0
|
22
|
+
self._responsed_alerts = 0
|
21
23
|
self._elapsed_times: list[float] = []
|
22
24
|
|
23
25
|
def add_triggered(self) -> None:
|
24
26
|
self._triggered_alerts += 1
|
25
27
|
|
28
|
+
def add_responsed(self) -> None:
|
29
|
+
self._responsed_alerts += 1
|
30
|
+
|
26
31
|
def add_resolved(self) -> None:
|
27
32
|
self._resolved_alerts += 1
|
28
33
|
|
@@ -37,6 +42,10 @@ class AlertStat:
|
|
37
42
|
def resolved_alerts(self) -> int:
|
38
43
|
return self._resolved_alerts
|
39
44
|
|
45
|
+
@property
|
46
|
+
def responsed_alerts(self) -> int:
|
47
|
+
return self._responsed_alerts
|
48
|
+
|
40
49
|
@property
|
41
50
|
def elapsed_times(self) -> list[float]:
|
42
51
|
return self._elapsed_times
|
@@ -53,6 +62,8 @@ def group_alerts(messages: list[dict]) -> dict[str, list[Alert]]:
|
|
53
62
|
continue
|
54
63
|
|
55
64
|
timestamp = float(m["ts"])
|
65
|
+
responsed = bool(m.get("reply_count", 0) or m.get("reactions", []))
|
66
|
+
|
56
67
|
for at in m.get("attachments", []):
|
57
68
|
if "title" not in at:
|
58
69
|
continue
|
@@ -79,6 +90,7 @@ def group_alerts(messages: list[dict]) -> dict[str, list[Alert]]:
|
|
79
90
|
message=alert_message,
|
80
91
|
timestamp=timestamp,
|
81
92
|
username=m["username"],
|
93
|
+
responsed=responsed,
|
82
94
|
)
|
83
95
|
)
|
84
96
|
else:
|
@@ -93,6 +105,7 @@ def group_alerts(messages: list[dict]) -> dict[str, list[Alert]]:
|
|
93
105
|
message="placeholder",
|
94
106
|
timestamp=timestamp,
|
95
107
|
username=m["username"],
|
108
|
+
responsed=responsed,
|
96
109
|
)
|
97
110
|
)
|
98
111
|
continue
|
@@ -114,6 +127,7 @@ def group_alerts(messages: list[dict]) -> dict[str, list[Alert]]:
|
|
114
127
|
message=alert_message,
|
115
128
|
timestamp=timestamp,
|
116
129
|
username=m["username"],
|
130
|
+
responsed=responsed,
|
117
131
|
)
|
118
132
|
)
|
119
133
|
|
@@ -135,6 +149,8 @@ def gen_alert_stats(alerts: dict[str, list[Alert]]) -> dict[str, AlertStat]:
|
|
135
149
|
if al.state == "FIRING":
|
136
150
|
alert_stats[alert_name].add_triggered()
|
137
151
|
temp[key] = al
|
152
|
+
if al.responsed:
|
153
|
+
alert_stats[alert_name].add_responsed()
|
138
154
|
|
139
155
|
if al.state == "RESOLVED":
|
140
156
|
alert_stats[alert_name].add_resolved()
|
tools/qontract_cli.py
CHANGED
@@ -869,6 +869,7 @@ def alert_report(
|
|
869
869
|
"Triggered",
|
870
870
|
"Resolved",
|
871
871
|
"Median time to resolve (h:mm:ss)",
|
872
|
+
"Response Rate",
|
872
873
|
]
|
873
874
|
table_data: list[dict[str, str]] = []
|
874
875
|
for alert_name, data in sorted(
|
@@ -884,6 +885,7 @@ def alert_report(
|
|
884
885
|
"Triggered": str(data.triggered_alerts),
|
885
886
|
"Resolved": str(data.resolved_alerts),
|
886
887
|
"Median time to resolve (h:mm:ss)": median_elapsed,
|
888
|
+
"Response Rate": f"{data.responsed_alerts / data.triggered_alerts * 100:.2f}%",
|
887
889
|
})
|
888
890
|
|
889
891
|
# TODO(mafriedm, rporres): Fix this
|
{qontract_reconcile-0.10.2.dev266.dist-info → qontract_reconcile-0.10.2.dev267.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|