Skip to content

Commit

Permalink
update(userspace/falco): handle the case there wasn't been any previo…
Browse files Browse the repository at this point in the history
…usly processed event

Signed-off-by: Leonardo Di Donato <[email protected]>
  • Loading branch information
leodido authored and poiana committed Apr 19, 2021
1 parent 0df18fd commit 600501e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions userspace/falco/falco.cpp
Original file line number Diff line number Diff line change
@@ -309,8 +309,11 @@ uint64_t do_inspect(falco_engine *engine,
{
std::string rule = "Falco internal: timeouts notification";
std::string msg = rule + ". " + std::to_string(config.m_syscall_evt_timeout_max_consecutives) + " consecutive timeouts without event.";
std::string last_event_time_str;
sinsp_utils::ts_to_string(duration_start, &last_event_time_str, false, true);
std::string last_event_time_str = "none";
if(duration_start > 0)
{
sinsp_utils::ts_to_string(duration_start, &last_event_time_str, false, true);
}
std::map<std::string, std::string> o = {
{"last_event_time", last_event_time_str},
};

0 comments on commit 600501e

Please sign in to comment.