falco: Output sometimes missing k8s pod/container information
Describe the bug
I’ve installed falco using Helm, to an EKS cluster running k8s 1.21 - Falco is installed to it’s own falco namespace.
The output is sometimes missing k8s and container information, for example this is one output:
{
"output": "20:55:40.524063855: Error Package management process launched in container (user=root user_loginuid=-1 command=gem /usr/local/bin/gem contents fluent-plugin-elasticsearch container_id=1c626dd1ab1b container_name=<NA> image=<NA>:<NA>) k8s.ns=<NA> k8s.pod=<NA> container=1c626dd1ab1b k8s.ns=<NA> k8s.pod=<NA> container=1c626dd1ab1b",
"priority": "Error",
"rule": "Launch Package Management Process in Container",
"time": "2021-09-09T20:55:40.524063855Z",
"output_fields": {
"container.id": "1c626dd1ab1b",
"container.image.repository": null,
"container.image.tag": null,
"container.name": null,
"evt.time": 1631220940524063855,
"k8s.ns.name": null,
"k8s.pod.name": null,
"proc.cmdline": "gem /usr/local/bin/gem contents fluent-plugin-elasticsearch",
"user.loginuid": -1,
"user.name": "root"
}
}
If I restart the falco pods, everything works again, and the above issue becomes
{
"output": "08:26:23.338086075: Error Package management process launched in container (user=root user_loginuid=-1 command=gem /usr/local/bin/gem contents fluent-plugin-elasticsearch container_id=2ded43ee4a42 container_name=k8s_fluentd_fluentd-56qhz_kube-system_ac262b2d-df79-4f8b-93e2-e1d9df697177_0 image=<redacted>.amazonaws.com/fluentd:latest) k8s.ns=kube-system k8s.pod=fluentd-56qhz container=2ded43ee4a42 k8s.ns=kube-system k8s.pod=fluentd-56qhz container=2ded43ee4a42",
"priority": "Error",
"rule": "Launch Package Management Process in Container",
"time": "2021-09-10T08:26:23.338086075Z",
"output_fields": {
"container.id": "2ded43ee4a42",
"container.image.repository": "<redacted>.amazonaws.com/fluentd",
"container.image.tag": "latest",
"container.name": "k8s_fluentd_fluentd-56qhz_kube-system_ac262b2d-df79-4f8b-93e2-e1d9df697177_0",
"evt.time": 1631262383338086075,
"k8s.ns.name": "kube-system",
"k8s.pod.name": "fluentd-56qhz",
"proc.cmdline": "gem /usr/local/bin/gem contents fluent-plugin-elasticsearch",
"user.loginuid": -1,
"user.name": "root"
}
}
There are currently 2 nodes in the cluster, and if I observe the output for both falco pods, I can’t see a pattern for this behaviour, such as one pod always showing no output - it’s seemingly random
How to reproduce it
- Install falco to EKS cluster using helm:
h -n falco install falco falcosecurity/falco --set falco.jsonOutput=true,falco.jsonIncludeOutputProperty=true
Expected behaviour
See all container/pod information in ever output
Screenshots
Environment
- Falco version:
0.29.1
- System info:
{
"machine": "x86_64",
"nodename": "falco-27cs6",
"release": "5.4.129-63.229.amzn2.x86_64",
"sysname": "Linux",
"version": "#1 SMP Tue Jul 20 21:22:08 UTC 2021"
}
(This was run from execing into a running falco container)
- Cloud provider or hardware configuration: AWS EKS
- OS:
- Kernel:
- Installation method: Kubernetes (helm)
Additional context
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 18 (6 by maintainers)
Have the same issue with Falco 0.30 installed via Helm 1.16.0. EKS 1.21 with Bottlerocket 1.1.4.
K8S information is always missing.
A complete log: