mirror of
https://github.com/falcosecurity/falco.git
synced 2025-08-29 03:11:02 +00:00
update(metrics): always refresh ifinfo
Because libs constantly refreshes them, it's fine to re-create the JSON each time Signed-off-by: Melissa Kilby <melissa.kilby.oss@gmail.com>
This commit is contained in:
parent
1caece2cf9
commit
f8398213ba
@ -358,8 +358,6 @@ void stats_writer::collector::get_metrics_output_fields_wrapper(
|
|||||||
output_fields[metric_name_file_sha256] = item.second;
|
output_fields[metric_name_file_sha256] = item.second;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stats_snapshot_time_delta_sec == 0)
|
|
||||||
{
|
|
||||||
auto ipv4list = inspector->get_ifaddr_list().get_ipv4_list();
|
auto ipv4list = inspector->get_ifaddr_list().get_ipv4_list();
|
||||||
auto ipv6list = inspector->get_ifaddr_list().get_ipv6_list();
|
auto ipv6list = inspector->get_ifaddr_list().get_ipv6_list();
|
||||||
nlohmann::json ipv4_json;
|
nlohmann::json ipv4_json;
|
||||||
@ -391,7 +389,6 @@ void stats_writer::collector::get_metrics_output_fields_wrapper(
|
|||||||
ifinfo_json["ipv4"] = ipv4_json;
|
ifinfo_json["ipv4"] = ipv4_json;
|
||||||
ifinfo_json["ipv6"] = ipv6_json;
|
ifinfo_json["ipv6"] = ipv6_json;
|
||||||
m_ifinfo_json_escaped = ifinfo_json.dump();
|
m_ifinfo_json_escaped = ifinfo_json.dump();
|
||||||
}
|
|
||||||
output_fields["falco.host_ifinfo_json"] = m_ifinfo_json_escaped;
|
output_fields["falco.host_ifinfo_json"] = m_ifinfo_json_escaped;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user