diff --git a/apps/rabbitmq.go b/apps/rabbitmq.go index 9f5270ec6e..c21e03695b 100644 --- a/apps/rabbitmq.go +++ b/apps/rabbitmq.go @@ -18,45 +18,62 @@ import ( "context" "github.com/GoogleCloudPlatform/ops-agent/confgenerator" - "github.com/GoogleCloudPlatform/ops-agent/confgenerator/fluentbit" "github.com/GoogleCloudPlatform/ops-agent/confgenerator/otel" "github.com/GoogleCloudPlatform/ops-agent/internal/secret" ) -type LoggingProcessorRabbitmq struct { - confgenerator.ConfigComponent `yaml:",inline"` -} +type LoggingProcessorMacroRabbitmq struct{} -func (*LoggingProcessorRabbitmq) Type() string { +func (LoggingProcessorMacroRabbitmq) Type() string { return "rabbitmq" } -func (p *LoggingProcessorRabbitmq) Components(ctx context.Context, tag, uid string) []fluentbit.Component { - c := confgenerator.LoggingProcessorParseRegexComplex{ - Parsers: []confgenerator.RegexParser{ - { - // Sample log line: - // 2022-01-31 18:01:20.441571+00:00 [erro] <0.692.0> ** Connection attempt from node 'rabbit_ctl_17@keith-testing-rabbitmq' rejected. Invalid challenge reply. ** - Regex: `^(?\d+-\d+-\d+\s+\d+:\d+:\d+[.,]\d+\+\d+:\d+) \[(?\w+)\] \<(?\d+\.\d+\.\d+)\> (?.*)$`, - Parser: confgenerator.ParserShared{ - TimeKey: "timestamp", - TimeFormat: "%Y-%m-%d %H:%M:%S.%L%z", +func (p LoggingProcessorMacroRabbitmq) Expand(ctx context.Context) []confgenerator.InternalLoggingProcessor { + return []confgenerator.InternalLoggingProcessor{ + confgenerator.LoggingProcessorParseMultilineRegex{ + LoggingProcessorParseRegexComplex: confgenerator.LoggingProcessorParseRegexComplex{ + Parsers: []confgenerator.RegexParser{ + { + // Sample log line: + // 2022-01-31 18:01:20.441571+00:00 [erro] <0.692.0> ** Connection attempt from node 'rabbit_ctl_17@keith-testing-rabbitmq' rejected. Invalid challenge reply. ** + Regex: `^(?\d+-\d+-\d+\s+\d+:\d+:\d+[.,]\d+\+\d+:\d+) \[(?\w+)\] \<(?\d+\.\d+\.\d+)\> (?.*)$`, + Parser: confgenerator.ParserShared{ + TimeKey: "timestamp", + TimeFormat: "%Y-%m-%d %H:%M:%S.%L%z", + }, + }, + { + // Sample log line: + // 2023-02-01 12:45:14.705 [info] <0.801.0> Successfully set user tags for user 'admin' to [administrator] + Regex: `^(?\d+-\d+-\d+\s+\d+:\d+:\d+[.,]\d+\d+\d+) \[(?\w+)\] \<(?\d+\.\d+\.\d+)\> (?.*)$`, + Parser: confgenerator.ParserShared{ + TimeKey: "timestamp", + TimeFormat: "%Y-%m-%d %H:%M:%S.%L", + }, + }, }, }, - { - // Sample log line: - // 2023-02-01 12:45:14.705 [info] <0.801.0> Successfully set user tags for user 'admin' to [administrator] - Regex: `^(?\d+-\d+-\d+\s+\d+:\d+:\d+[.,]\d+\d+\d+) \[(?\w+)\] \<(?\d+\.\d+\.\d+)\> (?.*)$`, - Parser: confgenerator.ParserShared{ - TimeKey: "timestamp", - TimeFormat: "%Y-%m-%d %H:%M:%S.%L", + // Some multiline entries related to crash logs are important to capture and end in + // + // 2022-01-31 18:07:43.557042+00:00 [erro] <0.130.0> + // BOOT FAILED + // =========== + // ERROR: could not bind to distribution port 25672, it is in use by another node: rabbit@keith-testing-rabbitmq + // + Rules: []confgenerator.MultilineRule{ + { + StateName: "start_state", + NextState: "cont", + Regex: `^\d+-\d+-\d+ \d+:\d+:\d+\.\d+\+\d+:\d+`, + }, + { + StateName: "cont", + NextState: "cont", + Regex: `^(?!\d+-\d+-\d+ \d+:\d+:\d+\.\d+\+\d+:\d+)`, }, }, }, - }.Components(ctx, tag, uid) - - // severities documented here: https://www.rabbitmq.com/logging.html#log-levels - c = append(c, + // severities documented here: https://www.rabbitmq.com/logging.html#log-levels confgenerator.LoggingProcessorModifyFields{ Fields: map[string]*confgenerator.ModifyField{ "severity": { @@ -72,49 +89,21 @@ func (p *LoggingProcessorRabbitmq) Components(ctx context.Context, tag, uid stri }, InstrumentationSourceLabel: instrumentationSourceValue(p.Type()), }, - }.Components(ctx, tag, uid)..., - ) - - return c -} - -type LoggingReceiverRabbitmq struct { - LoggingProcessorRabbitmq `yaml:",inline"` - ReceiverMixin confgenerator.LoggingReceiverFilesMixin `yaml:",inline" validate:"structonly"` + }, + } } -func (r LoggingReceiverRabbitmq) Components(ctx context.Context, tag string) []fluentbit.Component { - if len(r.ReceiverMixin.IncludePaths) == 0 { - r.ReceiverMixin.IncludePaths = []string{ +func loggingReceiverFilesMixinRabbitmq() confgenerator.LoggingReceiverFilesMixin { + return confgenerator.LoggingReceiverFilesMixin{ + IncludePaths: []string{ "/var/log/rabbitmq/rabbit*.log", - } - } - // Some multiline entries related to crash logs are important to capture and end in - // - // 2022-01-31 18:07:43.557042+00:00 [erro] <0.130.0> - // BOOT FAILED - // =========== - // ERROR: could not bind to distribution port 25672, it is in use by another node: rabbit@keith-testing-rabbitmq - // - r.ReceiverMixin.MultilineRules = []confgenerator.MultilineRule{ - { - StateName: "start_state", - NextState: "cont", - Regex: `^\d+-\d+-\d+ \d+:\d+:\d+\.\d+\+\d+:\d+`, - }, - { - StateName: "cont", - NextState: "cont", - Regex: `^(?!\d+-\d+-\d+ \d+:\d+:\d+\.\d+\+\d+:\d+)`, }, } - c := r.ReceiverMixin.Components(ctx, tag) - c = append(c, r.LoggingProcessorRabbitmq.Components(ctx, tag, "rabbitmq")...) - return c + } func init() { - confgenerator.LoggingReceiverTypes.RegisterType(func() confgenerator.LoggingReceiver { return &LoggingReceiverRabbitmq{} }) + confgenerator.RegisterLoggingFilesProcessorMacro[LoggingProcessorMacroRabbitmq](loggingReceiverFilesMixinRabbitmq) } type MetricsReceiverRabbitmq struct { diff --git a/confgenerator/testdata/feature/golden.csv b/confgenerator/testdata/feature/golden.csv index 58c669a62f..51ed2d9d27 100644 --- a/confgenerator/testdata/feature/golden.csv +++ b/confgenerator/testdata/feature/golden.csv @@ -42,10 +42,6 @@ App,Field,Override, *apps.LoggingReceiverOracleDBAudit,confgenerator.LoggingReceiverFilesMixin.BufferInMemory, *apps.LoggingReceiverOracleDBAudit,confgenerator.LoggingReceiverFilesMixin.RecordLogFilePath, *apps.LoggingReceiverOracleDBAudit,confgenerator.LoggingReceiverFilesMixin.WildcardRefreshInterval, -*apps.LoggingReceiverRabbitmq,apps.LoggingProcessorRabbitmq.confgenerator.ConfigComponent.Type, -*apps.LoggingReceiverRabbitmq,confgenerator.LoggingReceiverFilesMixin.BufferInMemory, -*apps.LoggingReceiverRabbitmq,confgenerator.LoggingReceiverFilesMixin.RecordLogFilePath, -*apps.LoggingReceiverRabbitmq,confgenerator.LoggingReceiverFilesMixin.WildcardRefreshInterval, *apps.LoggingReceiverSapHanaTrace,apps.LoggingProcessorSapHanaTrace.confgenerator.ConfigComponent.Type, *apps.LoggingReceiverSapHanaTrace,confgenerator.LoggingReceiverFilesMixin.BufferInMemory, *apps.LoggingReceiverSapHanaTrace,confgenerator.LoggingReceiverFilesMixin.RecordLogFilePath, @@ -178,6 +174,7 @@ App,Field,Override, *confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroNginxAccess],confgenerator.ConfigComponent.Type, *confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroNginxError],confgenerator.ConfigComponent.Type, *confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroPostgresql],confgenerator.ConfigComponent.Type, +*confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroRabbitmq],confgenerator.ConfigComponent.Type, *confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroRedis],confgenerator.ConfigComponent.Type, *confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroSolrSystem],apps.LoggingProcessorMacroSolrSystem.confgenerator.ConfigComponent.Type, *confgenerator.loggingProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroSolrSystem],confgenerator.ConfigComponent.Type, @@ -218,6 +215,8 @@ App,Field,Override, *confgenerator.loggingReceiverMacroAdapter[*github.com/GoogleCloudPlatform/ops-agent/confgenerator.loggingFilesProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroNginxError]],confgenerator.ConfigComponent.Type, *confgenerator.loggingReceiverMacroAdapter[*github.com/GoogleCloudPlatform/ops-agent/confgenerator.loggingFilesProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroPostgresql]],ReceiverMacro, *confgenerator.loggingReceiverMacroAdapter[*github.com/GoogleCloudPlatform/ops-agent/confgenerator.loggingFilesProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroPostgresql]],confgenerator.ConfigComponent.Type, +*confgenerator.loggingReceiverMacroAdapter[*github.com/GoogleCloudPlatform/ops-agent/confgenerator.loggingFilesProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroRabbitmq]],ReceiverMacro, +*confgenerator.loggingReceiverMacroAdapter[*github.com/GoogleCloudPlatform/ops-agent/confgenerator.loggingFilesProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroRabbitmq]],confgenerator.ConfigComponent.Type, *confgenerator.loggingReceiverMacroAdapter[*github.com/GoogleCloudPlatform/ops-agent/confgenerator.loggingFilesProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroRedis]],ReceiverMacro, *confgenerator.loggingReceiverMacroAdapter[*github.com/GoogleCloudPlatform/ops-agent/confgenerator.loggingFilesProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroRedis]],confgenerator.ConfigComponent.Type, *confgenerator.loggingReceiverMacroAdapter[*github.com/GoogleCloudPlatform/ops-agent/confgenerator.loggingFilesProcessorMacroAdapter[github.com/GoogleCloudPlatform/ops-agent/apps.LoggingProcessorMacroSolrSystem]],ReceiverMacro, diff --git a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux-gpu/error index eba9a1685b..9fa315a8aa 100644 --- a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux-gpu/error @@ -1 +1 @@ -logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file +logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux/error index eba9a1685b..9fa315a8aa 100644 --- a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/linux/error @@ -1 +1 @@ -logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file +logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows-2012/error index 1bfa571784..3c370321e7 100644 --- a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows-2012/error @@ -1 +1 @@ -logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file +logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows/error index 1bfa571784..3c370321e7 100644 --- a/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-otel-unsupported_processor/golden/windows/error @@ -1 +1 @@ -logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file +logging processor with type "unsupported" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux-gpu/error b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux-gpu/error index f04272eb35..7e31a8e3b8 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux-gpu/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux-gpu/error @@ -1 +1 @@ -logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file +logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux/error b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux/error index f04272eb35..7e31a8e3b8 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/linux/error @@ -1 +1 @@ -logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file +logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hbase_system, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows-2012/error b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows-2012/error index 572bbf8a03..4c2d67d198 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows-2012/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows-2012/error @@ -1 +1 @@ -logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file +logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows/error b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows/error index 572bbf8a03..4c2d67d198 100644 --- a/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows/error +++ b/confgenerator/testdata/goldens/invalid-logging-processor_unsupported_type/golden/windows/error @@ -1 +1 @@ -logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file +logging processor with type "unsupported_type" is not supported. Supported logging processor types: [apache_access, apache_error, cassandra_debug, cassandra_gc, cassandra_system, couchdb, elasticsearch_gc, elasticsearch_json, exclude_logs, flink, hbase_system, iis_access, jetty_access, kafka, modify_fields, mysql_error, mysql_general, mysql_slow, nginx_access, nginx_error, oracledb_alert, oracledb_audit, parse_json, parse_multiline, parse_regex, postgresql_general, rabbitmq, redis, saphana, solr_system, tomcat_access, tomcat_system, varnish, wildfly_system]. \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux-gpu/feature_tracking_otlp.json b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux-gpu/feature_tracking_otlp.json index 2691a172f2..768b05853d 100644 --- a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux-gpu/feature_tracking_otlp.json +++ b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux-gpu/feature_tracking_otlp.json @@ -1 +1 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:rabbitmq"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file +{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:rabbitmq"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:rabbitmq"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux-gpu/features.yaml b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux-gpu/features.yaml index 6ab26d49f9..70408cc3e6 100644 --- a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux-gpu/features.yaml +++ b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux-gpu/features.yaml @@ -18,3 +18,7 @@ feature: receivers:rabbitmq key: "[0].enabled" value: "true" +- module: logging + feature: receivers:rabbitmq + key: "[0].include_paths.__length" + value: "1" diff --git a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux-gpu/fluent_bit_main.conf b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux-gpu/fluent_bit_main.conf index 672c158888..c3ea544e80 100644 --- a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux-gpu/fluent_bit_main.conf +++ b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux-gpu/fluent_bit_main.conf @@ -113,8 +113,8 @@ Match rabbitmq.rabbitmq Name parser Reserve_Data True - Parser rabbitmq.rabbitmq.rabbitmq.0 - Parser rabbitmq.rabbitmq.rabbitmq.1 + Parser rabbitmq.rabbitmq.0.0 + Parser rabbitmq.rabbitmq.0.1 [FILTER] Match rabbitmq.rabbitmq diff --git a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux-gpu/fluent_bit_parser.conf b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux-gpu/fluent_bit_parser.conf index 2ade275057..da0882bbf3 100644 --- a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux-gpu/fluent_bit_parser.conf +++ b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux-gpu/fluent_bit_parser.conf @@ -1,13 +1,13 @@ [PARSER] Format regex - Name rabbitmq.rabbitmq.rabbitmq.0 + Name rabbitmq.rabbitmq.0.0 Regex ^(?\d+-\d+-\d+\s+\d+:\d+:\d+[.,]\d+\+\d+:\d+) \[(?\w+)\] \<(?\d+\.\d+\.\d+)\> (?.*)$ Time_Format %Y-%m-%d %H:%M:%S.%L%z Time_Key timestamp [PARSER] Format regex - Name rabbitmq.rabbitmq.rabbitmq.1 + Name rabbitmq.rabbitmq.0.1 Regex ^(?\d+-\d+-\d+\s+\d+:\d+:\d+[.,]\d+\d+\d+) \[(?\w+)\] \<(?\d+\.\d+\.\d+)\> (?.*)$ Time_Format %Y-%m-%d %H:%M:%S.%L Time_Key timestamp diff --git a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux/feature_tracking_otlp.json b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux/feature_tracking_otlp.json index 2691a172f2..768b05853d 100644 --- a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux/feature_tracking_otlp.json +++ b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux/feature_tracking_otlp.json @@ -1 +1 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:rabbitmq"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file +{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:rabbitmq"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:rabbitmq"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux/features.yaml b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux/features.yaml index 6ab26d49f9..70408cc3e6 100644 --- a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux/features.yaml +++ b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux/features.yaml @@ -18,3 +18,7 @@ feature: receivers:rabbitmq key: "[0].enabled" value: "true" +- module: logging + feature: receivers:rabbitmq + key: "[0].include_paths.__length" + value: "1" diff --git a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux/fluent_bit_main.conf b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux/fluent_bit_main.conf index 672c158888..c3ea544e80 100644 --- a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux/fluent_bit_main.conf +++ b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux/fluent_bit_main.conf @@ -113,8 +113,8 @@ Match rabbitmq.rabbitmq Name parser Reserve_Data True - Parser rabbitmq.rabbitmq.rabbitmq.0 - Parser rabbitmq.rabbitmq.rabbitmq.1 + Parser rabbitmq.rabbitmq.0.0 + Parser rabbitmq.rabbitmq.0.1 [FILTER] Match rabbitmq.rabbitmq diff --git a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux/fluent_bit_parser.conf b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux/fluent_bit_parser.conf index 2ade275057..da0882bbf3 100644 --- a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux/fluent_bit_parser.conf +++ b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/linux/fluent_bit_parser.conf @@ -1,13 +1,13 @@ [PARSER] Format regex - Name rabbitmq.rabbitmq.rabbitmq.0 + Name rabbitmq.rabbitmq.0.0 Regex ^(?\d+-\d+-\d+\s+\d+:\d+:\d+[.,]\d+\+\d+:\d+) \[(?\w+)\] \<(?\d+\.\d+\.\d+)\> (?.*)$ Time_Format %Y-%m-%d %H:%M:%S.%L%z Time_Key timestamp [PARSER] Format regex - Name rabbitmq.rabbitmq.rabbitmq.1 + Name rabbitmq.rabbitmq.0.1 Regex ^(?\d+-\d+-\d+\s+\d+:\d+:\d+[.,]\d+\d+\d+) \[(?\w+)\] \<(?\d+\.\d+\.\d+)\> (?.*)$ Time_Format %Y-%m-%d %H:%M:%S.%L Time_Key timestamp diff --git a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows-2012/feature_tracking_otlp.json b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows-2012/feature_tracking_otlp.json index 2691a172f2..768b05853d 100644 --- a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows-2012/feature_tracking_otlp.json +++ b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows-2012/feature_tracking_otlp.json @@ -1 +1 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:rabbitmq"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file +{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:rabbitmq"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:rabbitmq"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows-2012/features.yaml b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows-2012/features.yaml index 6ab26d49f9..70408cc3e6 100644 --- a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows-2012/features.yaml +++ b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows-2012/features.yaml @@ -18,3 +18,7 @@ feature: receivers:rabbitmq key: "[0].enabled" value: "true" +- module: logging + feature: receivers:rabbitmq + key: "[0].include_paths.__length" + value: "1" diff --git a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows-2012/fluent_bit_main.conf b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows-2012/fluent_bit_main.conf index 4d84ac7a96..9eaebb292f 100644 --- a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows-2012/fluent_bit_main.conf +++ b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows-2012/fluent_bit_main.conf @@ -156,8 +156,8 @@ Match rabbitmq.rabbitmq Name parser Reserve_Data True - Parser rabbitmq.rabbitmq.rabbitmq.0 - Parser rabbitmq.rabbitmq.rabbitmq.1 + Parser rabbitmq.rabbitmq.0.0 + Parser rabbitmq.rabbitmq.0.1 [FILTER] Match rabbitmq.rabbitmq diff --git a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows-2012/fluent_bit_parser.conf b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows-2012/fluent_bit_parser.conf index b011c0c294..5d5adf5088 100644 --- a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows-2012/fluent_bit_parser.conf +++ b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows-2012/fluent_bit_parser.conf @@ -7,14 +7,14 @@ [PARSER] Format regex - Name rabbitmq.rabbitmq.rabbitmq.0 + Name rabbitmq.rabbitmq.0.0 Regex ^(?\d+-\d+-\d+\s+\d+:\d+:\d+[.,]\d+\+\d+:\d+) \[(?\w+)\] \<(?\d+\.\d+\.\d+)\> (?.*)$ Time_Format %Y-%m-%d %H:%M:%S.%L%z Time_Key timestamp [PARSER] Format regex - Name rabbitmq.rabbitmq.rabbitmq.1 + Name rabbitmq.rabbitmq.0.1 Regex ^(?\d+-\d+-\d+\s+\d+:\d+:\d+[.,]\d+\d+\d+) \[(?\w+)\] \<(?\d+\.\d+\.\d+)\> (?.*)$ Time_Format %Y-%m-%d %H:%M:%S.%L Time_Key timestamp diff --git a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows/feature_tracking_otlp.json b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows/feature_tracking_otlp.json index 2691a172f2..768b05853d 100644 --- a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows/feature_tracking_otlp.json +++ b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows/feature_tracking_otlp.json @@ -1 +1 @@ -{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:rabbitmq"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file +{"resourceMetrics":[{"resource":{"attributes":[{"key":"k","value":{"stringValue":"v"}}]},"scopeMetrics":[{"scope":{},"metrics":[{"name":"agent.googleapis.com/agent/internal/ops/feature_tracking","gauge":{"dataPoints":[{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"metrics"}},{"key":"feature","value":{"stringValue":"service:pipelines"}},{"key":"key","value":{"stringValue":"default_pipeline_overridden"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"global"}},{"key":"feature","value":{"stringValue":"default:self_log"}},{"key":"key","value":{"stringValue":"default_self_log_file_collection"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"service:otel_logging"}},{"key":"key","value":{"stringValue":"otel_logging_supported_config"}},{"key":"value","value":{"stringValue":"false"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:rabbitmq"}},{"key":"key","value":{"stringValue":"[0].enabled"}},{"key":"value","value":{"stringValue":"true"}}],"asInt":"1"},{"attributes":[{"key":"module","value":{"stringValue":"logging"}},{"key":"feature","value":{"stringValue":"receivers:rabbitmq"}},{"key":"key","value":{"stringValue":"[0].include_paths.__length"}},{"key":"value","value":{"stringValue":"1"}}],"asInt":"1"}]}}]}]}]} \ No newline at end of file diff --git a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows/features.yaml b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows/features.yaml index 6ab26d49f9..70408cc3e6 100644 --- a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows/features.yaml +++ b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows/features.yaml @@ -18,3 +18,7 @@ feature: receivers:rabbitmq key: "[0].enabled" value: "true" +- module: logging + feature: receivers:rabbitmq + key: "[0].include_paths.__length" + value: "1" diff --git a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows/fluent_bit_main.conf b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows/fluent_bit_main.conf index 4d84ac7a96..9eaebb292f 100644 --- a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows/fluent_bit_main.conf +++ b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows/fluent_bit_main.conf @@ -156,8 +156,8 @@ Match rabbitmq.rabbitmq Name parser Reserve_Data True - Parser rabbitmq.rabbitmq.rabbitmq.0 - Parser rabbitmq.rabbitmq.rabbitmq.1 + Parser rabbitmq.rabbitmq.0.0 + Parser rabbitmq.rabbitmq.0.1 [FILTER] Match rabbitmq.rabbitmq diff --git a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows/fluent_bit_parser.conf b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows/fluent_bit_parser.conf index b011c0c294..5d5adf5088 100644 --- a/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows/fluent_bit_parser.conf +++ b/confgenerator/testdata/goldens/logging-receiver_rabbitmq/golden/windows/fluent_bit_parser.conf @@ -7,14 +7,14 @@ [PARSER] Format regex - Name rabbitmq.rabbitmq.rabbitmq.0 + Name rabbitmq.rabbitmq.0.0 Regex ^(?\d+-\d+-\d+\s+\d+:\d+:\d+[.,]\d+\+\d+:\d+) \[(?\w+)\] \<(?\d+\.\d+\.\d+)\> (?.*)$ Time_Format %Y-%m-%d %H:%M:%S.%L%z Time_Key timestamp [PARSER] Format regex - Name rabbitmq.rabbitmq.rabbitmq.1 + Name rabbitmq.rabbitmq.0.1 Regex ^(?\d+-\d+-\d+\s+\d+:\d+:\d+[.,]\d+\d+\d+) \[(?\w+)\] \<(?\d+\.\d+\.\d+)\> (?.*)$ Time_Format %Y-%m-%d %H:%M:%S.%L Time_Key timestamp diff --git a/transformation_test/testdata/logging_processor-rabbitmq/config.yaml b/transformation_test/testdata/logging_processor-rabbitmq/config.yaml new file mode 100644 index 0000000000..9cfa4369aa --- /dev/null +++ b/transformation_test/testdata/logging_processor-rabbitmq/config.yaml @@ -0,0 +1 @@ +- type: rabbitmq diff --git a/transformation_test/testdata/logging_processor-rabbitmq/input.log b/transformation_test/testdata/logging_processor-rabbitmq/input.log new file mode 100644 index 0000000000..a715c625d4 --- /dev/null +++ b/transformation_test/testdata/logging_processor-rabbitmq/input.log @@ -0,0 +1,21 @@ +2025-08-18 01:01:20.441571+00:00 [erro] <0.692.0> ** Connection attempt from node 'rabbit_ctl_17@keith-testing-rabbitmq' rejected. Invalid challenge reply. ** +2025-08-18 01:05:10.000123+02:00 [info] <0.801.0> Successfully set user tags for user 'admin' to [administrator] +2025-08-18 01:06:33.987654-07:00 [warning] <0.550.0> Queue 'task_queue' is nearing memory threshold. +2025-08-18 01:45:14.705 [info] <0.801.0> Successfully set user tags for user 'guest' to [] +2025-08-18 01:46:00.123 [debug] <0.200.0> Accepting AMQP connection <0.200.0> from 127.0.0.1:5672 +2025-08-18 02:15:45.987+00:00 [error] <0.310.0> Login failed for user 'guest': invalid credentials +2025-08-18 02:16:01.001+00:00 [warning] <0.312.0> User 'guest' attempted to access vhost '/' but was denied +2025-08-18 02:22:33.444+00:00 [noti] <0.400.0> Node rabbit@node1 down: lost connection +2025-08-18 02:23:00.999+00:00 [info] <0.401.0> Node rabbit@node1 recovered and rejoined cluster +2025-08-18 02:55:55.123+00:00 [warning] <0.500.0> Memory high watermark reached (used: 2048MB, limit: 2000MB) +2025-08-18 03:56:01.456+00:00 [erro] <0.501.0> Disk free space too low. Free bytes: 500000, limit: 1000000 +2025-08-18 04:06:06.789+00:00 [erro] <0.600.0> AMQP connection <0.600.0> (10.0.0.1:5672 -> 10.0.0.2:5672): connection closed unexpectedly +2025-08-18 04:06:10.101+00:00 [debug] <0.601.0> Re-establishing connection to peer rabbit@node2 +2025-08-18 04:07:07.777+00:00 [noti] <123.456.789> {shutdown,{connection_closed, "Broken pipe"}} +2025-08-18 04:07:08.888 [erro] <0.999.0> Unexpected exception: {'EXIT',{{badmatch,{error,enoent}},[{rabbit_misc,read_config,1,[]}]}} +2025-08-18 05:07:43.557042+00:00 [erro] <0.130.0> +BOOT FAILED +=========== +ERROR: could not bind to distribution port 25672, it is in use by another node: rabbit@keith-testing-rabbitmq +2025-08-18 06:56:01.456+00:00 [erro] <0.501.0> Disk free space too low. Free bytes: 500000, limit: 1000000 +2025-08-18 07:07:07.777+00:00 [noti] <123.456.789> {shutdown,{connection_closed, "Broken pipe"}} diff --git a/transformation_test/testdata/logging_processor-rabbitmq/output_fluentbit.yaml b/transformation_test/testdata/logging_processor-rabbitmq/output_fluentbit.yaml new file mode 100644 index 0000000000..d2302f3d59 --- /dev/null +++ b/transformation_test/testdata/logging_processor-rabbitmq/output_fluentbit.yaml @@ -0,0 +1,132 @@ +- entries: + - jsonPayload: + message: "** Connection attempt from node 'rabbit_ctl_17@keith-testing-rabbitmq' rejected. Invalid challenge reply. **" + process_id: 0.692.0 + severity: erro + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/rabbitmq + logName: projects/my-project/logs/transformation_test + timestamp: 2025-08-18T01:01:20.441571000Z + - jsonPayload: + message: Successfully set user tags for user 'admin' to [administrator] + process_id: 0.801.0 + severity: info + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/rabbitmq + logName: projects/my-project/logs/transformation_test + severity: 200.0 + timestamp: 2025-08-17T23:05:10.000123000Z + - jsonPayload: + message: "Login failed for user 'guest': invalid credentials" + process_id: 0.310.0 + severity: error + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/rabbitmq + logName: projects/my-project/logs/transformation_test + severity: 500.0 + timestamp: 2025-08-18T02:15:45.987000000Z + - jsonPayload: + message: User 'guest' attempted to access vhost '/' but was denied + process_id: 0.312.0 + severity: warning + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/rabbitmq + logName: projects/my-project/logs/transformation_test + severity: 400.0 + timestamp: 2025-08-18T02:16:01.001000000Z + - jsonPayload: + message: "Node rabbit@node1 down: lost connection" + process_id: 0.400.0 + severity: noti + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/rabbitmq + logName: projects/my-project/logs/transformation_test + severity: 0.0 + timestamp: 2025-08-18T02:22:33.444000000Z + - jsonPayload: + message: Node rabbit@node1 recovered and rejoined cluster + process_id: 0.401.0 + severity: info + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/rabbitmq + logName: projects/my-project/logs/transformation_test + severity: 200.0 + timestamp: 2025-08-18T02:23:00.999000000Z + - jsonPayload: + message: "Memory high watermark reached (used: 2048MB, limit: 2000MB)" + process_id: 0.500.0 + severity: warning + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/rabbitmq + logName: projects/my-project/logs/transformation_test + severity: 400.0 + timestamp: 2025-08-18T02:55:55.123000000Z + - jsonPayload: + message: "Disk free space too low. Free bytes: 500000, limit: 1000000" + process_id: 0.501.0 + severity: erro + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/rabbitmq + logName: projects/my-project/logs/transformation_test + timestamp: 2025-08-18T03:56:01.456000000Z + - jsonPayload: + message: "AMQP connection <0.600.0> (10.0.0.1:5672 -> 10.0.0.2:5672): connection closed unexpectedly" + process_id: 0.600.0 + severity: erro + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/rabbitmq + logName: projects/my-project/logs/transformation_test + timestamp: 2025-08-18T04:06:06.789000000Z + - jsonPayload: + message: Re-establishing connection to peer rabbit@node2 + process_id: 0.601.0 + severity: debug + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/rabbitmq + logName: projects/my-project/logs/transformation_test + severity: 100.0 + timestamp: 2025-08-18T04:06:10.101000000Z + - jsonPayload: + message: "{shutdown,{connection_closed, \"Broken pipe\"}}" + process_id: 123.456.789 + severity: noti + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/rabbitmq + logName: projects/my-project/logs/transformation_test + severity: 0.0 + timestamp: 2025-08-18T04:07:07.777000000Z + - jsonPayload: + message: |- + 2025-08-18 05:07:43.557042+00:00 [erro] <0.130.0> + BOOT FAILED + =========== + ERROR: could not bind to distribution port 25672, it is in use by another node: rabbit@keith-testing-rabbitmq + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/rabbitmq + logName: projects/my-project/logs/transformation_test + timestamp: now + - jsonPayload: + message: "Disk free space too low. Free bytes: 500000, limit: 1000000" + process_id: 0.501.0 + severity: erro + labels: + compute.googleapis.com/resource_name: hostname + logging.googleapis.com/instrumentation_source: agent.googleapis.com/rabbitmq + logName: projects/my-project/logs/transformation_test + timestamp: 2025-08-18T06:56:01.456000000Z + partialSuccess: true + resource: + labels: {} + type: gce_instance diff --git a/transformation_test/testdata/logging_processor-rabbitmq/output_otel.yaml b/transformation_test/testdata/logging_processor-rabbitmq/output_otel.yaml new file mode 100644 index 0000000000..c83821d3ed --- /dev/null +++ b/transformation_test/testdata/logging_processor-rabbitmq/output_otel.yaml @@ -0,0 +1 @@ +- config_error: "processor \"processor0\" has invalid configuration: unimplemented"