mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-12 14:08:27 +00:00
Add falco engine info to --support output
In some cases, it might be useful to know what falco engine version a given falco binary supports. We already have a --support option that prints info about the system, config, rules files, etc. Add a engine_info object, with an engine_version property containing the falco engine version in falco_engine_version.h. In the output, it looks like this: ... "engine_info": { "engine_version": 8 }, ... Signed-off-by: Mark Stemm <mark.stemm@gmail.com>
This commit is contained in:
parent
c6aa255fc8
commit
a7e04fe6e6
@ -41,6 +41,7 @@ limitations under the License.
|
||||
#include "event_drops.h"
|
||||
#include "configuration.h"
|
||||
#include "falco_engine.h"
|
||||
#include "falco_engine_version.h"
|
||||
#include "config_falco.h"
|
||||
#include "statsfilewriter.h"
|
||||
#ifndef MINIMAL_BUILD
|
||||
@ -939,6 +940,7 @@ int falco_init(int argc, char **argv)
|
||||
support["system_info"]["version"] = sysinfo.version;
|
||||
support["system_info"]["machine"] = sysinfo.machine;
|
||||
support["cmdline"] = cmdline;
|
||||
support["engine_info"]["engine_version"] = FALCO_ENGINE_VERSION;
|
||||
support["config"] = read_file(conf_filename);
|
||||
support["rules_files"] = nlohmann::json::array();
|
||||
for(auto filename : config.m_rules_filenames)
|
||||
|
Loading…
Reference in New Issue
Block a user