projects
/
osm
/
POL.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reformat files according to new black validation
[osm/POL.git]
/
osm_policy_module
/
common
/
mon_client.py
diff --git
a/osm_policy_module/common/mon_client.py
b/osm_policy_module/common/mon_client.py
index
ff8339f
..
f9a51cd
100644
(file)
--- a/
osm_policy_module/common/mon_client.py
+++ b/
osm_policy_module/common/mon_client.py
@@
-53,6
+53,7
@@
class MonClient:
threshold: int,
operation: str,
statistic: str = "AVERAGE",
threshold: int,
operation: str,
statistic: str = "AVERAGE",
+ action: str = "",
):
cor_id = random.randint(1, 10e7)
msg = self._build_create_alarm_payload(
):
cor_id = random.randint(1, 10e7)
msg = self._build_create_alarm_payload(
@@
-64,6
+65,7
@@
class MonClient:
threshold,
statistic,
operation,
threshold,
statistic,
operation,
+ action,
)
log.debug("Sending create_alarm_request %s", msg)
producer = AIOKafkaProducer(
)
log.debug("Sending create_alarm_request %s", msg)
producer = AIOKafkaProducer(
@@
-170,8
+172,8
@@
class MonClient:
threshold: int,
statistic: str,
operation: str,
threshold: int,
statistic: str,
operation: str,
+ action: str,
):
):
-
alarm_create_request = {
"correlation_id": cor_id,
"alarm_name": "osm_alarm_{}_{}_{}_{}".format(
alarm_create_request = {
"correlation_id": cor_id,
"alarm_name": "osm_alarm_{}_{}_{}_{}".format(
@@
-182,6
+184,7
@@
class MonClient:
"severity": "critical",
"threshold_value": threshold,
"statistic": statistic,
"severity": "critical",
"threshold_value": threshold,
"statistic": statistic,
+ "action": action,
"tags": {
"ns_id": ns_id,
"vdu_name": vdu_name,
"tags": {
"ns_id": ns_id,
"vdu_name": vdu_name,