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

[TRACKING] Expand existing webserver to serve Prometheus /metrics endpoint #3131

Closed
3 of 4 tasks
incertum opened this issue Mar 7, 2024 · 8 comments · Fixed by #3140
Closed
3 of 4 tasks

[TRACKING] Expand existing webserver to serve Prometheus /metrics endpoint #3131

incertum opened this issue Mar 7, 2024 · 8 comments · Fixed by #3140
Assignees
Milestone

Comments

@incertum
Copy link
Contributor

incertum commented Mar 7, 2024

Expand existing webserver to serve Prometheus /metrics endpoint.

The initial Prometheus tracking ticket lives here: falcosecurity/cncf-green-review-testing#12.


Work Items:

@incertum
Copy link
Contributor Author

incertum commented Mar 7, 2024

/assign @sgaist

As discussed hand-off to Samuel 🙏

@poiana
Copy link
Contributor

poiana commented Mar 7, 2024

@incertum: GitHub didn't allow me to assign the following users: sgaist.

Note that only falcosecurity members with read permissions, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @sgaist

As discussed hand-off to Samuel 🙏

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@incertum
Copy link
Contributor Author

incertum commented Mar 7, 2024

@sgaist can you assign yourself, the bot doesn't allow me to do it. Thanks!

@incertum
Copy link
Contributor Author

incertum commented Mar 7, 2024

/milestone 0.38.0

CC @leogr

@incertum
Copy link
Contributor Author

incertum commented Mar 8, 2024

The libs unit tests should give a clear idea of the Prometheus metrics strings you should expect. Here are a few examples of metrics outside of libs metrics that would need to be created in Falco.

# HELP testns_falco_kernel_release_info https://falco.org/docs/metrics/
# TYPE testns_falco_kernel_release_info gauge
testns_falco_kernel_release_info{raw_name="kernel_release",kernel_release="6.6.7-200.fc39.x86_64"} 1

# HELP testns_falco_duration_seconds_total https://falco.org/docs/metrics/
# TYPE testns_falco_duration_seconds_total counter
testns_falco_duration_seconds_total{raw_name="duration_sec"} 144

# HELP testns_falco_evt_rate_seconds https://falco.org/docs/metrics/
# TYPE testns_falco_evt_rate_seconds gauge
testns_falco_evt_rate_seconds{raw_name="evt_rate_sec"} 126065.400000

# HELP testns_falco_host_boot_timestamp_nanoseconds https://falco.org/docs/metrics/
# TYPE testns_falco_host_boot_timestamp_nanoseconds gauge
testns_falco_host_boot_timestamp_nanoseconds{raw_name="host_boot_ts"} 1708753667000000000

They are also part of the libs unit tests.

In addition re the Prometheus namespace + subsystem I would suggest the following:

  • falcosecurity_falco_*
  • falcosecurity_scap_*

The subsystem should match the output rules metrics naming conventions https://falco.org/docs/metrics/falco-metrics/

Finally, since we did this major libs metrics refactor it could be nice to also refactor the metrics output handling for falco since we are now expanding the scope with Prometheus. You will find a nice solution 😉 no doubt @sgaist !

@FedeDP
Copy link
Contributor

FedeDP commented Mar 14, 2024

@incertum PRs are merged both into libs and in Falco master.
@sgaist you can start your work whenever you wish :)

@sgaist
Copy link
Contributor

sgaist commented Mar 14, 2024

Noted and starting :-)

@sgaist
Copy link
Contributor

sgaist commented Mar 14, 2024

/assign @sgaist

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.

4 participants