From: Juliana Fajardini Date: Mon, 24 Mar 2025 19:03:33 +0000 (-0700) Subject: exceptions: move app_layer stats to common counter X-Git-Tag: suricata-8.0.0-beta1~158 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6c484064d81a9a187b5f408b4a25461d0ad5b041;p=thirdparty%2Fsuricata.git exceptions: move app_layer stats to common counter Part of making the exception policy stats counters more search friendly. Task #7185 --- diff --git a/etc/schema.json b/etc/schema.json index 0bf065684d..b1736ce241 100644 --- a/etc/schema.json +++ b/etc/schema.json @@ -4677,11 +4677,6 @@ "error": { "type": "object", "properties": { - "exception_policy": { - "description": - "Consolidated stats on how many times app-layer error exception policy was applied, and which one", - "$ref": "#/$defs/exceptionPolicy" - }, "bittorrent-dht": { "description": "Errors encountered parsing BitTorrent DHT protocol", @@ -6158,6 +6153,19 @@ }, "additionalProperties": false }, + "exception_policy": { + "type": "object", + "properties": { + "app_layer": { + "type": "object", + "error": { + "description": + "Consolidated stats on how many times app-layer error exception policy was applied, and which one", + "$ref": "#/$defs/exceptionPolicy" + } + } + } + }, "file_store": { "type": "object", "properties": { diff --git a/src/app-layer.c b/src/app-layer.c index e653348730..d06983f7db 100644 --- a/src/app-layer.c +++ b/src/app-layer.c @@ -1213,7 +1213,7 @@ void AppLayerSetupCounters(void) /* We don't log stats counters if exception policy is `ignore`/`not set` */ if (g_applayerparser_error_policy != EXCEPTION_POLICY_NOT_SET) { /* Register global counters for app layer error exception policy summary */ - const char *eps_default_str = "app_layer.error.exception_policy."; + const char *eps_default_str = "exception_policy.app_layer.error."; for (enum ExceptionPolicy i = EXCEPTION_POLICY_NOT_SET + 1; i < EXCEPTION_POLICY_MAX; i++) { if (IsAppLayerErrorExceptionPolicyStatsValid(i)) { snprintf(app_layer_error_eps_stats.eps_name[i],