-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add customfields to prometheus labels #314
add customfields to prometheus labels #314
Conversation
Signed-off-by: Jeremy Mill <jeremymill@gmail.com>
Signed-off-by: Jeremy Mill <jeremymill@gmail.com>
Signed-off-by: Jeremy Mill <jeremymill@gmail.com>
Signed-off-by: Jeremy Mill <jeremymill@gmail.com>
@Issif I made sure the labels are valid prometheus labels according to their docs here in this commit: dd989ed I wanted to also add unit testing to this since it seems a likely place to have an accidental breakage in the future. To support unit testing in the Let me know what you think |
LGTM label has been added. Git tree hash: fd34b4581def8af037c85d5fea7d5329e10e952d
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Issif, LivingInSyn The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Jeremy Mill jeremymill@gmail.com
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
/area outputs
What this PR does / why we need it:
This PR allows users to configure custom prometheus labels. It is separate from the
CUSTOMFIELDS
configuration to avoid creating too many series in prometheus.Which issue(s) this PR fixes:
n/a
Fixes #
Special notes for your reviewer:
The primary use case is to do something like add a
cluster
andenvironment
tag to prometheus metrics to differentiate between clusters and prod/dev environments.Sample output from a test in my cluster with this build is:
falco_events{app_kubernetes_io_instance="falco", app_kubernetes_io_name="falcosidekick", cluster="security", environment="dev", instance="10.96.2.18:2801", job="kubernetes-pods", k8s_ns_name="default", k8s_pod_name="prom-prometheus-node-exporter-7zk92", namespace="default", pod="falco-falcosidekick-6fc876bb4c-njk9n", pod_template_hash="6fc876bb4c", priority="Informational", rule="Launch Sensitive Mount Container"}
I'm open to changing how this was done if there are concerns that I'm not aware of