From 7ddd938a488270a7c683d078af1d46cd75b6652a Mon Sep 17 00:00:00 2001 From: Luca Guerra Date: Fri, 11 Nov 2022 16:55:08 +0000 Subject: [PATCH 1/2] update(falco): add container-gvisor and kubernetes-gvisor print options Signed-off-by: Luca Guerra --- userspace/falco/app_actions/init_falco_engine.cpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/userspace/falco/app_actions/init_falco_engine.cpp b/userspace/falco/app_actions/init_falco_engine.cpp index 3eebe79d6b5..c15810a7c64 100644 --- a/userspace/falco/app_actions/init_falco_engine.cpp +++ b/userspace/falco/app_actions/init_falco_engine.cpp @@ -29,11 +29,21 @@ void application::configure_output_format() output_format = "container=%container.name (id=%container.id)"; replace_container_info = true; } + else if(m_options.print_additional == "container-gvisor") + { + output_format = "container=%container.name (id=%container.id) vpid=%proc.vpid vtid=%thread.vtid"; + replace_container_info = true; + } else if(m_options.print_additional == "k" || m_options.print_additional == "kubernetes") { output_format = "k8s.ns=%k8s.ns.name k8s.pod=%k8s.pod.name container=%container.id"; replace_container_info = true; } + else if(m_options.print_additional == "kubernetes-gvisor") + { + output_format = "k8s.ns=%k8s.ns.name k8s.pod=%k8s.pod.name container=%container.id vpid=%proc.vpid vtid=%thread.vtid"; + replace_container_info = true; + } else if(m_options.print_additional == "m" || m_options.print_additional == "mesos") { output_format = "task=%mesos.task.name container=%container.id"; @@ -44,11 +54,6 @@ void application::configure_output_format() output_format = m_options.print_additional; replace_container_info = false; } - else if(m_options.gvisor_config != "") - { - output_format = "container=%container.name (id=%container.id) vpid=%proc.vpid vtid=%thread.vtid"; - replace_container_info = true; - } if(!output_format.empty()) { From 5949cd914fbe1c8a3b289d4fd62425c20a4dcbe7 Mon Sep 17 00:00:00 2001 From: Luca Guerra Date: Tue, 22 Nov 2022 14:59:20 +0000 Subject: [PATCH 2/2] update(cli): also add cg / kg container-gvisor / kubernetes-gvisor Signed-off-by: Luca Guerra --- userspace/falco/app_actions/init_falco_engine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/userspace/falco/app_actions/init_falco_engine.cpp b/userspace/falco/app_actions/init_falco_engine.cpp index c15810a7c64..8b1b8c81008 100644 --- a/userspace/falco/app_actions/init_falco_engine.cpp +++ b/userspace/falco/app_actions/init_falco_engine.cpp @@ -29,7 +29,7 @@ void application::configure_output_format() output_format = "container=%container.name (id=%container.id)"; replace_container_info = true; } - else if(m_options.print_additional == "container-gvisor") + else if(m_options.print_additional == "cg" || m_options.print_additional == "container-gvisor") { output_format = "container=%container.name (id=%container.id) vpid=%proc.vpid vtid=%thread.vtid"; replace_container_info = true; @@ -39,7 +39,7 @@ void application::configure_output_format() output_format = "k8s.ns=%k8s.ns.name k8s.pod=%k8s.pod.name container=%container.id"; replace_container_info = true; } - else if(m_options.print_additional == "kubernetes-gvisor") + else if(m_options.print_additional == "kg" || m_options.print_additional == "kubernetes-gvisor") { output_format = "k8s.ns=%k8s.ns.name k8s.pod=%k8s.pod.name container=%container.id vpid=%proc.vpid vtid=%thread.vtid"; replace_container_info = true;