Commit Graph

4513 Commits

Author SHA1 Message Date
Jason Dellaluce
f18ea1e8b7 update(userspace/engine): support tranformers in exception fields
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
2024-05-08 20:23:55 +02:00
Jason Dellaluce
fa8e780b07 update(userspace/engine): propagate compiler warnings
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
2024-05-08 20:23:55 +02:00
Jason Dellaluce
bc078f1f63 update(userspace/engine): support comparins with right-hand fields
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
2024-05-08 20:23:55 +02:00
Jason Dellaluce
ed22e94292 refactor(userspace/libsinsp): support new filter ast structure in falco engine
Signed-off-by: Jason Dellaluce <jasondellaluce@gmail.com>
2024-05-08 20:23:55 +02:00
Federico Aponte
62d1c4fc4d refactor: smart pointer usage
Signed-off-by: Federico Aponte <federico.aponte@sysdig.com>
2024-05-06 11:10:44 +02:00
dependabot[bot]
96c47e5eeb build(deps): Bump submodules/falcosecurity-rules
Bumps [submodules/falcosecurity-rules](https://github.com/falcosecurity/rules) from `ec255e6` to `4f153f5`.
- [Release notes](https://github.com/falcosecurity/rules/releases)
- [Commits](ec255e68f4...4f153f53ae)

---
updated-dependencies:
- dependency-name: submodules/falcosecurity-rules
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-06 10:33:44 +02:00
Federico Di Pierro
ec0f8077e1 update(cmake): bump libs and driver to latest master.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-05-03 12:12:02 +02:00
Andrea Terzolo
0999d45fbf bump ro rc4
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
2024-05-03 12:12:02 +02:00
Federico Di Pierro
20c394ba34 chore(cmake): bumped libs to 0.16.0-rc2.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-05-03 12:12:02 +02:00
Andrea Terzolo
e2c2b50b3b chore: disable TLS sanitizer
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
2024-05-03 12:12:02 +02:00
Andrea Terzolo
db1be96ad9 chore: tmp bump to libs master to test Falco CI
Signed-off-by: Andrea Terzolo <andreaterzolo3@gmail.com>
2024-05-03 12:12:02 +02:00
Federico Di Pierro
6954a4028e chore(userspace/engine): bump version and checksum.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-05-03 12:12:02 +02:00
Federico Di Pierro
937637f668 update(cmake): bumped falcoctl to v0.8.0-rc2.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-05-03 12:12:02 +02:00
Federico Di Pierro
8b477bdc00 update(cmake): bumped libs and driver to latest RCs.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-05-03 12:12:02 +02:00
Samuel Gaist
cbfe77d1a0 fix(falco_metrics): remove falco_ prefix for version
The textual content was fixed but not the metrics name.

Co-authored-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Samuel Gaist
66d1970952 fix(falco_metrics): make duration_sec and outputs_queue_num_drops monotonic
Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Samuel Gaist
1316b0f448 chore(configuration): add reference to Prometheus endpoint in metrics documentation
The cross reference makes it easier to pair the web server and the
metrics configuration elements.

Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Samuel Gaist
82c914c11d fix(falco_metrics): make duration_sec a count and not a timestamp
The output will thus be a total which is what this metrics is.

Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Samuel Gaist
2ae6103ab6 fix(falco_metrics): remove redundant falco in version metrics
Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Samuel Gaist
65331c0f20 feat(falco_metrics): add event sources
Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Samuel Gaist
1ba35c911a feat(falco_metrics): add duration_sec
Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Samuel Gaist
5ef8f1c311 feat(falco_metrics): add outputs_queue_num_drops
Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Samuel Gaist
f90dbf9b77 refactor(metrics): use prometheus_metrics_enabled for configuration
As agreed upon during review, use this name to get started. If more
backends were to be added, the configuration structure will be updated.

Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Samuel Gaist
5c237a07dc refactor(metrics): make to_text get the application state
As falco may update its state at any time and thus its inspectors objects,
keeping pointers to them may end up in using dangling values.

Therefore, use the state of the application when requesting metrics.

Optimizations such as caching of mostly static values will be done in
a follow up patch.

Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Samuel Gaist
a0c109fcff refactor(falco_metrics): put content type in documented constant
This will keep things clearer and also allow for easir update in
the future.

Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Samuel Gaist
9cc44c0eb7 doc(falco_metrics): add basic documentation
Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Samuel Gaist
de7a70ea54 fix(metrics): correct hostname metrics name and namespace
Co-authored-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Samuel Gaist
53722a26bf fix(metrics): correct static metrics
Things to fix:
- type
- name
- unit

Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Samuel Gaist
59c290dc80 fix(metrics): correct metrics namespace
Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Samuel Gaist
daf7efde67 refactor(metrics): move metrics handling to its own class
This will keep the details out of the webserver itself and make
it easier to manage metrics.

Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Samuel Gaist
e50d647dc9 refactor(configuration): move webserver items in own struct
This makes things easier to pass around like when starting the
web server.

This has the added benefit of simplifying further extension such as
making the metrics endpoint name configurable without adding yet another
parameter to the start function.

Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Samuel Gaist
968a403cba refactor(webserver): move metrics endpoint activation under webserver
Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Samuel Gaist
cd073a033a fix(webserver): use falcosecurity as metric namespace
Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Samuel Gaist
4819877b9f fix(webserver): remove extra line return
The converter already provides properly formatted text.

Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Samuel Gaist
3a251beea7 fix(webserver): correct enabled check
It was checking twice for prometheus configuration rather than metrics and then prometheus.

Co-authored-by: Federico Di Pierro <nierro92@gmail.com>
Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Samuel Gaist
8f1b2dc909 feat(webserver): implement metrics endpoint
This endpoint currently returns only prometheus metrics.

Signed-off-by: Samuel Gaist <samuel.gaist@idiap.ch>
2024-05-03 11:23:02 +02:00
Federico Di Pierro
61dab93eb3 chore(ci): fixed BUILD_FALCO_MODERN_BPF usages.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-04-24 16:49:26 +02:00
Federico Di Pierro
cc09811303 chore(cmake): enable modern bpf build by default.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-04-24 16:49:26 +02:00
Luca Guerra
d0945e5db5 cleanup(docs): fix typo in license blocks
Signed-off-by: Luca Guerra <luca@guerra.sh>
2024-04-19 16:52:58 +02:00
Federico Di Pierro
bdcfbba90b chore(docker,scripts): set old eBPF probe as lowest priority driver.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-04-18 11:18:54 +02:00
dependabot[bot]
b239246ff8 build(deps): Bump submodules/falcosecurity-rules
Bumps [submodules/falcosecurity-rules](https://github.com/falcosecurity/rules) from `869c9a7` to `ec255e6`.
- [Release notes](https://github.com/falcosecurity/rules/releases)
- [Commits](869c9a7f4d...ec255e68f4)

---
updated-dependencies:
- dependency-name: submodules/falcosecurity-rules
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-18 09:44:54 +02:00
Luca Guerra
814c510d7e update(app): close inspectors at teardown time
Signed-off-by: Luca Guerra <luca@guerra.sh>
2024-04-17 18:39:54 +02:00
Gianmatteo Palmieri
eb04b1c66f fix(test): expect warning instead of error on invalid macro/list name
Signed-off-by: Gianmatteo Palmieri <mail@gian.im>
2024-04-17 11:27:52 +02:00
Gianmatteo Palmieri
dd59c48034 new(engine): raise warning instead of error on invalid macro/list name
Signed-off-by: Gianmatteo Palmieri <mail@gian.im>
2024-04-17 11:27:52 +02:00
Federico Di Pierro
e21a3a5e58 chore(userspace/falco): make it clear singular vs plural.
Co-authored-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-04-16 16:39:47 +02:00
Federico Di Pierro
92c1b24905 chore(falco.yaml): small improvements.
Co-authored-by: Leonardo Grasso <me@leonardograsso.com>
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-04-16 16:39:47 +02:00
Federico Di Pierro
a2a8c6c3d4 chore(userspace/falco): deprecate old 'rules_file' config key.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-04-16 16:39:47 +02:00
Federico Di Pierro
80a99b672f fix(docker): default to auto for driver to be configured.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-04-16 14:44:46 +02:00
Federico Di Pierro
fc7a451aed fix(docker): fixed docker entrypoints for driver loading.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-04-16 14:44:46 +02:00
Federico Di Pierro
ac61543276 fix(docker,scripts): do not load falcoctl driver loader when installing Falco deb package in docker image.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
2024-04-15 17:22:44 +02:00