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

fix(falco_metrics): fix prometheus metrics to be compliant with best practices #3337

Merged
merged 4 commits into from
Sep 23, 2024

Conversation

ekoops
Copy link
Contributor

@ekoops ekoops commented Sep 20, 2024

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind design

/kind documentation

/kind failing-test

/kind feature

/kind release

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area build

/area engine

/area tests

/area proposals

/area CI

What this PR does / why we need it:

This PR introduces the following changes:

  • split tags label in falcosecurity_falco_sha256_config_files_info and falcosecurity_falco_sha256_rules_files_info gauges into multiple tag_<tag>="true" labels
  • use full name for configs and rules files in metrics instead of using only filename stems
  • remove ifinfo_json stat/metric
  • remove unused falco_utils import

Which issue(s) this PR fixes:

Fixes #3336

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

fix(falco_metrics)!: split tags label into multiple `tag_`-prefixed labels
fix(falco_metrics)!: use full name for configs and rules files

Using JSON as value prevents any meaningful aggregation for the stats.
Splitting these information into multiple labels can drastically
increase the number of dimensions, as the number of interfaces and
addresses can be high in some environment. Moreover, these information
are not currently refreshed, even if they can frequently change. Given
these reasons, remove ifinfo_json from stats and metrics.

Signed-off-by: Leonardo Di Giovanna <[email protected]>
@ekoops ekoops force-pushed the fix-prometheus-metrics branch from c06522b to d6fe0d9 Compare September 23, 2024 12:54
@ekoops ekoops changed the title wip: fix(falco_metrics): fix prometheus metrics to be compliant with best practices fix(falco_metrics): fix prometheus metrics to be compliant with best practices Sep 23, 2024
@FedeDP
Copy link
Contributor

FedeDP commented Sep 23, 2024

/milestone 0.39.0

Thanks for this PR! LGTM!
cc @incertum FYI

@poiana poiana added this to the 0.39.0 milestone Sep 23, 2024
Copy link
Contributor

@FedeDP FedeDP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/approve

@poiana
Copy link
Contributor

poiana commented Sep 23, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ekoops, FedeDP

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@poiana
Copy link
Contributor

poiana commented Sep 23, 2024

LGTM label has been added.

Git tree hash: ce54e16497dabc89176e08357104dc92d9b7a24a

@poiana poiana merged commit d3a67c1 into falcosecurity:master Sep 23, 2024
32 of 35 checks passed
@ekoops ekoops deleted the fix-prometheus-metrics branch September 23, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Metrics best practice review (3 issues found)
4 participants