-
Notifications
You must be signed in to change notification settings - Fork 912
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
feat(userspace)!: deprecate stats command args option in favor of metrics configs in falco.yaml #2739
feat(userspace)!: deprecate stats command args option in favor of metrics configs in falco.yaml #2739
Conversation
This PR may bring feature or behavior changes in the Falco engine and may require the engine version to be bumped. Please double check userspace/engine/falco_engine_version.h file. See versioning for FALCO_ENGINE_VERSION. /hold |
@@ -613,7 +613,7 @@ syscall_event_drops: | |||
max_burst: 1 | |||
simulate_drops: false | |||
|
|||
# [Experimental] `metrics` | |||
# [Stable] `metrics` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FedeDP @leogr WDYT? Other than that one odd behavior where the timer did not work when using http output (which Federico fixed) I have not heard of more issues when using the metrics feature, have you? It is working well for me in production.
Proposing to bump to Stable, which does not mean that there may be no additional bugs, it rather signals we are supporting metrics
now as stable feature going forward.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is good 2 go! Agree with you.
@leogr more thoughts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree 👍
cc @falcosecurity/falco-maintainers for visibility
/milestone 0.36.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SGTM. I am just waiting for more opinions before giving my approval.
@@ -613,7 +613,7 @@ syscall_event_drops: | |||
max_burst: 1 | |||
simulate_drops: false | |||
|
|||
# [Experimental] `metrics` | |||
# [Stable] `metrics` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree 👍
cc @falcosecurity/falco-maintainers for visibility
} | ||
} | ||
} | ||
// Keep for future use cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one minor cleanup otherwise LGTM!
Talking with Fede, he correctly pointed out that removing -s
would break all current Falco settings that are running with this flag enabled by default, but in the end, we depracted it in Falco 0.35 so it should be fine
@@ -219,8 +219,6 @@ void options::define(cxxopts::Options& opts) | |||
("p,print", "Add additional information to each falco notification's output.\nWith -pc or -pcontainer will use a container-friendly format.\nWith -pk or -pkubernetes will use a kubernetes-friendly format.\nAdditionally, specifying -pc/-pk will change the interpretation of %container.info in rule output fields.", cxxopts::value(print_additional), "<output_format>") | |||
("P,pidfile", "When run as a daemon, write pid to specified file", cxxopts::value(pidfilename)->default_value("/var/run/falco.pid"), "<pid_file>") | |||
("r", "Rules file/directory (defaults to value set in configuration file, or /etc/falco_rules.yaml). This option can be passed multiple times to read from multiple files/directories.", cxxopts::value<std::vector<std::string>>(), "<rules_file>") | |||
("s", "If specified, append statistics related to Falco's reading/processing of events to this file (only useful in live mode).", cxxopts::value(stats_output_file), "<stats_file>") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to remove also stats_output_file
and stats_interval
variables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Also rebased since we adjusted the build setup a bit.
…ics configs in falco.yaml Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
Co-authored-by: Andrea Terzolo <andreaterzolo3@gmail.com> Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
d683bfa
to
5761c58
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
Thanks
LGTM label has been added. Git tree hash: 98c70c66d4c2b0a9c065f10703b08f56f5d4767b
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
Per #2739 (comment), do we need an engine bump? |
/hold |
uhm the message was printed because this PR touches a file under |
@@ -435,7 +435,6 @@ static falco::app::run_result init_stats_writer( | |||
falco_logger::log(LOG_WARNING, "Metrics are enabled with no output configured, no snapshot will be collected"); | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I cannot comment on the right line but above (https://github.com/falcosecurity/falco/pull/2739/files#diff-3a3a5ebb7d4bf516a4c732cadcd83feabe05a5cc76a9ca9e1f55802a94b3c4a7R428), there is a check on the prometheus stats format that say
falco_logger::log(LOG_WARNING, "Metrics interval was passed as numeric value without Prometheus time unit, this option will be deprecated in the future");
Probably we want to turn it into an falco::app::run_result::fatal
, WDYT?
It could be a future cleanup if we want merge this :)
@@ -435,7 +435,6 @@ static falco::app::run_result init_stats_writer( | |||
falco_logger::log(LOG_WARNING, "Metrics are enabled with no output configured, no snapshot will be collected"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moreover, this is a misconfiguration of the tool an IMO we should fail, WDYT?
Not related to this PR but just a consideration
Correct, it was a false positive. We can merge this without bumping the engine version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/hold cancel
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Andreagit97, FedeDP, incertum, leogr 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 |
What type of PR is this?
/kind cleanup
Any specific area of the project related to this PR?
/area engine
What this PR does / why we need it:
As scheduled deprecate stats command args option in favor of metrics configs in falco.yaml for Falco 0.36 release.
@jasondellaluce
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: