Skip to content
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

Brainstorming: integrate Prometheus /metrics handler in Falco #1772

Closed
Dentrax opened this issue Nov 3, 2021 · 17 comments · Fixed by #3140
Closed

Brainstorming: integrate Prometheus /metrics handler in Falco #1772

Dentrax opened this issue Nov 3, 2021 · 17 comments · Fixed by #3140
Assignees
Milestone

Comments

@Dentrax
Copy link
Contributor

Dentrax commented Nov 3, 2021

Motivation

Since falco-exporter is a great tool to expose prometheus metrics through gRPC, I think there are some caveats to use it. Our (w/ @developer-guy @f9n) some motivations to create this issue is that the following ones:

  • To reduce unnecessary gRPC communication: we have to enable gRPC output feature in the configuration. 1
  • To do not manage mTLS certs: to connect gRPC over unix socket, we have to manage additionally CA Certs as described under connection options
  • To manage one single helm chart: there are two different helm charts that we have to manage and maintain in our infrastructure, which are falco and falco-exporter
  • To reduce complexity: simplicity is always better, to easily see the metrics in the Grafana, requires additional work to implement in current design
  • To make monitoring easier on local: we can instantly check the metrics using /metrics endpoint in some troubleshooting scenarios
$ kubectl port-forward svc/falco 8756
$ curl localhost:8756/metrics

I think that implementing a Prometheus metrics in C++ would not be as easy as it looks like. Here is an example metric server that currently using in fluentbit.

Feature

This feature already clearly proposed in #421 and #530 and implemented in the projects.

Alternatives

Additional context

By throwing this issue actually does NOT mean that we should achieve the falco-exporter and provide this metrics in only falco by built-in. What I want to say mostly are the following ones to clarify and understand the design:

  • How we can make this process simpler by removing unnecessary dependencies?
  • What is the correct way to do?
  • Why did not falco provide /metrics endpoint in the first place?
  • What is the motivation of behind this design: separating metrics module into another project?

Waiting your feedback!

Footnotes

  1. https://github.com/falcosecurity/falco-exporter#prerequisites

@Dentrax
Copy link
Contributor Author

Dentrax commented Jan 14, 2022

Kind ping here 🎗️

@Dentrax
Copy link
Contributor Author

Dentrax commented Feb 28, 2022

We can take a look Fluent Bit's cmt_gauge.h for C++ implementation.

@Issif
Copy link
Member

Issif commented Feb 28, 2022

FYI Falcosidekick exposes prom metrics exactly like you want, it can be managed with the same chart and it does not require mtls.

See: https://github.com/falcosecurity/falcosidekick#prometheus

@Dentrax
Copy link
Contributor Author

Dentrax commented Feb 28, 2022

FYI Falcosidekick exposes prom metrics exactly like you want, it can be managed with the same chart and it does not require mtls.

See: falcosecurity/falcosidekick#prometheus

Thanks, just noticed that! AFAICS, it exposes 3 metrics: falco, inputs, outputs

It could be very useful to use this on cloud or small clusters. But someone who actively use a log aggregator solution on cluster, Fluent Bit for example, might not want to install and maintain an external app in cluster. I mean, you'd have to do an additional HTTP request for each event times cluster count. I am not so sure how this fits in a pull-based system.

@poiana
Copy link
Contributor

poiana commented Jun 14, 2022

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

@Dentrax
Copy link
Contributor Author

Dentrax commented Jun 15, 2022

/remove-lifecycle stale

@poiana
Copy link
Contributor

poiana commented Sep 13, 2022

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

@Dentrax
Copy link
Contributor Author

Dentrax commented Sep 14, 2022

/remove-lifecycle stale

@poiana
Copy link
Contributor

poiana commented Dec 13, 2022

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

@Dentrax
Copy link
Contributor Author

Dentrax commented Dec 21, 2022

/remove-lifecycle stale

@poiana
Copy link
Contributor

poiana commented Mar 21, 2023

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

@jasondellaluce
Copy link
Contributor

/remove-lifecycle stale

@poiana
Copy link
Contributor

poiana commented Jun 19, 2023

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

@jasondellaluce
Copy link
Contributor

/remove-lifecycle stale

/milestone 0.36.0

@poiana poiana added this to the 0.36.0 milestone Jun 20, 2023
@Andreagit97 Andreagit97 modified the milestones: 0.36.0, TBD Aug 31, 2023
@poiana
Copy link
Contributor

poiana commented Nov 29, 2023

Issues go stale after 90d of inactivity.

Mark the issue as fresh with /remove-lifecycle stale.

Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Provide feedback via https://github.com/falcosecurity/community.

/lifecycle stale

@Andreagit97
Copy link
Member

/remove-lifecycle stale

@leogr
Copy link
Member

leogr commented Feb 19, 2024

cross-linking falcosecurity/libs#1463

cc @incertum

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants