suricata
|
#include "suricata-common.h"
#include "detect.h"
#include "pkt-var.h"
#include "conf.h"
#include "detect-engine.h"
#include "threads.h"
#include "threadvars.h"
#include "tm-threads.h"
#include "util-print.h"
#include "util-time.h"
#include "util-unittest.h"
#include "util-validate.h"
#include "util-debug.h"
#include "output.h"
#include "util-privs.h"
#include "util-buffer.h"
#include "util-logopenfile.h"
#include "output-json.h"
#include "output-json-stats.h"
#include "tests/output-json-stats.c"
Go to the source code of this file.
Data Structures | |
struct | OutputStatsCtx_ |
struct | JsonStatsLogThread_ |
Macros | |
#define | MODULE_NAME "JsonStatsLog" |
Typedefs | |
typedef enum OutputEngineInfo_ | OutputEngineInfo |
typedef struct OutputStatsCtx_ | OutputStatsCtx |
typedef struct JsonStatsLogThread_ | JsonStatsLogThread |
Enumerations | |
enum | OutputEngineInfo_ { OUTPUT_ENGINE_LAST_RELOAD = 0, OUTPUT_ENGINE_RULESET, OUTPUT_ENGINE_ALL } |
Functions | |
TmEcode | OutputEngineStatsReloadTime (json_t **jdata) |
TmEcode | OutputEngineStatsRuleset (json_t **jdata) |
json_t * | StatsToJSON (const StatsTable *st, uint8_t flags) |
turn StatsTable into a json object More... | |
void | JsonStatsLogRegister (void) |
Variables | |
bool | stats_decoder_events |
const char * | stats_decoder_events_prefix |
Implements JSON stats counters logging portion of the engine.
Definition in file output-json-stats.c.
#define MODULE_NAME "JsonStatsLog" |
Definition at line 52 of file output-json-stats.c.
typedef struct JsonStatsLogThread_ JsonStatsLogThread |
typedef enum OutputEngineInfo_ OutputEngineInfo |
specify which engine info will be printed in stats log. ALL means both last reload and ruleset stats.
typedef struct OutputStatsCtx_ OutputStatsCtx |
enum OutputEngineInfo_ |
specify which engine info will be printed in stats log. ALL means both last reload and ruleset stats.
Enumerator | |
---|---|
OUTPUT_ENGINE_LAST_RELOAD | |
OUTPUT_ENGINE_RULESET | |
OUTPUT_ENGINE_ALL |
Definition at line 60 of file output-json-stats.c.
void JsonStatsLogRegister | ( | void | ) |
Definition at line 501 of file output-json-stats.c.
References LOGGER_JSON_STATS, MODULE_NAME, and OutputRegisterStatsSubModule().
TmEcode OutputEngineStatsReloadTime | ( | json_t ** | jdata | ) |
Definition at line 161 of file output-json-stats.c.
TmEcode OutputEngineStatsRuleset | ( | json_t ** | jdata | ) |
Definition at line 165 of file output-json-stats.c.
json_t* StatsToJSON | ( | const StatsTable * | st, |
uint8_t | flags | ||
) |
turn StatsTable into a json object
flags | JSON_STATS_* flags for controlling output |
Definition at line 211 of file output-json-stats.c.
References flags, JSON_STATS_NO_ZEROES, JSON_STATS_TOTALS, StatsRecord_::name, StatsTable_::nstats, StatsRecord_::short_name, StatsTable_::start_time, StatsTable_::stats, unlikely, and StatsRecord_::value.