Closed mrgian closed 3 months ago
LGTM label has been added.
/milestone 0.39.0
@incertum don't we need to implement this for falco_metrics too? (ie: prometheus)? /hold
@mrgian
/milestone 0.38.1
@incertum don't we need to implement this for falco_metrics too? (ie: prometheus)? /hold
@mrgian
Good call @FedeDP -- overlooked that, yes @mrgian could you add the changes to the webserver as well?
@incertum don't we need to implement this for falco_metrics too? (ie: prometheus)? /hold
@mrgian
Good call @FedeDP -- overlooked that, yes @mrgian could you add the changes to the webserver as well?
It shouldn't be needed since libs_metrics_collector
is already initialized with the METRICS_V2_PLUGINS
flag.
https://github.com/falcosecurity/falco/blob/master/userspace/falco/falco_metrics.cpp#L64
~But seems like plugin-provided metrics cause a segfault when a request is made to the webserver.
The issue may lie in prometheus_metrics_converter::convert_metric_to_text_prometheus
in the libs, however I'm still searching for the root cause of this.~
@FedeDP @incertum
False alarm on the segfault! I was using an old plugin as test 🤦
As for enabling plugin metrics in the webserver, we don't need to do that since since libs_metrics_collector
is already initialized with the METRICS_V2_PLUGINS
flag.
We can think of changing the namespace for plugin-provided metrics to something like plugin
or falco_plugin
in:
https://github.com/falcosecurity/falco/blob/master/userspace/falco/falco_metrics.cpp#L227
WDYT?
False alarm on the segfault! I was using an old plugin as test 🤦
As for enabling plugin metrics in the webserver, we don't need to do that since since
libs_metrics_collector
is already initialized with theMETRICS_V2_PLUGINS
flag.We can think of changing the namespace for plugin-provided metrics to something like
plugin
orfalco_plugin
in: https://github.com/falcosecurity/falco/blob/master/userspace/falco/falco_metrics.cpp#L227WDYT?
This is a very good idea, big +1:
falcosecurity_plugins_METRIC_NAME_...
plugins.METRIC_NAME
Left a small question: everything else sgtm! Thanks both Melissa and Gian for this!
Otherwise, SGTM too!
LGTM label has been added.
@FedeDP CI is still not cooperating.
Oh of course, we need to bump libs to master too! I will open the bump PR so that @mrgian can then rebase this one and we are good to go!
@mrgian can you rebase on master to fix the CI?
@FedeDP Rebased :)
LGTM label has been added.
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: FedeDP, incertum, mrgian
The full list of commands accepted by this bot can be found here.
The pull request process is described here
Btw @mrgian we need to update the website now ... https://falco.org/docs/metrics/falco-metrics/#plugins-metrics CC @LucaGuerra it's gonna be interesting to explain that the plugins metrics are custom (no default ones) vs we don't truly support the other metrics for plugins atm 🙃 because of some regressions ...
@incertum I'm currently working on the website to document the latest plugin API features. I'll update the page about Falco metrics too :)
/unhold
What type of PR is this?
/kind feature
Any specific area of the project related to this PR?
What this PR does / why we need it:
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: