I want to ask about webhook action in c7n-left #9736
Unanswered
minhphuc2k21
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
I want to send a notification using a webhook when running a policy review but when the run is finished. I didn't receive any notifications. i don't know if i have misconfiguration or if c7n-left supports webhook action or not. I use webhook.site
main.tf
resource "vngcloud_vserver_volume" "volume" {
count = var.server_count
name = "vngcloud-volume-${count.index}"
size = 18
volume_type_id = data.vngcloud_vserver_volume_type.volume_type.id
project_id = var.project_id
lifecycle {
create_before_destroy = true
}
}
policy.yaml
policies:
resource:
metadata:
category:
severity: critical
filters:
key: size
value: 19
op: lt
actions:
url: https://webhook.site/e94d80f9-7ce1-4ea5-8574-600fbf1fd676
body: '{"message": "Volume size check failed"}'
Evaluation complete 0.01 seconds -> 1 Failures
Summary - By Policy
┏━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━┓
┃ Severity ┃ Policy ┃ Result ┃
┡━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━┩
│ critical │ check-vserver-volume │ 1 failed 0 passed │
└──────────┴──────────────────────┴───────────────────┘
1 compliant of 5 total, 1 resources have 1 policy violations, 4 resources unevaluated
Beta Was this translation helpful? Give feedback.
All reactions