cruise-automation / k-rail

Kubernetes security tool for policy enforcement
Apache License 2.0
444 stars 55 forks source link

policy executions with labels in prom metrics #106

Closed nictrix closed 3 years ago

nictrix commented 3 years ago

Adding policy execution metrics, loaded plugins and registered policies

Example of each in /metrics output

krail_policy_violations{enforced="true",exempt="false",global_report_only="false",kind="PodExec",namespace="ecommerce",policy="pod_no_exec",report_only="false",resource="payment-processor",user="bob@amyshardware.com"} 1
krail_policy_violations{enforced="false",exempt="false",global_report_only="false",kind="PodExec",namespace="sandbox",policy="pod_no_exec",report_only="true",resource="payment-processor",user="bob@amyshardware.com"} 8
krail_total_loaded_plugins 0
krail_total_registered_policies 23