diff --git a/userspace/engine/formats.cpp b/userspace/engine/formats.cpp index 09884bc4..117d3d9e 100644 --- a/userspace/engine/formats.cpp +++ b/userspace/engine/formats.cpp @@ -34,7 +34,8 @@ falco_formats::~falco_formats() } string falco_formats::format_event(gen_event *evt, const std::string &rule, const std::string &source, - const std::string &level, const std::string &format, std::set &tags) + const std::string &level, const std::string &format, std::set &tags, + const std::string &hostname) { string line; @@ -83,6 +84,7 @@ string falco_formats::format_event(gen_event *evt, const std::string &rule, cons event["rule"] = rule; event["priority"] = level; event["source"] = source; + event["hostname"] = hostname; if(m_json_include_output_property) { diff --git a/userspace/engine/formats.h b/userspace/engine/formats.h index 2ed73334..d1d98100 100644 --- a/userspace/engine/formats.h +++ b/userspace/engine/formats.h @@ -30,7 +30,8 @@ public: virtual ~falco_formats(); std::string format_event(gen_event *evt, const std::string &rule, const std::string &source, - const std::string &level, const std::string &format, std::set &tags); + const std::string &level, const std::string &format, std::set &tags, + const std::string &hostname); map get_field_values(gen_event *evt, const std::string &source, const std::string &format);