Closed sboschman closed 5 months ago
I confirm the situation:
Each call to the /metrics endpoint crashes the falco container in the pod.
Have you tried with a plugin and a driver? :thinking:
I want to restrict the possible root cause to the plugin only.
Also cc @incertum @sgaist
Opened the PR with the fix :point_up:
@sboschman thanks a bunch for testing it so promptly. We still have no good metrics support when running Falco with a plugin only. We should perhaps add a note to the website about that as well. For example CPU usage calculation still won't work for plugin only given a regression here: https://github.com/falcosecurity/falco/issues/2821
Also the Falco number of events won't be available atm in Prometheus as it would have required a major refactor and we ran out of time. Please follow this issue for things we spotted that we still need to address: https://github.com/falcosecurity/falco/issues/3194
I see @incertum , didn't realise running with plugin only has limited prometheus metrics support atm. Was indeed looking for cpu + memory metrics, and Rules Counters Fields (hoping to do something with total events processed and total rules matched, as to determine how much unnecessary events we sent to falco or missing rules we have)
I know yes it's annoying, we will work on that for Falco 0.39.0 plus we will offer custom plugin metrics system where you can emit custom plugin metrics when you write your own plugin. I'll CC you on that other issue so you stay in the loop.
on a side note @incertum , I also noticed that it is mandatory to enable the output rule (or output file I suppose) when using prometheus metrics output, which is not mentioned in the docs as requirement.
This config
output_rule: false
results in falco failing to start with:
Error: Metrics are enabled with no output configured. Please enable at least one output channel
Is this already a known limitation or do you want me to open a separate issue for it?
on a side note @incertum , I also noticed that it is mandatory to enable the output rule (or output file I suppose) when using prometheus metrics output, which is not mentioned in the docs as requirement.
This config
output_rule: false
results in falco failing to start with:
Error: Metrics are enabled with no output configured. Please enable at least one output channel
Is this already a known limitation or do you want me to open a separate issue for it?
uhhh no we messed up for sure on that. It should also work with you have prometheus enabled and no other output. Adding this on the list for fixes. @FedeDP and @sgaist we could address that in the next patch release.
Thanks a bunch for your help Sverre on spotting these things!
/milestone 0.38.1
Describe the bug
Followed the prometheus support section in the docs to enable the /metrics endpoint. A soon as you make a request to this endpoint the falco process crashes without any indication on stdout/stderr what went wrong.
How to reproduce it
Enabled debug logging as well:
This doesn't give any output when requesting the /metrics endpoint. So, it is not helping narrowing down what it happening just before it crashes.
This is what happens with a port forward to the falco pod:
After the
/metrics
request has been done, Kubernetes shows pod termination:Expected behaviour
Expected to see some metrics, or at least not to crash the entire falco process.
Screenshots
Environment
Additional context
This is a dedicated github plugin instance of falco (running as a k8s pod), i.e. not using syscall at all (
--disable-source syscall
).No clue if this has anything to do with the crash though.