diff --git a/confgenerator/confgenerator.go b/confgenerator/confgenerator.go index 0789092b7e..4b3bd22a8c 100644 --- a/confgenerator/confgenerator.go +++ b/confgenerator/confgenerator.go @@ -216,7 +216,7 @@ func (l *Logging) generateFluentbitComponents(userAgent string, hostInfo *host.I } components = append(components, processor.Components(tag, strconv.Itoa(i))...) } - components = append(components, setLogNameComponents(tag, rID, receiver.Type())...) + components = append(components, setLogNameComponents(tag, rID, receiver.Type(), hostInfo.Hostname)...) // Logs ingested using the fluent_forward receiver must add the existing_tag // on the record to the LogName. This is done with a Lua filter. diff --git a/confgenerator/logging.go b/confgenerator/logging.go index c13e5e8f9a..9032bb9da3 100644 --- a/confgenerator/logging.go +++ b/confgenerator/logging.go @@ -21,12 +21,15 @@ import ( ) // setLogNameComponents generates a series of components that rewrites the tag on log entries tagged `tag` to be `logName`. -func setLogNameComponents(tag, logName, receiverType string) []fluentbit.Component { +func setLogNameComponents(tag, logName, receiverType string, hostName string) []fluentbit.Component { return LoggingProcessorModifyFields{ Fields: map[string]*ModifyField{ "logName": { DefaultValue: &logName, }, + `labels."compute.googleapis.com/resource_name"`: { + DefaultValue: &hostName, + }, // `labels."agent.googleapis.com/receiver_type"`: { // StaticValue: &receiverType, // }, diff --git a/confgenerator/testdata/valid/linux/all-backward_compatible_with_explicit_exporters/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/all-backward_compatible_with_explicit_exporters/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/all-backward_compatible_with_explicit_exporters/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/all-backward_compatible_with_explicit_exporters/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/all-backward_compatible_with_explicit_exporters/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/all-backward_compatible_with_explicit_exporters/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/all-backward_compatible_with_explicit_exporters/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/all-backward_compatible_with_explicit_exporters/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/all-backward_compatible_with_explicit_exporters/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/all-backward_compatible_with_explicit_exporters/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/all-built_in_config/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/all-built_in_config/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/all-built_in_config/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/all-built_in_config/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/all-built_in_config/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/all-built_in_config/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/all-built_in_config/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/all-built_in_config/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/all-built_in_config/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/all-built_in_config/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/all-user_config_file_deleted/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/all-user_config_file_deleted/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/all-user_config_file_deleted/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/all-user_config_file_deleted/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/all-user_config_file_deleted/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/all-user_config_file_deleted/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/all-user_config_file_deleted/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/all-user_config_file_deleted/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/all-user_config_file_deleted/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/all-user_config_file_deleted/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/logging-custom_log_level/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-custom_log_level/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-custom_log_level/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-custom_log_level/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-custom_log_level/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-custom_log_level/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-custom_log_level/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-custom_log_level/golden_fluent_bit_main.conf index 0997098aad..3b7ded84a1 100644 --- a/confgenerator/testdata/valid/linux/logging-custom_log_level/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-custom_log_level/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_01ed2bd46e1d099a101cc74ed368a1fc.lua b/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_01ed2bd46e1d099a101cc74ed368a1fc.lua new file mode 100644 index 0000000000..866f58b6d5 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_01ed2bd46e1d099a101cc74ed368a1fc.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "test_syslog_source_id_tcp" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_13322ed6829712e9e8004b6705b58020.lua b/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_13322ed6829712e9e8004b6705b58020.lua new file mode 100644 index 0000000000..80256c7c66 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_13322ed6829712e9e8004b6705b58020.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "log_source_id2" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_15cf604ba57275339813be7a240be374.lua b/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_15cf604ba57275339813be7a240be374.lua deleted file mode 100644 index 6588d61985..0000000000 --- a/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_15cf604ba57275339813be7a240be374.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "test_syslog_source_id_udp" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_a8d53383411830cfac4f0703a037ce13.lua b/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_a8d53383411830cfac4f0703a037ce13.lua deleted file mode 100644 index 84aad71ea2..0000000000 --- a/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_a8d53383411830cfac4f0703a037ce13.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "log_source_id2" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_bbe493b54b165ca3149fd2168216ea97.lua b/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_bbe493b54b165ca3149fd2168216ea97.lua deleted file mode 100644 index 3cee714d27..0000000000 --- a/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_bbe493b54b165ca3149fd2168216ea97.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "log_source_id1" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_c540c13717430f9798e74730652c5612.lua b/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_c540c13717430f9798e74730652c5612.lua new file mode 100644 index 0000000000..44993e8142 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_c540c13717430f9798e74730652c5612.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "test_syslog_source_id_udp" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_f1c3bc88452ddbb23cbab5d1d33c1108.lua b/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_f1c3bc88452ddbb23cbab5d1d33c1108.lua deleted file mode 100644 index 05b4830f43..0000000000 --- a/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_f1c3bc88452ddbb23cbab5d1d33c1108.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "test_syslog_source_id_tcp" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_fc00cb02b9b88c98bb35ef80a02c314d.lua b/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_fc00cb02b9b88c98bb35ef80a02c314d.lua new file mode 100644 index 0000000000..74d61bd410 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_fc00cb02b9b88c98bb35ef80a02c314d.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "log_source_id1" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_fluent_bit_main.conf index 8145e83578..95661f4a85 100644 --- a/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-pipeline_multiple_pipelines/golden_fluent_bit_main.conf @@ -85,13 +85,13 @@ Match pipeline1.log_source_id1 Name lua call process - script bbe493b54b165ca3149fd2168216ea97.lua + script fc00cb02b9b88c98bb35ef80a02c314d.lua [FILTER] Match pipeline2.log_source_id2 Name lua call process - script a8d53383411830cfac4f0703a037ce13.lua + script 13322ed6829712e9e8004b6705b58020.lua [FILTER] Key_Name message @@ -103,7 +103,7 @@ Match pipeline3.test_syslog_source_id_tcp Name lua call process - script f1c3bc88452ddbb23cbab5d1d33c1108.lua + script 01ed2bd46e1d099a101cc74ed368a1fc.lua [FILTER] Key_Name message @@ -115,7 +115,7 @@ Match pipeline4.test_syslog_source_id_udp Name lua call process - script 15cf604ba57275339813be7a240be374.lua + script c540c13717430f9798e74730652c5612.lua [OUTPUT] Match_Regex ^(pipeline1\.log_source_id1|pipeline2\.log_source_id2|pipeline3\.test_syslog_source_id_tcp|pipeline4\.test_syslog_source_id_udp)$ diff --git a/confgenerator/testdata/valid/linux/logging-processor_exclude_logs/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-processor_exclude_logs/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-processor_exclude_logs/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-processor_exclude_logs/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-processor_exclude_logs/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-processor_exclude_logs/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-processor_exclude_logs/golden_ceace54321d86361bb808999212e255c.lua b/confgenerator/testdata/valid/linux/logging-processor_exclude_logs/golden_ceace54321d86361bb808999212e255c.lua new file mode 100644 index 0000000000..a9476ae77b --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-processor_exclude_logs/golden_ceace54321d86361bb808999212e255c.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "sample_logs" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-processor_exclude_logs/golden_e6fb8bcd6c514d3dd30ecd505fb4c874.lua b/confgenerator/testdata/valid/linux/logging-processor_exclude_logs/golden_e6fb8bcd6c514d3dd30ecd505fb4c874.lua deleted file mode 100644 index ce5526c03b..0000000000 --- a/confgenerator/testdata/valid/linux/logging-processor_exclude_logs/golden_e6fb8bcd6c514d3dd30ecd505fb4c874.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "sample_logs" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-processor_exclude_logs/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-processor_exclude_logs/golden_fluent_bit_main.conf index 4a834c496e..3b675ea6b6 100644 --- a/confgenerator/testdata/valid/linux/logging-processor_exclude_logs/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-processor_exclude_logs/golden_fluent_bit_main.conf @@ -63,7 +63,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Match p1.sample_logs @@ -460,7 +460,7 @@ Match p1.sample_logs Name lua call process - script e6fb8bcd6c514d3dd30ecd505fb4c874.lua + script ceace54321d86361bb808999212e255c.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|p1\.sample_logs)$ diff --git a/confgenerator/testdata/valid/linux/logging-processor_modify_fields/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-processor_modify_fields/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-processor_modify_fields/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-processor_modify_fields/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-processor_modify_fields/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-processor_modify_fields/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-processor_modify_fields/golden_ceace54321d86361bb808999212e255c.lua b/confgenerator/testdata/valid/linux/logging-processor_modify_fields/golden_ceace54321d86361bb808999212e255c.lua new file mode 100644 index 0000000000..a9476ae77b --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-processor_modify_fields/golden_ceace54321d86361bb808999212e255c.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "sample_logs" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-processor_modify_fields/golden_e6fb8bcd6c514d3dd30ecd505fb4c874.lua b/confgenerator/testdata/valid/linux/logging-processor_modify_fields/golden_e6fb8bcd6c514d3dd30ecd505fb4c874.lua deleted file mode 100644 index ce5526c03b..0000000000 --- a/confgenerator/testdata/valid/linux/logging-processor_modify_fields/golden_e6fb8bcd6c514d3dd30ecd505fb4c874.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "sample_logs" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-processor_modify_fields/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-processor_modify_fields/golden_fluent_bit_main.conf index 6f3cbbac99..9431640e2e 100644 --- a/confgenerator/testdata/valid/linux/logging-processor_modify_fields/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-processor_modify_fields/golden_fluent_bit_main.conf @@ -63,7 +63,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Match p1.sample_logs @@ -75,7 +75,7 @@ Match p1.sample_logs Name lua call process - script e6fb8bcd6c514d3dd30ecd505fb4c874.lua + script ceace54321d86361bb808999212e255c.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|p1\.sample_logs)$ diff --git a/confgenerator/testdata/valid/linux/logging-processor_order/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-processor_order/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-processor_order/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-processor_order/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-processor_order/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-processor_order/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-processor_order/golden_ceace54321d86361bb808999212e255c.lua b/confgenerator/testdata/valid/linux/logging-processor_order/golden_ceace54321d86361bb808999212e255c.lua new file mode 100644 index 0000000000..a9476ae77b --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-processor_order/golden_ceace54321d86361bb808999212e255c.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "sample_logs" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-processor_order/golden_e6fb8bcd6c514d3dd30ecd505fb4c874.lua b/confgenerator/testdata/valid/linux/logging-processor_order/golden_e6fb8bcd6c514d3dd30ecd505fb4c874.lua deleted file mode 100644 index ce5526c03b..0000000000 --- a/confgenerator/testdata/valid/linux/logging-processor_order/golden_e6fb8bcd6c514d3dd30ecd505fb4c874.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "sample_logs" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-processor_order/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-processor_order/golden_fluent_bit_main.conf index bc3bd5d9df..25749d6aa5 100644 --- a/confgenerator/testdata/valid/linux/logging-processor_order/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-processor_order/golden_fluent_bit_main.conf @@ -77,7 +77,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Key_Name message @@ -95,7 +95,7 @@ Match pipeline1.sample_logs Name lua call process - script e6fb8bcd6c514d3dd30ecd505fb4c874.lua + script ceace54321d86361bb808999212e255c.lua [FILTER] Key_Name message @@ -113,7 +113,7 @@ Match pipeline2.sample_logs Name lua call process - script e6fb8bcd6c514d3dd30ecd505fb4c874.lua + script ceace54321d86361bb808999212e255c.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|pipeline1\.sample_logs|pipeline2\.sample_logs)$ diff --git a/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_01ed2bd46e1d099a101cc74ed368a1fc.lua b/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_01ed2bd46e1d099a101cc74ed368a1fc.lua new file mode 100644 index 0000000000..866f58b6d5 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_01ed2bd46e1d099a101cc74ed368a1fc.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "test_syslog_source_id_tcp" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_13322ed6829712e9e8004b6705b58020.lua b/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_13322ed6829712e9e8004b6705b58020.lua new file mode 100644 index 0000000000..80256c7c66 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_13322ed6829712e9e8004b6705b58020.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "log_source_id2" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_15cf604ba57275339813be7a240be374.lua b/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_15cf604ba57275339813be7a240be374.lua deleted file mode 100644 index 6588d61985..0000000000 --- a/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_15cf604ba57275339813be7a240be374.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "test_syslog_source_id_udp" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_a8d53383411830cfac4f0703a037ce13.lua b/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_a8d53383411830cfac4f0703a037ce13.lua deleted file mode 100644 index 84aad71ea2..0000000000 --- a/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_a8d53383411830cfac4f0703a037ce13.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "log_source_id2" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_bbe493b54b165ca3149fd2168216ea97.lua b/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_bbe493b54b165ca3149fd2168216ea97.lua deleted file mode 100644 index 3cee714d27..0000000000 --- a/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_bbe493b54b165ca3149fd2168216ea97.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "log_source_id1" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_c540c13717430f9798e74730652c5612.lua b/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_c540c13717430f9798e74730652c5612.lua new file mode 100644 index 0000000000..44993e8142 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_c540c13717430f9798e74730652c5612.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "test_syslog_source_id_udp" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_f1c3bc88452ddbb23cbab5d1d33c1108.lua b/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_f1c3bc88452ddbb23cbab5d1d33c1108.lua deleted file mode 100644 index 05b4830f43..0000000000 --- a/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_f1c3bc88452ddbb23cbab5d1d33c1108.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "test_syslog_source_id_tcp" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_fc00cb02b9b88c98bb35ef80a02c314d.lua b/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_fc00cb02b9b88c98bb35ef80a02c314d.lua new file mode 100644 index 0000000000..74d61bd410 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_fc00cb02b9b88c98bb35ef80a02c314d.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "log_source_id1" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_fluent_bit_main.conf index bff98abd7a..cd409192a7 100644 --- a/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-processor_parse_json_and_parse_regex_types/golden_fluent_bit_main.conf @@ -91,7 +91,7 @@ Match pipeline1.log_source_id1 Name lua call process - script bbe493b54b165ca3149fd2168216ea97.lua + script fc00cb02b9b88c98bb35ef80a02c314d.lua [FILTER] Key_Name key_1 @@ -103,7 +103,7 @@ Match pipeline2.log_source_id2 Name lua call process - script a8d53383411830cfac4f0703a037ce13.lua + script 13322ed6829712e9e8004b6705b58020.lua [FILTER] Key_Name message @@ -115,7 +115,7 @@ Match pipeline3.test_syslog_source_id_tcp Name lua call process - script f1c3bc88452ddbb23cbab5d1d33c1108.lua + script 01ed2bd46e1d099a101cc74ed368a1fc.lua [FILTER] Key_Name message @@ -127,7 +127,7 @@ Match pipeline4.test_syslog_source_id_udp Name lua call process - script 15cf604ba57275339813be7a240be374.lua + script c540c13717430f9798e74730652c5612.lua [OUTPUT] Match_Regex ^(pipeline1\.log_source_id1|pipeline2\.log_source_id2|pipeline3\.test_syslog_source_id_tcp|pipeline4\.test_syslog_source_id_udp)$ diff --git a/confgenerator/testdata/valid/linux/logging-processor_parse_regex_type_on_default_pipeline/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-processor_parse_regex_type_on_default_pipeline/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-processor_parse_regex_type_on_default_pipeline/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-processor_parse_regex_type_on_default_pipeline/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-processor_parse_regex_type_on_default_pipeline/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-processor_parse_regex_type_on_default_pipeline/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-processor_parse_regex_type_on_default_pipeline/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-processor_parse_regex_type_on_default_pipeline/golden_fluent_bit_main.conf index 9cecabdac1..81418aaefe 100644 --- a/confgenerator/testdata/valid/linux/logging-processor_parse_regex_type_on_default_pipeline/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-processor_parse_regex_type_on_default_pipeline/golden_fluent_bit_main.conf @@ -55,7 +55,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_52dca4fb135dd7fe1c950b233a1bccf2.lua b/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_52dca4fb135dd7fe1c950b233a1bccf2.lua deleted file mode 100644 index bdf715cdb4..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_52dca4fb135dd7fe1c950b233a1bccf2.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "apache_access" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_9089d291cf67bf17c166c3b881e71c1a.lua b/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_9089d291cf67bf17c166c3b881e71c1a.lua new file mode 100644 index 0000000000..8a6ab1a569 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_9089d291cf67bf17c166c3b881e71c1a.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "apache_error" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_9848326f705ea6ef2aaa1ee372bf5620.lua b/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_9848326f705ea6ef2aaa1ee372bf5620.lua new file mode 100644 index 0000000000..dd81dc985c --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_9848326f705ea6ef2aaa1ee372bf5620.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "apache_access" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_e002c7f33deef1b9dabad806ef8910e3.lua b/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_e002c7f33deef1b9dabad806ef8910e3.lua deleted file mode 100644 index e054533418..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_e002c7f33deef1b9dabad806ef8910e3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "apache_error" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_fluent_bit_main.conf index 643db532dc..9afb26da3d 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_apache/golden_fluent_bit_main.conf @@ -109,7 +109,7 @@ Match apache.apache_access Name lua call process - script 52dca4fb135dd7fe1c950b233a1bccf2.lua + script 9848326f705ea6ef2aaa1ee372bf5620.lua [FILTER] Key_Name message @@ -217,13 +217,13 @@ Match apache.apache_error Name lua call process - script e002c7f33deef1b9dabad806ef8910e3.lua + script 9089d291cf67bf17c166c3b881e71c1a.lua [FILTER] Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(apache\.apache_access|apache\.apache_error|default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_22708eea431f1d024f4feefd07746ab5.lua b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_22708eea431f1d024f4feefd07746ab5.lua new file mode 100644 index 0000000000..7913fd13ae --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_22708eea431f1d024f4feefd07746ab5.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "apache_syslog_access" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_30f8b7a77b1eded580b4288ba498698c.lua b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_30f8b7a77b1eded580b4288ba498698c.lua new file mode 100644 index 0000000000..a7c53ce50b --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_30f8b7a77b1eded580b4288ba498698c.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "apache_default_access" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_3a4e20888976162d185bfb81fa58cfc7.lua b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_3a4e20888976162d185bfb81fa58cfc7.lua new file mode 100644 index 0000000000..e424186e50 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_3a4e20888976162d185bfb81fa58cfc7.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "apache_custom_access" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_4021b3a497efca90e5a16a09c6f5a412.lua b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_4021b3a497efca90e5a16a09c6f5a412.lua deleted file mode 100644 index 8590b15b56..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_4021b3a497efca90e5a16a09c6f5a412.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "apache_syslog_error" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_5e1af9064802503944616ae45f6f95bc.lua b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_5e1af9064802503944616ae45f6f95bc.lua deleted file mode 100644 index 2d327cbca7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_5e1af9064802503944616ae45f6f95bc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "apache_custom_error" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_64801382405e9440606d1f82c84fd5fd.lua b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_64801382405e9440606d1f82c84fd5fd.lua new file mode 100644 index 0000000000..a0da9bb0fe --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_64801382405e9440606d1f82c84fd5fd.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "apache_default_error" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_79430ca92d2a8721b1f7171e5789d24f.lua b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_79430ca92d2a8721b1f7171e5789d24f.lua deleted file mode 100644 index b8f5ac493c..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_79430ca92d2a8721b1f7171e5789d24f.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "apache_syslog_access" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_9238b6826d639e6a916ef1cd3a85c657.lua b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_9238b6826d639e6a916ef1cd3a85c657.lua deleted file mode 100644 index f06ac27d7d..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_9238b6826d639e6a916ef1cd3a85c657.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "apache_custom_access" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_9fde30df163c247c4497419eb2a0ddf9.lua b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_9fde30df163c247c4497419eb2a0ddf9.lua deleted file mode 100644 index 0e2a53a625..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_9fde30df163c247c4497419eb2a0ddf9.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "apache_default_error" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_b730cc2ed0469c4f1dbd2aa0509d5c04.lua b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_b730cc2ed0469c4f1dbd2aa0509d5c04.lua new file mode 100644 index 0000000000..4a7ed79e39 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_b730cc2ed0469c4f1dbd2aa0509d5c04.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "apache_custom_error" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_d83a82ccc35094a77a7275bd2570c07b.lua b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_d83a82ccc35094a77a7275bd2570c07b.lua deleted file mode 100644 index 5f02e45834..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_d83a82ccc35094a77a7275bd2570c07b.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "apache_default_access" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_e47b6dee7ff9b896e7eaf17e3a5ac49d.lua b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_e47b6dee7ff9b896e7eaf17e3a5ac49d.lua new file mode 100644 index 0000000000..ebf28e9a01 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_e47b6dee7ff9b896e7eaf17e3a5ac49d.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "apache_syslog_error" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_fluent_bit_main.conf index b986148f3e..0c43e43618 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_apache_custom/golden_fluent_bit_main.conf @@ -159,7 +159,7 @@ Match apache_custom.apache_custom_access Name lua call process - script 9238b6826d639e6a916ef1cd3a85c657.lua + script 3a4e20888976162d185bfb81fa58cfc7.lua [FILTER] Key_Name message @@ -267,7 +267,7 @@ Match apache_custom.apache_custom_error Name lua call process - script 5e1af9064802503944616ae45f6f95bc.lua + script b730cc2ed0469c4f1dbd2aa0509d5c04.lua [FILTER] Key_Name message @@ -305,7 +305,7 @@ Match apache_default.apache_default_access Name lua call process - script d83a82ccc35094a77a7275bd2570c07b.lua + script 30f8b7a77b1eded580b4288ba498698c.lua [FILTER] Key_Name message @@ -413,7 +413,7 @@ Match apache_default.apache_default_error Name lua call process - script 9fde30df163c247c4497419eb2a0ddf9.lua + script 64801382405e9440606d1f82c84fd5fd.lua [FILTER] Key_Name message @@ -451,7 +451,7 @@ Match apache_syslog_access.apache_syslog_access Name lua call process - script 79430ca92d2a8721b1f7171e5789d24f.lua + script 22708eea431f1d024f4feefd07746ab5.lua [FILTER] Key_Name message @@ -559,13 +559,13 @@ Match apache_syslog_error.apache_syslog_error Name lua call process - script 4021b3a497efca90e5a16a09c6f5a412.lua + script e47b6dee7ff9b896e7eaf17e3a5ac49d.lua [FILTER] Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(apache_custom\.apache_custom_access|apache_custom\.apache_custom_error|apache_default\.apache_default_access|apache_default\.apache_default_error|apache_syslog_access\.apache_syslog_access|apache_syslog_error\.apache_syslog_error|default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_144d32949b22c2e963be996650b92e6d.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_144d32949b22c2e963be996650b92e6d.lua new file mode 100644 index 0000000000..18044b5b54 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_144d32949b22c2e963be996650b92e6d.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "cassandra_system" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_23d7e7d002110548ce83786e6f7e966c.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_23d7e7d002110548ce83786e6f7e966c.lua deleted file mode 100644 index ee2d47c3a6..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_23d7e7d002110548ce83786e6f7e966c.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "cassandra_debug" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_260413af98444f2e825538d6f9b28a68.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_260413af98444f2e825538d6f9b28a68.lua deleted file mode 100644 index 40478ae8f4..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_260413af98444f2e825538d6f9b28a68.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "cassandra_gc" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_b1e64647bf056d72fe0e804c635a2d91.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_b1e64647bf056d72fe0e804c635a2d91.lua new file mode 100644 index 0000000000..7e8abda07e --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_b1e64647bf056d72fe0e804c635a2d91.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "cassandra_gc" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_d158208ab05d0c02833b3d75ad130dbc.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_d158208ab05d0c02833b3d75ad130dbc.lua new file mode 100644 index 0000000000..3398f63949 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_d158208ab05d0c02833b3d75ad130dbc.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "cassandra_debug" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_ecf43a9651b8da2d758965e4cd007ee9.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_ecf43a9651b8da2d758965e4cd007ee9.lua deleted file mode 100644 index 586b55340d..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_ecf43a9651b8da2d758965e4cd007ee9.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "cassandra_system" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_fluent_bit_main.conf index 040b18f205..1755a5e9ea 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_cassandra/golden_fluent_bit_main.conf @@ -133,7 +133,7 @@ Match cassandra.cassandra_debug Name lua call process - script 23d7e7d002110548ce83786e6f7e966c.lua + script d158208ab05d0c02833b3d75ad130dbc.lua [FILTER] Match cassandra.cassandra_gc @@ -151,7 +151,7 @@ Match cassandra.cassandra_gc Name lua call process - script 260413af98444f2e825538d6f9b28a68.lua + script b1e64647bf056d72fe0e804c635a2d91.lua [FILTER] Match cassandra.cassandra_system @@ -199,13 +199,13 @@ Match cassandra.cassandra_system Name lua call process - script ecf43a9651b8da2d758965e4cd007ee9.lua + script 144d32949b22c2e963be996650b92e6d.lua [FILTER] Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(cassandra\.cassandra_debug|cassandra\.cassandra_gc|cassandra\.cassandra_system|default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_15d24e3425c4ee2442e8c3ad04495e72.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_15d24e3425c4ee2442e8c3ad04495e72.lua new file mode 100644 index 0000000000..c1cc4dc237 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_15d24e3425c4ee2442e8c3ad04495e72.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "cassandra_default_gc" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_16cee0fa84a0ba90b90b9fd6db2c5cae.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_16cee0fa84a0ba90b90b9fd6db2c5cae.lua deleted file mode 100644 index 6858fcc095..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_16cee0fa84a0ba90b90b9fd6db2c5cae.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "cassandra_default_debug" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_2a4dbe72a318b1e40ba6df5dac405838.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_2a4dbe72a318b1e40ba6df5dac405838.lua deleted file mode 100644 index 7787245a80..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_2a4dbe72a318b1e40ba6df5dac405838.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "cassandra_custom_debug" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_32bcfa11d261c222bf8c85cc59eb15f1.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_32bcfa11d261c222bf8c85cc59eb15f1.lua deleted file mode 100644 index cec966fccc..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_32bcfa11d261c222bf8c85cc59eb15f1.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "cassandra_custom_gc" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_38809b37c3a80ef2f9dbc3547c34040a.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_38809b37c3a80ef2f9dbc3547c34040a.lua new file mode 100644 index 0000000000..7901aad4c9 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_38809b37c3a80ef2f9dbc3547c34040a.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "cassandra_custom_gc" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_43d159fcd743c8ccae7118d649802caa.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_43d159fcd743c8ccae7118d649802caa.lua new file mode 100644 index 0000000000..8e9a273dc3 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_43d159fcd743c8ccae7118d649802caa.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "cassandra_syslog_gc" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_529e8f313b69a3646aa3688ba68198c3.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_529e8f313b69a3646aa3688ba68198c3.lua new file mode 100644 index 0000000000..21d13841f1 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_529e8f313b69a3646aa3688ba68198c3.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "cassandra_syslog_debug" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_5f4c4fae3c114062082974ee7f00c4ca.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_5f4c4fae3c114062082974ee7f00c4ca.lua deleted file mode 100644 index 245c0af4fb..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_5f4c4fae3c114062082974ee7f00c4ca.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "cassandra_default_system" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_6e5dc283e6f99787042f87423072b313.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_6e5dc283e6f99787042f87423072b313.lua new file mode 100644 index 0000000000..85f5a4f945 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_6e5dc283e6f99787042f87423072b313.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "cassandra_default_system" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_7a5f87ea5f66cdc5d63faa884f143d8d.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_7a5f87ea5f66cdc5d63faa884f143d8d.lua deleted file mode 100644 index fa837effaf..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_7a5f87ea5f66cdc5d63faa884f143d8d.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "cassandra_default_gc" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_88c962b2f6b2973adad220de49de5434.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_88c962b2f6b2973adad220de49de5434.lua new file mode 100644 index 0000000000..abac50c8a8 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_88c962b2f6b2973adad220de49de5434.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "cassandra_custom_debug" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_96be031162479dd3ece332c85f86ca03.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_96be031162479dd3ece332c85f86ca03.lua deleted file mode 100644 index de831eec4c..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_96be031162479dd3ece332c85f86ca03.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "cassandra_custom_system" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_b51d8a750808c077cda39320452b9376.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_b51d8a750808c077cda39320452b9376.lua new file mode 100644 index 0000000000..7d76a07dba --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_b51d8a750808c077cda39320452b9376.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "cassandra_syslog_system" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_b76c8d017773662442aa779bd143b0ff.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_b76c8d017773662442aa779bd143b0ff.lua new file mode 100644 index 0000000000..71191cb4c8 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_b76c8d017773662442aa779bd143b0ff.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "cassandra_custom_system" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_d5976f19ee30f0085aee3c0f60fbec30.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_d5976f19ee30f0085aee3c0f60fbec30.lua deleted file mode 100644 index 51fc867d70..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_d5976f19ee30f0085aee3c0f60fbec30.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "cassandra_syslog_gc" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_e7fe0f48b856d76eeaac31d9f0fe2c32.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_e7fe0f48b856d76eeaac31d9f0fe2c32.lua deleted file mode 100644 index cc336cc11e..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_e7fe0f48b856d76eeaac31d9f0fe2c32.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "cassandra_syslog_system" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_eed0cc7df8732fe7a329d6db03ae39dd.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_eed0cc7df8732fe7a329d6db03ae39dd.lua new file mode 100644 index 0000000000..ba9a030dca --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_eed0cc7df8732fe7a329d6db03ae39dd.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "cassandra_default_debug" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_f2378c2f70f95f9aab05887c77caaab0.lua b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_f2378c2f70f95f9aab05887c77caaab0.lua deleted file mode 100644 index 2d2e3f95d0..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_f2378c2f70f95f9aab05887c77caaab0.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "cassandra_syslog_debug" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_fluent_bit_main.conf index 56f99b6e71..5daa311b7b 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_cassandra_custom/golden_fluent_bit_main.conf @@ -208,7 +208,7 @@ Match cassandra_custom.cassandra_custom_debug Name lua call process - script 2a4dbe72a318b1e40ba6df5dac405838.lua + script 88c962b2f6b2973adad220de49de5434.lua [FILTER] Match cassandra_custom.cassandra_custom_gc @@ -226,7 +226,7 @@ Match cassandra_custom.cassandra_custom_gc Name lua call process - script 32bcfa11d261c222bf8c85cc59eb15f1.lua + script 38809b37c3a80ef2f9dbc3547c34040a.lua [FILTER] Match cassandra_custom.cassandra_custom_system @@ -274,7 +274,7 @@ Match cassandra_custom.cassandra_custom_system Name lua call process - script 96be031162479dd3ece332c85f86ca03.lua + script b76c8d017773662442aa779bd143b0ff.lua [FILTER] Match cassandra_default.cassandra_default_debug @@ -322,7 +322,7 @@ Match cassandra_default.cassandra_default_debug Name lua call process - script 16cee0fa84a0ba90b90b9fd6db2c5cae.lua + script eed0cc7df8732fe7a329d6db03ae39dd.lua [FILTER] Match cassandra_default.cassandra_default_gc @@ -340,7 +340,7 @@ Match cassandra_default.cassandra_default_gc Name lua call process - script 7a5f87ea5f66cdc5d63faa884f143d8d.lua + script 15d24e3425c4ee2442e8c3ad04495e72.lua [FILTER] Match cassandra_default.cassandra_default_system @@ -388,7 +388,7 @@ Match cassandra_default.cassandra_default_system Name lua call process - script 5f4c4fae3c114062082974ee7f00c4ca.lua + script 6e5dc283e6f99787042f87423072b313.lua [FILTER] Match cassandra_syslog_system.cassandra_syslog_debug @@ -490,7 +490,7 @@ Match cassandra_syslog_system.cassandra_syslog_debug Name lua call process - script f2378c2f70f95f9aab05887c77caaab0.lua + script 529e8f313b69a3646aa3688ba68198c3.lua [FILTER] Match cassandra_syslog_system.cassandra_syslog_gc @@ -592,7 +592,7 @@ Match cassandra_syslog_system.cassandra_syslog_gc Name lua call process - script d5976f19ee30f0085aee3c0f60fbec30.lua + script 43d159fcd743c8ccae7118d649802caa.lua [FILTER] Match cassandra_syslog_system.cassandra_syslog_system @@ -694,13 +694,13 @@ Match cassandra_syslog_system.cassandra_syslog_system Name lua call process - script e7fe0f48b856d76eeaac31d9f0fe2c32.lua + script b51d8a750808c077cda39320452b9376.lua [FILTER] Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(cassandra_custom\.cassandra_custom_debug|cassandra_custom\.cassandra_custom_gc|cassandra_custom\.cassandra_custom_system|cassandra_default\.cassandra_default_debug|cassandra_default\.cassandra_default_gc|cassandra_default\.cassandra_default_system|cassandra_syslog_system\.cassandra_syslog_debug|cassandra_syslog_system\.cassandra_syslog_gc|cassandra_syslog_system\.cassandra_syslog_system|default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_couchdb/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_couchdb/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_couchdb/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_couchdb/golden_6da87c7f2723e79663ea716ba06e8c19.lua b/confgenerator/testdata/valid/linux/logging-receiver_couchdb/golden_6da87c7f2723e79663ea716ba06e8c19.lua deleted file mode 100644 index a227d471b8..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_couchdb/golden_6da87c7f2723e79663ea716ba06e8c19.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "couchdb" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_couchdb/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_couchdb/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_couchdb/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_couchdb/golden_c14bbfe091f926b5c9aa086a886d7790.lua b/confgenerator/testdata/valid/linux/logging-receiver_couchdb/golden_c14bbfe091f926b5c9aa086a886d7790.lua new file mode 100644 index 0000000000..2e9969b2a8 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_couchdb/golden_c14bbfe091f926b5c9aa086a886d7790.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "couchdb" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_couchdb/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_couchdb/golden_fluent_bit_main.conf index da2eaa3232..00b5c46ceb 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_couchdb/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_couchdb/golden_fluent_bit_main.conf @@ -174,13 +174,13 @@ Match couchdb.couchdb Name lua call process - script 6da87c7f2723e79663ea716ba06e8c19.lua + script c14bbfe091f926b5c9aa086a886d7790.lua [FILTER] Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(couchdb\.couchdb|default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_76bf64e9056ce0958aa07c390e867011.lua b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_76bf64e9056ce0958aa07c390e867011.lua new file mode 100644 index 0000000000..a3ca7ccd3a --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_76bf64e9056ce0958aa07c390e867011.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "elasticsearch_json" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_c2a80cba55effa129b51db21c56ac662.lua b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_c2a80cba55effa129b51db21c56ac662.lua new file mode 100644 index 0000000000..0933f5843c --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_c2a80cba55effa129b51db21c56ac662.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "elasticsearch_gc" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_e8347457cd732a7720651844d81bdf85.lua b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_e8347457cd732a7720651844d81bdf85.lua deleted file mode 100644 index c3eec24cca..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_e8347457cd732a7720651844d81bdf85.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "elasticsearch_gc" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_e8f6fccb2f4285805fcd3593a850f7c8.lua b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_e8f6fccb2f4285805fcd3593a850f7c8.lua deleted file mode 100644 index 89adfd2394..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_e8f6fccb2f4285805fcd3593a850f7c8.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "elasticsearch_json" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_fluent_bit_main.conf index f8c7faeb89..9db1ae74db 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch/golden_fluent_bit_main.conf @@ -78,7 +78,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Key_Name message @@ -90,7 +90,7 @@ Match elasticsearch.elasticsearch_gc Name lua call process - script e8347457cd732a7720651844d81bdf85.lua + script c2a80cba55effa129b51db21c56ac662.lua [FILTER] Match elasticsearch.elasticsearch_json @@ -267,7 +267,7 @@ Match elasticsearch.elasticsearch_json Name lua call process - script e8f6fccb2f4285805fcd3593a850f7c8.lua + script 76bf64e9056ce0958aa07c390e867011.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|elasticsearch\.elasticsearch_gc|elasticsearch\.elasticsearch_json)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_030829cd063ef5d046960a3643675283.lua b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_030829cd063ef5d046960a3643675283.lua deleted file mode 100644 index 8a8b10b310..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_030829cd063ef5d046960a3643675283.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "elasticsearch_json_custom" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_2831993fc0f12c6cffbff73687c38a18.lua b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_2831993fc0f12c6cffbff73687c38a18.lua deleted file mode 100644 index 29e5b5d829..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_2831993fc0f12c6cffbff73687c38a18.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "elasticsearch_gc_default" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_589f616df309aeceb15b5b6c2db7e355.lua b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_589f616df309aeceb15b5b6c2db7e355.lua deleted file mode 100644 index 9d2d3d8c21..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_589f616df309aeceb15b5b6c2db7e355.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "elasticsearch_gc_custom" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_5af87cc90afef5c8108c78c06c626840.lua b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_5af87cc90afef5c8108c78c06c626840.lua new file mode 100644 index 0000000000..f926024f8c --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_5af87cc90afef5c8108c78c06c626840.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "elasticsearch_gc_custom" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_6ffb6e5fd7246019b44a3f25d7cb83a5.lua b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_6ffb6e5fd7246019b44a3f25d7cb83a5.lua deleted file mode 100644 index 01bd8ef023..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_6ffb6e5fd7246019b44a3f25d7cb83a5.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "elasticsearch_json_default" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_a0daf136962b5a4a5c4796b21a3e7211.lua b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_a0daf136962b5a4a5c4796b21a3e7211.lua new file mode 100644 index 0000000000..310be6ae2e --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_a0daf136962b5a4a5c4796b21a3e7211.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "elasticsearch_gc_default" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_baef28995b4679427404badf38d56055.lua b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_baef28995b4679427404badf38d56055.lua new file mode 100644 index 0000000000..5d9c013e50 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_baef28995b4679427404badf38d56055.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "elasticsearch_json_default" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_da19102242600460bea388945f124b31.lua b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_da19102242600460bea388945f124b31.lua new file mode 100644 index 0000000000..8143804992 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_da19102242600460bea388945f124b31.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "elasticsearch_json_custom" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_fluent_bit_main.conf index 17877bc259..a934aa7614 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_elasticsearch_custom/golden_fluent_bit_main.conf @@ -109,7 +109,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Key_Name message @@ -121,7 +121,7 @@ Match elasticsearch_custom.elasticsearch_gc_custom Name lua call process - script 589f616df309aeceb15b5b6c2db7e355.lua + script 5af87cc90afef5c8108c78c06c626840.lua [FILTER] Match elasticsearch_custom.elasticsearch_json_custom @@ -298,7 +298,7 @@ Match elasticsearch_custom.elasticsearch_json_custom Name lua call process - script 030829cd063ef5d046960a3643675283.lua + script da19102242600460bea388945f124b31.lua [FILTER] Key_Name message @@ -310,7 +310,7 @@ Match elasticsearch_default.elasticsearch_gc_default Name lua call process - script 2831993fc0f12c6cffbff73687c38a18.lua + script a0daf136962b5a4a5c4796b21a3e7211.lua [FILTER] Match elasticsearch_default.elasticsearch_json_default @@ -487,7 +487,7 @@ Match elasticsearch_default.elasticsearch_json_default Name lua call process - script 6ffb6e5fd7246019b44a3f25d7cb83a5.lua + script baef28995b4679427404badf38d56055.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|elasticsearch_custom\.elasticsearch_gc_custom|elasticsearch_custom\.elasticsearch_json_custom|elasticsearch_default\.elasticsearch_gc_default|elasticsearch_default\.elasticsearch_json_default)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_files_refresh_interval/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_files_refresh_interval/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_files_refresh_interval/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_files_refresh_interval/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_files_refresh_interval/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_files_refresh_interval/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_files_refresh_interval/golden_bbe493b54b165ca3149fd2168216ea97.lua b/confgenerator/testdata/valid/linux/logging-receiver_files_refresh_interval/golden_bbe493b54b165ca3149fd2168216ea97.lua deleted file mode 100644 index 3cee714d27..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_files_refresh_interval/golden_bbe493b54b165ca3149fd2168216ea97.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "log_source_id1" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_files_refresh_interval/golden_fc00cb02b9b88c98bb35ef80a02c314d.lua b/confgenerator/testdata/valid/linux/logging-receiver_files_refresh_interval/golden_fc00cb02b9b88c98bb35ef80a02c314d.lua new file mode 100644 index 0000000000..74d61bd410 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_files_refresh_interval/golden_fc00cb02b9b88c98bb35ef80a02c314d.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "log_source_id1" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_files_refresh_interval/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_files_refresh_interval/golden_fluent_bit_main.conf index d21cbeb98c..051a5633d2 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_files_refresh_interval/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_files_refresh_interval/golden_fluent_bit_main.conf @@ -64,13 +64,13 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Match pipeline1.log_source_id1 Name lua call process - script bbe493b54b165ca3149fd2168216ea97.lua + script fc00cb02b9b88c98bb35ef80a02c314d.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|pipeline1\.log_source_id1)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_0178b8aee3683881d91ae79636ea7dca.lua b/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_0178b8aee3683881d91ae79636ea7dca.lua deleted file mode 100644 index b7dc709103..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_0178b8aee3683881d91ae79636ea7dca.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "log_source_id4" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_09a434cd2561e0dcc948fa3d2c546e77.lua b/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_09a434cd2561e0dcc948fa3d2c546e77.lua new file mode 100644 index 0000000000..a4032ea1d1 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_09a434cd2561e0dcc948fa3d2c546e77.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "log_source_id4" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_13322ed6829712e9e8004b6705b58020.lua b/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_13322ed6829712e9e8004b6705b58020.lua new file mode 100644 index 0000000000..80256c7c66 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_13322ed6829712e9e8004b6705b58020.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "log_source_id2" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_1aa4af277d04089b57238b94e3349d51.lua b/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_1aa4af277d04089b57238b94e3349d51.lua new file mode 100644 index 0000000000..5a4896fba7 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_1aa4af277d04089b57238b94e3349d51.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "log_source_id5" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_1ec8e7194dc323eae05fc334c4774b6c.lua b/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_1ec8e7194dc323eae05fc334c4774b6c.lua deleted file mode 100644 index 54fd849ea7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_1ec8e7194dc323eae05fc334c4774b6c.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "log_source_id3" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_8760f287fc56f18df78eaa4cb285d0c7.lua b/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_8760f287fc56f18df78eaa4cb285d0c7.lua deleted file mode 100644 index 5dc274b367..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_8760f287fc56f18df78eaa4cb285d0c7.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "log_source_id5" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_a8d53383411830cfac4f0703a037ce13.lua b/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_a8d53383411830cfac4f0703a037ce13.lua deleted file mode 100644 index 84aad71ea2..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_a8d53383411830cfac4f0703a037ce13.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "log_source_id2" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_bbe493b54b165ca3149fd2168216ea97.lua b/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_bbe493b54b165ca3149fd2168216ea97.lua deleted file mode 100644 index 3cee714d27..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_bbe493b54b165ca3149fd2168216ea97.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "log_source_id1" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_ec2c5083dc004566bcdff6045989da6e.lua b/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_ec2c5083dc004566bcdff6045989da6e.lua new file mode 100644 index 0000000000..f9e36d1d09 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_ec2c5083dc004566bcdff6045989da6e.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "log_source_id3" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_fc00cb02b9b88c98bb35ef80a02c314d.lua b/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_fc00cb02b9b88c98bb35ef80a02c314d.lua new file mode 100644 index 0000000000..74d61bd410 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_fc00cb02b9b88c98bb35ef80a02c314d.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "log_source_id1" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_fluent_bit_main.conf index 51668836c1..10412edc45 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_files_type_multiple_receivers/golden_fluent_bit_main.conf @@ -107,25 +107,25 @@ Match pipeline1.log_source_id1 Name lua call process - script bbe493b54b165ca3149fd2168216ea97.lua + script fc00cb02b9b88c98bb35ef80a02c314d.lua [FILTER] Match pipeline2.log_source_id2 Name lua call process - script a8d53383411830cfac4f0703a037ce13.lua + script 13322ed6829712e9e8004b6705b58020.lua [FILTER] Match pipeline3.log_source_id3 Name lua call process - script 1ec8e7194dc323eae05fc334c4774b6c.lua + script ec2c5083dc004566bcdff6045989da6e.lua [FILTER] Match pipeline4.log_source_id4 Name lua call process - script 0178b8aee3683881d91ae79636ea7dca.lua + script 09a434cd2561e0dcc948fa3d2c546e77.lua [FILTER] Key_Name key_5 @@ -137,7 +137,7 @@ Match pipeline5.log_source_id5 Name lua call process - script 8760f287fc56f18df78eaa4cb285d0c7.lua + script 1aa4af277d04089b57238b94e3349d51.lua [OUTPUT] Match_Regex ^(pipeline1\.log_source_id1|pipeline2\.log_source_id2|pipeline3\.log_source_id3|pipeline4\.log_source_id4|pipeline5\.log_source_id5)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_forward/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_forward/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_forward/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_forward/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward/golden_a3eabc23ba84e6a376b80830a8b6be44.lua b/confgenerator/testdata/valid/linux/logging-receiver_forward/golden_a3eabc23ba84e6a376b80830a8b6be44.lua new file mode 100644 index 0000000000..152ed6d5a6 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_forward/golden_a3eabc23ba84e6a376b80830a8b6be44.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "fluent_forward" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward/golden_a83c0f5669e171e4bde3b3536fd0f660.lua b/confgenerator/testdata/valid/linux/logging-receiver_forward/golden_a83c0f5669e171e4bde3b3536fd0f660.lua deleted file mode 100644 index a4380e3270..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_forward/golden_a83c0f5669e171e4bde3b3536fd0f660.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "fluent_forward" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_forward/golden_fluent_bit_main.conf index 21ee0e2651..db0c24d6a9 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_forward/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_forward/golden_fluent_bit_main.conf @@ -57,13 +57,13 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Match e8195f91348f8a6c3c046a4e5e97bc49.fluent_forward.fluent_forward.* Name lua call process - script a83c0f5669e171e4bde3b3536fd0f660.lua + script a3eabc23ba84e6a376b80830a8b6be44.lua [FILTER] Match e8195f91348f8a6c3c046a4e5e97bc49.fluent_forward.fluent_forward.* diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_760401a131c642f0df0e28c01cd3d845.lua b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_760401a131c642f0df0e28c01cd3d845.lua new file mode 100644 index 0000000000..35a7499673 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_760401a131c642f0df0e28c01cd3d845.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "fluent_forward.collision" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_9d2af93f18df924fcc355b0069cbbd15.lua b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_9d2af93f18df924fcc355b0069cbbd15.lua deleted file mode 100644 index 99a154d2cf..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_9d2af93f18df924fcc355b0069cbbd15.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "fluent_forward.collision" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_a3eabc23ba84e6a376b80830a8b6be44.lua b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_a3eabc23ba84e6a376b80830a8b6be44.lua new file mode 100644 index 0000000000..152ed6d5a6 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_a3eabc23ba84e6a376b80830a8b6be44.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "fluent_forward" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_a83c0f5669e171e4bde3b3536fd0f660.lua b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_a83c0f5669e171e4bde3b3536fd0f660.lua deleted file mode 100644 index a4380e3270..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_a83c0f5669e171e4bde3b3536fd0f660.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "fluent_forward" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_fluent_bit_main.conf index ca0911ff53..dba8b23704 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_conflicting_id/golden_fluent_bit_main.conf @@ -65,7 +65,7 @@ Match 3d1e3d2de8297b94d50f1b791772d4f9.fluent_forward.fluent_forward_collision.* Name lua call process - script 9d2af93f18df924fcc355b0069cbbd15.lua + script 760401a131c642f0df0e28c01cd3d845.lua [FILTER] Match 3d1e3d2de8297b94d50f1b791772d4f9.fluent_forward.fluent_forward_collision.* @@ -77,13 +77,13 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Match e8195f91348f8a6c3c046a4e5e97bc49.fluent_forward.fluent_forward.* Name lua call process - script a83c0f5669e171e4bde3b3536fd0f660.lua + script a3eabc23ba84e6a376b80830a8b6be44.lua [FILTER] Match e8195f91348f8a6c3c046a4e5e97bc49.fluent_forward.fluent_forward.* diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_a3eabc23ba84e6a376b80830a8b6be44.lua b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_a3eabc23ba84e6a376b80830a8b6be44.lua new file mode 100644 index 0000000000..152ed6d5a6 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_a3eabc23ba84e6a376b80830a8b6be44.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "fluent_forward" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_a83c0f5669e171e4bde3b3536fd0f660.lua b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_a83c0f5669e171e4bde3b3536fd0f660.lua deleted file mode 100644 index a4380e3270..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_a83c0f5669e171e4bde3b3536fd0f660.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "fluent_forward" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_acc6b2fe7abb87a96837a0b390c17510.lua b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_acc6b2fe7abb87a96837a0b390c17510.lua new file mode 100644 index 0000000000..7ffa23defb --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_acc6b2fe7abb87a96837a0b390c17510.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "fluent.forward" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_d087376a23471ac19283353be2da3467.lua b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_d087376a23471ac19283353be2da3467.lua deleted file mode 100644 index d09e4db016..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_d087376a23471ac19283353be2da3467.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "fluent.forward" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_fluent_bit_main.conf index 03537194fa..c35c53b1f8 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_forward_multiple_receivers_with_dot/golden_fluent_bit_main.conf @@ -65,7 +65,7 @@ Match 770ecc55c94dd06217c2f78e09580174.fluent_forward.fluent_forward.* Name lua call process - script d087376a23471ac19283353be2da3467.lua + script acc6b2fe7abb87a96837a0b390c17510.lua [FILTER] Match 770ecc55c94dd06217c2f78e09580174.fluent_forward.fluent_forward.* @@ -77,13 +77,13 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Match e8195f91348f8a6c3c046a4e5e97bc49.fluent_forward.fluent_forward.* Name lua call process - script a83c0f5669e171e4bde3b3536fd0f660.lua + script a3eabc23ba84e6a376b80830a8b6be44.lua [FILTER] Match e8195f91348f8a6c3c046a4e5e97bc49.fluent_forward.fluent_forward.* diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward_omitting_optional_parameters/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_forward_omitting_optional_parameters/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_forward_omitting_optional_parameters/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward_omitting_optional_parameters/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_forward_omitting_optional_parameters/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_forward_omitting_optional_parameters/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward_omitting_optional_parameters/golden_cdf8fdb97d4e260bc8fcdc601780733b.lua b/confgenerator/testdata/valid/linux/logging-receiver_forward_omitting_optional_parameters/golden_cdf8fdb97d4e260bc8fcdc601780733b.lua new file mode 100644 index 0000000000..06ad947612 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_forward_omitting_optional_parameters/golden_cdf8fdb97d4e260bc8fcdc601780733b.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "fluent_logs" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward_omitting_optional_parameters/golden_e7959b2d3b45d640ba349e061cd5843c.lua b/confgenerator/testdata/valid/linux/logging-receiver_forward_omitting_optional_parameters/golden_e7959b2d3b45d640ba349e061cd5843c.lua deleted file mode 100644 index 5a9c53b186..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_forward_omitting_optional_parameters/golden_e7959b2d3b45d640ba349e061cd5843c.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "fluent_logs" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_forward_omitting_optional_parameters/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_forward_omitting_optional_parameters/golden_fluent_bit_main.conf index 3ffd5fbfd1..d7f5cc2193 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_forward_omitting_optional_parameters/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_forward_omitting_optional_parameters/golden_fluent_bit_main.conf @@ -57,7 +57,7 @@ Match b6547699ccacdc03ba6ae458f9ee5860.fluent_pipeline.fluent_logs.* Name lua call process - script e7959b2d3b45d640ba349e061cd5843c.lua + script cdf8fdb97d4e260bc8fcdc601780733b.lua [FILTER] Match b6547699ccacdc03ba6ae458f9ee5860.fluent_pipeline.fluent_logs.* @@ -69,7 +69,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(b6547699ccacdc03ba6ae458f9ee5860\.fluent_pipeline\.fluent_logs\..*|default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_hadoop/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_hadoop/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_hadoop/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_hadoop/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_hadoop/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_hadoop/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_hadoop/golden_b431ed27a7d8031def165a308dc2c38e.lua b/confgenerator/testdata/valid/linux/logging-receiver_hadoop/golden_b431ed27a7d8031def165a308dc2c38e.lua deleted file mode 100644 index 996114b93b..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_hadoop/golden_b431ed27a7d8031def165a308dc2c38e.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "hadoop" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_hadoop/golden_ba5d71eb373f68e2b7d464800f462d8b.lua b/confgenerator/testdata/valid/linux/logging-receiver_hadoop/golden_ba5d71eb373f68e2b7d464800f462d8b.lua new file mode 100644 index 0000000000..d0bae483e9 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_hadoop/golden_ba5d71eb373f68e2b7d464800f462d8b.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "hadoop" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_hadoop/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_hadoop/golden_fluent_bit_main.conf index b61d407775..f233e35522 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_hadoop/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_hadoop/golden_fluent_bit_main.conf @@ -64,7 +64,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Match hadoop.hadoop @@ -137,7 +137,7 @@ Match hadoop.hadoop Name lua call process - script b431ed27a7d8031def165a308dc2c38e.lua + script ba5d71eb373f68e2b7d464800f462d8b.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|hadoop\.hadoop)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_hadoop_refresh_interval/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_hadoop_refresh_interval/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_hadoop_refresh_interval/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_hadoop_refresh_interval/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_hadoop_refresh_interval/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_hadoop_refresh_interval/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_hadoop_refresh_interval/golden_b431ed27a7d8031def165a308dc2c38e.lua b/confgenerator/testdata/valid/linux/logging-receiver_hadoop_refresh_interval/golden_b431ed27a7d8031def165a308dc2c38e.lua deleted file mode 100644 index 996114b93b..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_hadoop_refresh_interval/golden_b431ed27a7d8031def165a308dc2c38e.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "hadoop" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_hadoop_refresh_interval/golden_ba5d71eb373f68e2b7d464800f462d8b.lua b/confgenerator/testdata/valid/linux/logging-receiver_hadoop_refresh_interval/golden_ba5d71eb373f68e2b7d464800f462d8b.lua new file mode 100644 index 0000000000..d0bae483e9 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_hadoop_refresh_interval/golden_ba5d71eb373f68e2b7d464800f462d8b.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "hadoop" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_hadoop_refresh_interval/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_hadoop_refresh_interval/golden_fluent_bit_main.conf index 5a78cfc735..3343f92763 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_hadoop_refresh_interval/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_hadoop_refresh_interval/golden_fluent_bit_main.conf @@ -65,7 +65,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Match hadoop.hadoop @@ -138,7 +138,7 @@ Match hadoop.hadoop Name lua call process - script b431ed27a7d8031def165a308dc2c38e.lua + script ba5d71eb373f68e2b7d464800f462d8b.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|hadoop\.hadoop)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_hbase/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_hbase/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_hbase/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_hbase/golden_6168bdd2de9b128415fbd1b331fce3f8.lua b/confgenerator/testdata/valid/linux/logging-receiver_hbase/golden_6168bdd2de9b128415fbd1b331fce3f8.lua deleted file mode 100644 index f257c698a5..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_hbase/golden_6168bdd2de9b128415fbd1b331fce3f8.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "hbase_system" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_hbase/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_hbase/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_hbase/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_hbase/golden_97f815ebb4d1a13803b3742ef7891dc3.lua b/confgenerator/testdata/valid/linux/logging-receiver_hbase/golden_97f815ebb4d1a13803b3742ef7891dc3.lua new file mode 100644 index 0000000000..c7d91fb0ab --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_hbase/golden_97f815ebb4d1a13803b3742ef7891dc3.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "hbase_system" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_hbase/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_hbase/golden_fluent_bit_main.conf index db43f42397..34684589aa 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_hbase/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_hbase/golden_fluent_bit_main.conf @@ -63,7 +63,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Match hbase.hbase_system @@ -123,7 +123,7 @@ Match hbase.hbase_system Name lua call process - script 6168bdd2de9b128415fbd1b331fce3f8.lua + script 97f815ebb4d1a13803b3742ef7891dc3.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|hbase\.hbase_system)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_kafka/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_kafka/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_kafka/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_kafka/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_kafka/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_kafka/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_kafka/golden_f035d07b2df61f13b41c1d38561d6e50.lua b/confgenerator/testdata/valid/linux/logging-receiver_kafka/golden_f035d07b2df61f13b41c1d38561d6e50.lua new file mode 100644 index 0000000000..9fe0250f57 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_kafka/golden_f035d07b2df61f13b41c1d38561d6e50.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "kafka" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_kafka/golden_f31567f68d5f04ba973b6a18c4f2ae0e.lua b/confgenerator/testdata/valid/linux/logging-receiver_kafka/golden_f31567f68d5f04ba973b6a18c4f2ae0e.lua deleted file mode 100644 index 022300766d..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_kafka/golden_f31567f68d5f04ba973b6a18c4f2ae0e.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "kafka" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_kafka/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_kafka/golden_fluent_bit_main.conf index 4ef7b2e00c..9d19e2d5ef 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_kafka/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_kafka/golden_fluent_bit_main.conf @@ -63,7 +63,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Match kafka.kafka @@ -123,7 +123,7 @@ Match kafka.kafka Name lua call process - script f31567f68d5f04ba973b6a18c4f2ae0e.lua + script f035d07b2df61f13b41c1d38561d6e50.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|kafka\.kafka)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_431c0e7dae690a43ec758b246ba80707.lua b/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_431c0e7dae690a43ec758b246ba80707.lua new file mode 100644 index 0000000000..7a7cb3b7d9 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_431c0e7dae690a43ec758b246ba80707.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "kafka_syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_6cca67f5ca620e10dc5ec1e2c14cfcc9.lua b/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_6cca67f5ca620e10dc5ec1e2c14cfcc9.lua deleted file mode 100644 index 3301146452..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_6cca67f5ca620e10dc5ec1e2c14cfcc9.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "kafka_syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_7fe47fb52f09fd772c7e67bf28a8c1ef.lua b/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_7fe47fb52f09fd772c7e67bf28a8c1ef.lua deleted file mode 100644 index edc85b2db8..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_7fe47fb52f09fd772c7e67bf28a8c1ef.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "kafka_custom" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_8154dfc96eea220fedc3b5c8b309d0f9.lua b/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_8154dfc96eea220fedc3b5c8b309d0f9.lua new file mode 100644 index 0000000000..c8a8d37f82 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_8154dfc96eea220fedc3b5c8b309d0f9.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "kafka_custom" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_fluent_bit_main.conf index 2a82fd76fe..5653f1aaec 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_kafka_custom/golden_fluent_bit_main.conf @@ -74,7 +74,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Match kafka_custom.kafka_custom @@ -134,7 +134,7 @@ Match kafka_custom.kafka_custom Name lua call process - script 7fe47fb52f09fd772c7e67bf28a8c1ef.lua + script 8154dfc96eea220fedc3b5c8b309d0f9.lua [FILTER] Match kafka_syslog.kafka_syslog @@ -194,7 +194,7 @@ Match kafka_syslog.kafka_syslog Name lua call process - script 6cca67f5ca620e10dc5ec1e2c14cfcc9.lua + script 431c0e7dae690a43ec758b246ba80707.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|kafka_custom\.kafka_custom|kafka_syslog\.kafka_syslog)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mongodb/golden_01787fd704954ce734de930827701aa3.lua b/confgenerator/testdata/valid/linux/logging-receiver_mongodb/golden_01787fd704954ce734de930827701aa3.lua new file mode 100644 index 0000000000..1ac8bd555a --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_mongodb/golden_01787fd704954ce734de930827701aa3.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "mongodb" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mongodb/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_mongodb/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_mongodb/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mongodb/golden_64b436b3407b83295dab70e5550658e3.lua b/confgenerator/testdata/valid/linux/logging-receiver_mongodb/golden_64b436b3407b83295dab70e5550658e3.lua deleted file mode 100644 index a6c8580ba0..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_mongodb/golden_64b436b3407b83295dab70e5550658e3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "mongodb" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mongodb/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_mongodb/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_mongodb/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mongodb/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_mongodb/golden_fluent_bit_main.conf index 0f2abab35e..f783be2374 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_mongodb/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_mongodb/golden_fluent_bit_main.conf @@ -63,7 +63,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Key_Name message @@ -214,7 +214,7 @@ Match mongodb.mongodb Name lua call process - script 64b436b3407b83295dab70e5550658e3.lua + script 01787fd704954ce734de930827701aa3.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|mongodb\.mongodb)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_768a38fc80033b430eb05b4c18bfaed6.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_768a38fc80033b430eb05b4c18bfaed6.lua deleted file mode 100644 index 8e0881f386..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_768a38fc80033b430eb05b4c18bfaed6.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "mysql_error" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_99715c771d0b90168f2df22fe2a90dbf.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_99715c771d0b90168f2df22fe2a90dbf.lua new file mode 100644 index 0000000000..214aaf94c2 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_99715c771d0b90168f2df22fe2a90dbf.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "mysql_error" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_9faf2202c2729c1379d0ba88ab68ca0d.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_9faf2202c2729c1379d0ba88ab68ca0d.lua new file mode 100644 index 0000000000..43f8bc8307 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_9faf2202c2729c1379d0ba88ab68ca0d.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "mysql_general" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_b1d0a6f6d83f503cf665a5bbd390dca9.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_b1d0a6f6d83f503cf665a5bbd390dca9.lua new file mode 100644 index 0000000000..ab100ea8cd --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_b1d0a6f6d83f503cf665a5bbd390dca9.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "mysql_slow" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_cd00ee3ad395828f33ee57afc36abd95.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_cd00ee3ad395828f33ee57afc36abd95.lua deleted file mode 100644 index 8a9792219f..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_cd00ee3ad395828f33ee57afc36abd95.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "mysql_slow" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_d8c4c2df9d304036967a9b4b17c8ba06.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_d8c4c2df9d304036967a9b4b17c8ba06.lua deleted file mode 100644 index 4e80104319..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_d8c4c2df9d304036967a9b4b17c8ba06.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "mysql_general" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_fluent_bit_main.conf index ad0117c9b3..e9e151f040 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_mysql/golden_fluent_bit_main.conf @@ -91,7 +91,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Key_Name message @@ -153,7 +153,7 @@ Match mysql.mysql_error Name lua call process - script 768a38fc80033b430eb05b4c18bfaed6.lua + script 99715c771d0b90168f2df22fe2a90dbf.lua [FILTER] Match mysql.mysql_general @@ -171,7 +171,7 @@ Match mysql.mysql_general Name lua call process - script d8c4c2df9d304036967a9b4b17c8ba06.lua + script 9faf2202c2729c1379d0ba88ab68ca0d.lua [FILTER] Match mysql.mysql_slow @@ -189,7 +189,7 @@ Match mysql.mysql_slow Name lua call process - script cd00ee3ad395828f33ee57afc36abd95.lua + script b1d0a6f6d83f503cf665a5bbd390dca9.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|mysql\.mysql_error|mysql\.mysql_general|mysql\.mysql_slow)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_3a8e907c4b36f933f88600bcc39e7181.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_3a8e907c4b36f933f88600bcc39e7181.lua new file mode 100644 index 0000000000..c38b9a5d8a --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_3a8e907c4b36f933f88600bcc39e7181.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "mysql_custom_error" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_3a9ffb80a7eddaed2008b8d89d3af7e7.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_3a9ffb80a7eddaed2008b8d89d3af7e7.lua deleted file mode 100644 index 621e3d8363..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_3a9ffb80a7eddaed2008b8d89d3af7e7.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "mysql_default_slow" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_463316a64d4d1f658240ce750d2ddd47.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_463316a64d4d1f658240ce750d2ddd47.lua new file mode 100644 index 0000000000..a865cfb4bf --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_463316a64d4d1f658240ce750d2ddd47.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "mysql_default_slow" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_5e604b6e56b9b8bc02a5b0484d618f58.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_5e604b6e56b9b8bc02a5b0484d618f58.lua deleted file mode 100644 index 51f25df307..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_5e604b6e56b9b8bc02a5b0484d618f58.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "mysql_custom_error" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_62732472526b34619943f90536fb269b.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_62732472526b34619943f90536fb269b.lua new file mode 100644 index 0000000000..80c109d8c3 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_62732472526b34619943f90536fb269b.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "mysql_default_error" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_76d5f8afd8434a587c4fdb9ece34f452.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_76d5f8afd8434a587c4fdb9ece34f452.lua deleted file mode 100644 index 60fc0c7cae..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_76d5f8afd8434a587c4fdb9ece34f452.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "mysql_syslog_general" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_85a03b1eedf76f5ca41c18721bfb09d9.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_85a03b1eedf76f5ca41c18721bfb09d9.lua deleted file mode 100644 index e93ba0973c..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_85a03b1eedf76f5ca41c18721bfb09d9.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "mysql_custom_slow" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_8d79e1a390fd215178fef3448bd7239d.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_8d79e1a390fd215178fef3448bd7239d.lua new file mode 100644 index 0000000000..29a0a16334 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_8d79e1a390fd215178fef3448bd7239d.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "mysql_syslog_error" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_91f3791dc2b0fbfb58121f3531a78fd1.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_91f3791dc2b0fbfb58121f3531a78fd1.lua deleted file mode 100644 index 364e6fff38..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_91f3791dc2b0fbfb58121f3531a78fd1.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "mysql_custom_general" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_ab3229e8c3e70db7f7a27b839251af1b.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_ab3229e8c3e70db7f7a27b839251af1b.lua new file mode 100644 index 0000000000..a5546f52c4 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_ab3229e8c3e70db7f7a27b839251af1b.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "mysql_custom_general" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_c3525ed3702c222633bb5ddeb5030580.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_c3525ed3702c222633bb5ddeb5030580.lua new file mode 100644 index 0000000000..734786f99d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_c3525ed3702c222633bb5ddeb5030580.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "mysql_default_general" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_d2779f613766cebafd5be2f317136fc1.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_d2779f613766cebafd5be2f317136fc1.lua new file mode 100644 index 0000000000..b9114ca100 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_d2779f613766cebafd5be2f317136fc1.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "mysql_syslog_general" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_d5bc6e3ba310cb371336ebb2e67e4b2e.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_d5bc6e3ba310cb371336ebb2e67e4b2e.lua new file mode 100644 index 0000000000..f5c10c1ef2 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_d5bc6e3ba310cb371336ebb2e67e4b2e.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "mysql_syslog_slow" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_ebb1a7f935b239f929d21a41bba7f8a5.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_ebb1a7f935b239f929d21a41bba7f8a5.lua deleted file mode 100644 index 9f6ad0f429..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_ebb1a7f935b239f929d21a41bba7f8a5.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "mysql_default_error" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_ebf288371118ca6cd96ac7ad4f89bca2.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_ebf288371118ca6cd96ac7ad4f89bca2.lua deleted file mode 100644 index 0a8c583e22..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_ebf288371118ca6cd96ac7ad4f89bca2.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "mysql_syslog_slow" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_f041813ad5190ce7d4e260d6382039ca.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_f041813ad5190ce7d4e260d6382039ca.lua deleted file mode 100644 index ba5f1ec503..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_f041813ad5190ce7d4e260d6382039ca.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "mysql_default_general" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_f5535695acae2b0a2452c572fbd894b5.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_f5535695acae2b0a2452c572fbd894b5.lua deleted file mode 100644 index d4067d5604..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_f5535695acae2b0a2452c572fbd894b5.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "mysql_syslog_error" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_fe156f60348ecb9e58ad56cafd371df1.lua b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_fe156f60348ecb9e58ad56cafd371df1.lua new file mode 100644 index 0000000000..54fe65ee5e --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_fe156f60348ecb9e58ad56cafd371df1.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "mysql_custom_slow" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_fluent_bit_main.conf index c67192db8d..cd04428009 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_mysql_custom/golden_fluent_bit_main.conf @@ -166,7 +166,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Key_Name message @@ -228,7 +228,7 @@ Match mysql_custom.mysql_custom_error Name lua call process - script 5e604b6e56b9b8bc02a5b0484d618f58.lua + script 3a8e907c4b36f933f88600bcc39e7181.lua [FILTER] Match mysql_custom.mysql_custom_general @@ -246,7 +246,7 @@ Match mysql_custom.mysql_custom_general Name lua call process - script 91f3791dc2b0fbfb58121f3531a78fd1.lua + script ab3229e8c3e70db7f7a27b839251af1b.lua [FILTER] Match mysql_custom.mysql_custom_slow @@ -264,7 +264,7 @@ Match mysql_custom.mysql_custom_slow Name lua call process - script 85a03b1eedf76f5ca41c18721bfb09d9.lua + script fe156f60348ecb9e58ad56cafd371df1.lua [FILTER] Key_Name message @@ -326,7 +326,7 @@ Match mysql_default.mysql_default_error Name lua call process - script ebb1a7f935b239f929d21a41bba7f8a5.lua + script 62732472526b34619943f90536fb269b.lua [FILTER] Match mysql_default.mysql_default_general @@ -344,7 +344,7 @@ Match mysql_default.mysql_default_general Name lua call process - script f041813ad5190ce7d4e260d6382039ca.lua + script c3525ed3702c222633bb5ddeb5030580.lua [FILTER] Match mysql_default.mysql_default_slow @@ -362,7 +362,7 @@ Match mysql_default.mysql_default_slow Name lua call process - script 3a9ffb80a7eddaed2008b8d89d3af7e7.lua + script 463316a64d4d1f658240ce750d2ddd47.lua [FILTER] Key_Name message @@ -448,7 +448,7 @@ Match mysql_syslog_error.mysql_syslog_error Name lua call process - script f5535695acae2b0a2452c572fbd894b5.lua + script 8d79e1a390fd215178fef3448bd7239d.lua [FILTER] Key_Name message @@ -534,7 +534,7 @@ Match mysql_syslog_error.mysql_syslog_general Name lua call process - script 76d5f8afd8434a587c4fdb9ece34f452.lua + script d2779f613766cebafd5be2f317136fc1.lua [FILTER] Key_Name message @@ -620,7 +620,7 @@ Match mysql_syslog_error.mysql_syslog_slow Name lua call process - script ebf288371118ca6cd96ac7ad4f89bca2.lua + script d5bc6e3ba310cb371336ebb2e67e4b2e.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|mysql_custom\.mysql_custom_error|mysql_custom\.mysql_custom_general|mysql_custom\.mysql_custom_slow|mysql_default\.mysql_default_error|mysql_default\.mysql_default_general|mysql_default\.mysql_default_slow|mysql_syslog_error\.mysql_syslog_error|mysql_syslog_error\.mysql_syslog_general|mysql_syslog_error\.mysql_syslog_slow)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_1e2f5c807bf365dad4782fbc25ddee5a.lua b/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_1e2f5c807bf365dad4782fbc25ddee5a.lua new file mode 100644 index 0000000000..7e01b33d22 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_1e2f5c807bf365dad4782fbc25ddee5a.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "nginx_error" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_6f8867a89abb0da7851f00e1487052af.lua b/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_6f8867a89abb0da7851f00e1487052af.lua deleted file mode 100644 index 211046c6a7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_6f8867a89abb0da7851f00e1487052af.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "nginx_access" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_e5f211a490478c64478e2746564ddba9.lua b/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_e5f211a490478c64478e2746564ddba9.lua new file mode 100644 index 0000000000..1676d467b7 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_e5f211a490478c64478e2746564ddba9.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "nginx_access" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_f0d3dd281452a5e9c4d822d27f08b381.lua b/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_f0d3dd281452a5e9c4d822d27f08b381.lua deleted file mode 100644 index 2df574dbca..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_f0d3dd281452a5e9c4d822d27f08b381.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "nginx_error" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_fluent_bit_main.conf index 8b70080cb3..710900652e 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_nginx/golden_fluent_bit_main.conf @@ -77,7 +77,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Key_Name message @@ -115,7 +115,7 @@ Match nginx.nginx_access Name lua call process - script 6f8867a89abb0da7851f00e1487052af.lua + script e5f211a490478c64478e2746564ddba9.lua [FILTER] Key_Name message @@ -175,7 +175,7 @@ Match nginx.nginx_error Name lua call process - script f0d3dd281452a5e9c4d822d27f08b381.lua + script 1e2f5c807bf365dad4782fbc25ddee5a.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|nginx\.nginx_access|nginx\.nginx_error)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_1317a70e915d0b2b68c18e35b044245e.lua b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_1317a70e915d0b2b68c18e35b044245e.lua deleted file mode 100644 index 7a81a8a9ee..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_1317a70e915d0b2b68c18e35b044245e.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "nginx_custom_error" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_3507409c9d6a13a2f12bd974995090fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_3507409c9d6a13a2f12bd974995090fc.lua deleted file mode 100644 index 2a4614a7ae..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_3507409c9d6a13a2f12bd974995090fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "nginx_default_access" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_4a5edd4b2b0d56f14ab1bf9672472f14.lua b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_4a5edd4b2b0d56f14ab1bf9672472f14.lua new file mode 100644 index 0000000000..8fae35e346 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_4a5edd4b2b0d56f14ab1bf9672472f14.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "nginx_custom_access" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_4aa51eba6d18c7471a583a4779a7455b.lua b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_4aa51eba6d18c7471a583a4779a7455b.lua new file mode 100644 index 0000000000..f346caff2b --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_4aa51eba6d18c7471a583a4779a7455b.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "nginx_syslog_access" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_59f0625ce8e03f5da5c4f7ff343eeb11.lua b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_59f0625ce8e03f5da5c4f7ff343eeb11.lua deleted file mode 100644 index 038632f003..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_59f0625ce8e03f5da5c4f7ff343eeb11.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "nginx_syslog_error" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_6a2071dc3f3bd7ce31b734f4d4ec07d6.lua b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_6a2071dc3f3bd7ce31b734f4d4ec07d6.lua deleted file mode 100644 index f223b30f4b..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_6a2071dc3f3bd7ce31b734f4d4ec07d6.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "nginx_default_error" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_920a18a3d7b36b0739fba270ca053931.lua b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_920a18a3d7b36b0739fba270ca053931.lua new file mode 100644 index 0000000000..3cc96844d6 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_920a18a3d7b36b0739fba270ca053931.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "nginx_default_access" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_b178cc03cc4ecb33f507b5bf1e1b082e.lua b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_b178cc03cc4ecb33f507b5bf1e1b082e.lua deleted file mode 100644 index fcbd035696..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_b178cc03cc4ecb33f507b5bf1e1b082e.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "nginx_syslog_access" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_d4d97433567899caa7308bc6865850be.lua b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_d4d97433567899caa7308bc6865850be.lua new file mode 100644 index 0000000000..f8171d7f2d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_d4d97433567899caa7308bc6865850be.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "nginx_default_error" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_e439d59a5c10c20d7e25702eed80e2cc.lua b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_e439d59a5c10c20d7e25702eed80e2cc.lua new file mode 100644 index 0000000000..8f919c70b2 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_e439d59a5c10c20d7e25702eed80e2cc.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "nginx_syslog_error" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_e638499a34fc95abb15458f74fc3b79a.lua b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_e638499a34fc95abb15458f74fc3b79a.lua new file mode 100644 index 0000000000..52a4ec9d36 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_e638499a34fc95abb15458f74fc3b79a.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "nginx_custom_error" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_fcaffc46d78a329e5b13325b5942a20a.lua b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_fcaffc46d78a329e5b13325b5942a20a.lua deleted file mode 100644 index d38b11f6b2..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_fcaffc46d78a329e5b13325b5942a20a.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "nginx_custom_access" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_fluent_bit_main.conf index b15efd40b0..69bc9afd11 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_nginx_custom/golden_fluent_bit_main.conf @@ -127,7 +127,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Key_Name message @@ -165,7 +165,7 @@ Match nginx_custom.nginx_custom_access Name lua call process - script fcaffc46d78a329e5b13325b5942a20a.lua + script 4a5edd4b2b0d56f14ab1bf9672472f14.lua [FILTER] Key_Name message @@ -225,7 +225,7 @@ Match nginx_custom.nginx_custom_error Name lua call process - script 1317a70e915d0b2b68c18e35b044245e.lua + script e638499a34fc95abb15458f74fc3b79a.lua [FILTER] Key_Name message @@ -263,7 +263,7 @@ Match nginx_default.nginx_default_access Name lua call process - script 3507409c9d6a13a2f12bd974995090fc.lua + script 920a18a3d7b36b0739fba270ca053931.lua [FILTER] Key_Name message @@ -323,7 +323,7 @@ Match nginx_default.nginx_default_error Name lua call process - script 6a2071dc3f3bd7ce31b734f4d4ec07d6.lua + script d4d97433567899caa7308bc6865850be.lua [FILTER] Key_Name message @@ -361,7 +361,7 @@ Match nginx_syslog_access.nginx_syslog_access Name lua call process - script b178cc03cc4ecb33f507b5bf1e1b082e.lua + script 4aa51eba6d18c7471a583a4779a7455b.lua [FILTER] Key_Name message @@ -421,7 +421,7 @@ Match nginx_syslog_error.nginx_syslog_error Name lua call process - script 59f0625ce8e03f5da5c4f7ff343eeb11.lua + script e439d59a5c10c20d7e25702eed80e2cc.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|nginx_custom\.nginx_custom_access|nginx_custom\.nginx_custom_error|nginx_default\.nginx_default_access|nginx_default\.nginx_default_error|nginx_syslog_access\.nginx_syslog_access|nginx_syslog_error\.nginx_syslog_error)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_postgresql/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_postgresql/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_postgresql/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_postgresql/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_postgresql/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_postgresql/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_postgresql/golden_fd251c796e006cd57d36873cb784d19b.lua b/confgenerator/testdata/valid/linux/logging-receiver_postgresql/golden_fd251c796e006cd57d36873cb784d19b.lua deleted file mode 100644 index 46e9465bff..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_postgresql/golden_fd251c796e006cd57d36873cb784d19b.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "postgresql_general" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_postgresql/golden_fe174f9304bdd777b603454425ce126f.lua b/confgenerator/testdata/valid/linux/logging-receiver_postgresql/golden_fe174f9304bdd777b603454425ce126f.lua new file mode 100644 index 0000000000..cdb5174d78 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_postgresql/golden_fe174f9304bdd777b603454425ce126f.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "postgresql_general" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_postgresql/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_postgresql/golden_fluent_bit_main.conf index 662c40d39d..10095823ab 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_postgresql/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_postgresql/golden_fluent_bit_main.conf @@ -63,7 +63,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Match postgresql.postgresql_general @@ -165,7 +165,7 @@ Match postgresql.postgresql_general Name lua call process - script fd251c796e006cd57d36873cb784d19b.lua + script fe174f9304bdd777b603454425ce126f.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|postgresql\.postgresql_general)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_037b2291a828ed5b8d632ddc82edd49b.lua b/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_037b2291a828ed5b8d632ddc82edd49b.lua new file mode 100644 index 0000000000..f74e644045 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_037b2291a828ed5b8d632ddc82edd49b.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "postgresql_custom_general" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_2e2574f883a29113ac7b7831d6f26d53.lua b/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_2e2574f883a29113ac7b7831d6f26d53.lua deleted file mode 100644 index 7bf359ce3d..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_2e2574f883a29113ac7b7831d6f26d53.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "postgresql_syslog_general" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_652d3e7c66adecd685393d91622f758b.lua b/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_652d3e7c66adecd685393d91622f758b.lua deleted file mode 100644 index ee28584649..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_652d3e7c66adecd685393d91622f758b.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "postgresql_custom_general" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_94d1491bd829124341284d341f489873.lua b/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_94d1491bd829124341284d341f489873.lua new file mode 100644 index 0000000000..faf5d6b9d1 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_94d1491bd829124341284d341f489873.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "postgresql_default_general" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_bfc587337d540d1703ca46152466083c.lua b/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_bfc587337d540d1703ca46152466083c.lua deleted file mode 100644 index c8859677c2..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_bfc587337d540d1703ca46152466083c.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "postgresql_default_general" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_fae533bd0bff83ab6f7580c4dece0c74.lua b/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_fae533bd0bff83ab6f7580c4dece0c74.lua new file mode 100644 index 0000000000..cd14f90608 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_fae533bd0bff83ab6f7580c4dece0c74.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "postgresql_syslog_general" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_fluent_bit_main.conf index f031497aa5..2409f60fd6 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_postgresql_custom/golden_fluent_bit_main.conf @@ -87,7 +87,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Match postgresql_custom.postgresql_custom_general @@ -189,7 +189,7 @@ Match postgresql_custom.postgresql_custom_general Name lua call process - script 652d3e7c66adecd685393d91622f758b.lua + script 037b2291a828ed5b8d632ddc82edd49b.lua [FILTER] Match postgresql_default.postgresql_default_general @@ -291,7 +291,7 @@ Match postgresql_default.postgresql_default_general Name lua call process - script bfc587337d540d1703ca46152466083c.lua + script 94d1491bd829124341284d341f489873.lua [FILTER] Match postgresql_syslog_error.postgresql_syslog_general @@ -393,7 +393,7 @@ Match postgresql_syslog_error.postgresql_syslog_general Name lua call process - script 2e2574f883a29113ac7b7831d6f26d53.lua + script fae533bd0bff83ab6f7580c4dece0c74.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|postgresql_custom\.postgresql_custom_general|postgresql_default\.postgresql_default_general|postgresql_syslog_error\.postgresql_syslog_general)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_rabbitmq/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_rabbitmq/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_rabbitmq/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_rabbitmq/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_rabbitmq/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_rabbitmq/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_rabbitmq/golden_b77dd465ead5b25af4aae32c70879cd4.lua b/confgenerator/testdata/valid/linux/logging-receiver_rabbitmq/golden_b77dd465ead5b25af4aae32c70879cd4.lua deleted file mode 100644 index d3822dcc4f..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_rabbitmq/golden_b77dd465ead5b25af4aae32c70879cd4.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "rabbitmq" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_rabbitmq/golden_e5750befe06f2a40d83f009b987cdb02.lua b/confgenerator/testdata/valid/linux/logging-receiver_rabbitmq/golden_e5750befe06f2a40d83f009b987cdb02.lua new file mode 100644 index 0000000000..fdde918e65 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_rabbitmq/golden_e5750befe06f2a40d83f009b987cdb02.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "rabbitmq" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_rabbitmq/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_rabbitmq/golden_fluent_bit_main.conf index d5a8391101..07a2cd0133 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_rabbitmq/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_rabbitmq/golden_fluent_bit_main.conf @@ -64,7 +64,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Match rabbitmq.rabbitmq @@ -109,7 +109,7 @@ Match rabbitmq.rabbitmq Name lua call process - script b77dd465ead5b25af4aae32c70879cd4.lua + script e5750befe06f2a40d83f009b987cdb02.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|rabbitmq\.rabbitmq)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_redis/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_redis/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_redis/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_redis/golden_875584b6e3ebad819cfd3167e5f92c52.lua b/confgenerator/testdata/valid/linux/logging-receiver_redis/golden_875584b6e3ebad819cfd3167e5f92c52.lua deleted file mode 100644 index e0dcb07fff..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_redis/golden_875584b6e3ebad819cfd3167e5f92c52.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "redis" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_redis/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_redis/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_redis/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_redis/golden_f539cf226098f1f0bc9b7faa245da9ad.lua b/confgenerator/testdata/valid/linux/logging-receiver_redis/golden_f539cf226098f1f0bc9b7faa245da9ad.lua new file mode 100644 index 0000000000..7c9582c566 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_redis/golden_f539cf226098f1f0bc9b7faa245da9ad.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "redis" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_redis/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_redis/golden_fluent_bit_main.conf index 01ab8c6c34..25bcbf8e8b 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_redis/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_redis/golden_fluent_bit_main.conf @@ -63,7 +63,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Key_Name message @@ -123,7 +123,7 @@ Match redis.redis Name lua call process - script 875584b6e3ebad819cfd3167e5f92c52.lua + script f539cf226098f1f0bc9b7faa245da9ad.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|redis\.redis)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_0099cdfd3f3c5089417ccdccca3226ac.lua b/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_0099cdfd3f3c5089417ccdccca3226ac.lua deleted file mode 100644 index 5b7b4f4622..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_0099cdfd3f3c5089417ccdccca3226ac.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "redis_syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_0a85a6356f2fcbb57fbb00652a9f3876.lua b/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_0a85a6356f2fcbb57fbb00652a9f3876.lua deleted file mode 100644 index 6f1d843ca0..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_0a85a6356f2fcbb57fbb00652a9f3876.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "redis_custom" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_108bfc5150212bbf77ecde5eba519012.lua b/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_108bfc5150212bbf77ecde5eba519012.lua new file mode 100644 index 0000000000..dca8d758ef --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_108bfc5150212bbf77ecde5eba519012.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "redis_default" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_8c13c44bc288a144ff6c7653fb2e2003.lua b/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_8c13c44bc288a144ff6c7653fb2e2003.lua new file mode 100644 index 0000000000..8c551e9287 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_8c13c44bc288a144ff6c7653fb2e2003.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "redis_custom" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_99ac6ef891a018516d2b9936ea78ab96.lua b/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_99ac6ef891a018516d2b9936ea78ab96.lua deleted file mode 100644 index b1c0821e1e..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_99ac6ef891a018516d2b9936ea78ab96.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "redis_default" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_c16117f1a167d073dcb78e5b1f9b38ed.lua b/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_c16117f1a167d073dcb78e5b1f9b38ed.lua new file mode 100644 index 0000000000..0c1153c586 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_c16117f1a167d073dcb78e5b1f9b38ed.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "redis_syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_fluent_bit_main.conf index ef726a6598..c9d7b94f65 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_redis_custom/golden_fluent_bit_main.conf @@ -88,7 +88,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Key_Name message @@ -148,7 +148,7 @@ Match redis_custom.redis_custom Name lua call process - script 0a85a6356f2fcbb57fbb00652a9f3876.lua + script 8c13c44bc288a144ff6c7653fb2e2003.lua [FILTER] Key_Name message @@ -208,7 +208,7 @@ Match redis_default.redis_default Name lua call process - script 99ac6ef891a018516d2b9936ea78ab96.lua + script 108bfc5150212bbf77ecde5eba519012.lua [FILTER] Key_Name message @@ -268,7 +268,7 @@ Match redis_syslog.redis_syslog Name lua call process - script 0099cdfd3f3c5089417ccdccca3226ac.lua + script c16117f1a167d073dcb78e5b1f9b38ed.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|redis_custom\.redis_custom|redis_default\.redis_default|redis_syslog\.redis_syslog)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_solr/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_solr/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_solr/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_solr/golden_3c8304a1ae63895e0849e6c8464fb137.lua b/confgenerator/testdata/valid/linux/logging-receiver_solr/golden_3c8304a1ae63895e0849e6c8464fb137.lua deleted file mode 100644 index bb156ee753..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_solr/golden_3c8304a1ae63895e0849e6c8464fb137.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "solr_system" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_solr/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_solr/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_solr/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_solr/golden_e6a9eb7695bba999ba5d94e77d521e14.lua b/confgenerator/testdata/valid/linux/logging-receiver_solr/golden_e6a9eb7695bba999ba5d94e77d521e14.lua new file mode 100644 index 0000000000..11f0e2803c --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_solr/golden_e6a9eb7695bba999ba5d94e77d521e14.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "solr_system" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_solr/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_solr/golden_fluent_bit_main.conf index af83de19ec..dbb08bda1b 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_solr/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_solr/golden_fluent_bit_main.conf @@ -63,7 +63,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Match solr.solr_system @@ -123,7 +123,7 @@ Match solr.solr_system Name lua call process - script 3c8304a1ae63895e0849e6c8464fb137.lua + script e6a9eb7695bba999ba5d94e77d521e14.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|solr\.solr_system)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_syslog_type_multiple_receivers/golden_01ed2bd46e1d099a101cc74ed368a1fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_syslog_type_multiple_receivers/golden_01ed2bd46e1d099a101cc74ed368a1fc.lua new file mode 100644 index 0000000000..866f58b6d5 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_syslog_type_multiple_receivers/golden_01ed2bd46e1d099a101cc74ed368a1fc.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "test_syslog_source_id_tcp" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_syslog_type_multiple_receivers/golden_15cf604ba57275339813be7a240be374.lua b/confgenerator/testdata/valid/linux/logging-receiver_syslog_type_multiple_receivers/golden_15cf604ba57275339813be7a240be374.lua deleted file mode 100644 index 6588d61985..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_syslog_type_multiple_receivers/golden_15cf604ba57275339813be7a240be374.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "test_syslog_source_id_udp" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_syslog_type_multiple_receivers/golden_c540c13717430f9798e74730652c5612.lua b/confgenerator/testdata/valid/linux/logging-receiver_syslog_type_multiple_receivers/golden_c540c13717430f9798e74730652c5612.lua new file mode 100644 index 0000000000..44993e8142 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_syslog_type_multiple_receivers/golden_c540c13717430f9798e74730652c5612.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "test_syslog_source_id_udp" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_syslog_type_multiple_receivers/golden_f1c3bc88452ddbb23cbab5d1d33c1108.lua b/confgenerator/testdata/valid/linux/logging-receiver_syslog_type_multiple_receivers/golden_f1c3bc88452ddbb23cbab5d1d33c1108.lua deleted file mode 100644 index 05b4830f43..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_syslog_type_multiple_receivers/golden_f1c3bc88452ddbb23cbab5d1d33c1108.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "test_syslog_source_id_tcp" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_syslog_type_multiple_receivers/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_syslog_type_multiple_receivers/golden_fluent_bit_main.conf index a6f000a57a..7b7472164f 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_syslog_type_multiple_receivers/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_syslog_type_multiple_receivers/golden_fluent_bit_main.conf @@ -61,7 +61,7 @@ Match pipeline1.test_syslog_source_id_tcp Name lua call process - script f1c3bc88452ddbb23cbab5d1d33c1108.lua + script 01ed2bd46e1d099a101cc74ed368a1fc.lua [FILTER] Key_Name message @@ -73,7 +73,7 @@ Match pipeline2.test_syslog_source_id_udp Name lua call process - script 15cf604ba57275339813be7a240be374.lua + script c540c13717430f9798e74730652c5612.lua [OUTPUT] Match_Regex ^(pipeline1\.test_syslog_source_id_tcp|pipeline2\.test_syslog_source_id_udp)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_systemd/golden_007e8b682110f4cac6ff7ae6a7e08626.lua b/confgenerator/testdata/valid/linux/logging-receiver_systemd/golden_007e8b682110f4cac6ff7ae6a7e08626.lua new file mode 100644 index 0000000000..22c897dc14 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_systemd/golden_007e8b682110f4cac6ff7ae6a7e08626.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "systemd_logs" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_systemd/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_systemd/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_systemd/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_systemd/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_systemd/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_systemd/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_systemd/golden_b8855b4a9b8105497e6c8f9a0fdebc18.lua b/confgenerator/testdata/valid/linux/logging-receiver_systemd/golden_b8855b4a9b8105497e6c8f9a0fdebc18.lua deleted file mode 100644 index a438edf666..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_systemd/golden_b8855b4a9b8105497e6c8f9a0fdebc18.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "systemd_logs" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_systemd/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_systemd/golden_fluent_bit_main.conf index a2dbf4083d..99ab3d8e13 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_systemd/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_systemd/golden_fluent_bit_main.conf @@ -54,7 +54,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Add logging.googleapis.com/severity DEBUG @@ -134,7 +134,7 @@ Match systemd_pipeline.systemd_logs Name lua call process - script b8855b4a9b8105497e6c8f9a0fdebc18.lua + script 007e8b682110f4cac6ff7ae6a7e08626.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|systemd_pipeline\.systemd_logs)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tcp/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_tcp/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_tcp/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tcp/golden_846cbb0ad15276bb433ac6f60b14b9fb.lua b/confgenerator/testdata/valid/linux/logging-receiver_tcp/golden_846cbb0ad15276bb433ac6f60b14b9fb.lua deleted file mode 100644 index 1f5bac7cc5..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_tcp/golden_846cbb0ad15276bb433ac6f60b14b9fb.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "tcp_logs" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tcp/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_tcp/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_tcp/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tcp/golden_fa99fe05e2eeb192ba50bd6b59ad9871.lua b/confgenerator/testdata/valid/linux/logging-receiver_tcp/golden_fa99fe05e2eeb192ba50bd6b59ad9871.lua new file mode 100644 index 0000000000..9fc6b99aa2 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_tcp/golden_fa99fe05e2eeb192ba50bd6b59ad9871.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "tcp_logs" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tcp/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_tcp/golden_fluent_bit_main.conf index 060a7f8cc2..30c9071c7c 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_tcp/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_tcp/golden_fluent_bit_main.conf @@ -58,13 +58,13 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Match tcp_pipeline.tcp_logs Name lua call process - script 846cbb0ad15276bb433ac6f60b14b9fb.lua + script fa99fe05e2eeb192ba50bd6b59ad9871.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|tcp_pipeline\.tcp_logs)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tcp_omitting_optional_parameters/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_tcp_omitting_optional_parameters/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_tcp_omitting_optional_parameters/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tcp_omitting_optional_parameters/golden_846cbb0ad15276bb433ac6f60b14b9fb.lua b/confgenerator/testdata/valid/linux/logging-receiver_tcp_omitting_optional_parameters/golden_846cbb0ad15276bb433ac6f60b14b9fb.lua deleted file mode 100644 index 1f5bac7cc5..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_tcp_omitting_optional_parameters/golden_846cbb0ad15276bb433ac6f60b14b9fb.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "tcp_logs" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tcp_omitting_optional_parameters/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_tcp_omitting_optional_parameters/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_tcp_omitting_optional_parameters/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tcp_omitting_optional_parameters/golden_fa99fe05e2eeb192ba50bd6b59ad9871.lua b/confgenerator/testdata/valid/linux/logging-receiver_tcp_omitting_optional_parameters/golden_fa99fe05e2eeb192ba50bd6b59ad9871.lua new file mode 100644 index 0000000000..9fc6b99aa2 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_tcp_omitting_optional_parameters/golden_fa99fe05e2eeb192ba50bd6b59ad9871.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "tcp_logs" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tcp_omitting_optional_parameters/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_tcp_omitting_optional_parameters/golden_fluent_bit_main.conf index 2f4b3209f7..48b11073a3 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_tcp_omitting_optional_parameters/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_tcp_omitting_optional_parameters/golden_fluent_bit_main.conf @@ -58,13 +58,13 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Match tcp_pipeline.tcp_logs Name lua call process - script 846cbb0ad15276bb433ac6f60b14b9fb.lua + script fa99fe05e2eeb192ba50bd6b59ad9871.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|tcp_pipeline\.tcp_logs)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_5db1c1b0ea500160a72bfbbfc15a23aa.lua b/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_5db1c1b0ea500160a72bfbbfc15a23aa.lua new file mode 100644 index 0000000000..50e3927217 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_5db1c1b0ea500160a72bfbbfc15a23aa.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "tomcat_system" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_b17b489e808d4cdc61702ebec64c27c9.lua b/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_b17b489e808d4cdc61702ebec64c27c9.lua deleted file mode 100644 index 437e29bb33..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_b17b489e808d4cdc61702ebec64c27c9.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "tomcat_system" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_b65650fb5a0ea79768254181fc763afb.lua b/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_b65650fb5a0ea79768254181fc763afb.lua deleted file mode 100644 index 4714077e0f..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_b65650fb5a0ea79768254181fc763afb.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "tomcat_access" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_c2e9aa5320408d3d2179618486c3cc47.lua b/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_c2e9aa5320408d3d2179618486c3cc47.lua new file mode 100644 index 0000000000..d78efd1079 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_c2e9aa5320408d3d2179618486c3cc47.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "tomcat_access" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_fluent_bit_main.conf index 0a54357445..7633f9c9d7 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_tomcat/golden_fluent_bit_main.conf @@ -77,7 +77,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Key_Name message @@ -115,7 +115,7 @@ Match tomcat.tomcat_access Name lua call process - script b65650fb5a0ea79768254181fc763afb.lua + script c2e9aa5320408d3d2179618486c3cc47.lua [FILTER] Match tomcat.tomcat_system @@ -174,7 +174,7 @@ Match tomcat.tomcat_system Name lua call process - script b17b489e808d4cdc61702ebec64c27c9.lua + script 5db1c1b0ea500160a72bfbbfc15a23aa.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|tomcat\.tomcat_access|tomcat\.tomcat_system)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_00315713f31fd79284bc23320d103c7a.lua b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_00315713f31fd79284bc23320d103c7a.lua deleted file mode 100644 index c4dc7cd227..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_00315713f31fd79284bc23320d103c7a.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "tomcat_custom_system" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_1854f212d2234573526774e66ad97a7b.lua b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_1854f212d2234573526774e66ad97a7b.lua new file mode 100644 index 0000000000..2bbf0c0246 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_1854f212d2234573526774e66ad97a7b.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "tomcat_custom_system" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_21d3ceba9626f74a2ecdf86d03cb7f01.lua b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_21d3ceba9626f74a2ecdf86d03cb7f01.lua deleted file mode 100644 index fbea1b6221..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_21d3ceba9626f74a2ecdf86d03cb7f01.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "tomcat_default_system" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_502572d9e4115849f1341d30653e98bd.lua b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_502572d9e4115849f1341d30653e98bd.lua new file mode 100644 index 0000000000..95f1580d35 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_502572d9e4115849f1341d30653e98bd.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "tomcat_syslog_access" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_652657a813b82646790dfbdcfc351216.lua b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_652657a813b82646790dfbdcfc351216.lua new file mode 100644 index 0000000000..395e8aab9a --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_652657a813b82646790dfbdcfc351216.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "tomcat_default_access" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_931b44ca264d20150a53df591de1ed0f.lua b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_931b44ca264d20150a53df591de1ed0f.lua deleted file mode 100644 index 4964b2b06b..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_931b44ca264d20150a53df591de1ed0f.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "tomcat_custom_access" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_9aa375f179609c1ac9b35c0725685507.lua b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_9aa375f179609c1ac9b35c0725685507.lua deleted file mode 100644 index a655b6b12b..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_9aa375f179609c1ac9b35c0725685507.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "tomcat_syslog_access" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_be557549e26889358d0de3010123fc0f.lua b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_be557549e26889358d0de3010123fc0f.lua deleted file mode 100644 index c2ba5d4682..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_be557549e26889358d0de3010123fc0f.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "tomcat_default_access" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_caf9982d9ff7ddea115eef8eb7e324e1.lua b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_caf9982d9ff7ddea115eef8eb7e324e1.lua new file mode 100644 index 0000000000..d730346d47 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_caf9982d9ff7ddea115eef8eb7e324e1.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "tomcat_syslog_system" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_d6ce57f13f74cca6ee5d8298fc3f10e4.lua b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_d6ce57f13f74cca6ee5d8298fc3f10e4.lua new file mode 100644 index 0000000000..aa0db60233 --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_d6ce57f13f74cca6ee5d8298fc3f10e4.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "tomcat_custom_access" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_e71f186e7695bebb247b4e24dc2781e9.lua b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_e71f186e7695bebb247b4e24dc2781e9.lua deleted file mode 100644 index 8930a9ee7b..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_e71f186e7695bebb247b4e24dc2781e9.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "tomcat_syslog_system" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_f4815a7acca6345708027febe179d7b9.lua b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_f4815a7acca6345708027febe179d7b9.lua new file mode 100644 index 0000000000..c9b95260ea --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_f4815a7acca6345708027febe179d7b9.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "tomcat_default_system" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_fluent_bit_main.conf index 09378958d6..f05a8a155a 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_tomcat_custom/golden_fluent_bit_main.conf @@ -125,7 +125,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Key_Name message @@ -163,7 +163,7 @@ Match tomcat_custom.tomcat_custom_access Name lua call process - script 931b44ca264d20150a53df591de1ed0f.lua + script d6ce57f13f74cca6ee5d8298fc3f10e4.lua [FILTER] Match tomcat_custom.tomcat_custom_system @@ -222,7 +222,7 @@ Match tomcat_custom.tomcat_custom_system Name lua call process - script 00315713f31fd79284bc23320d103c7a.lua + script 1854f212d2234573526774e66ad97a7b.lua [FILTER] Key_Name message @@ -260,7 +260,7 @@ Match tomcat_default.tomcat_default_access Name lua call process - script be557549e26889358d0de3010123fc0f.lua + script 652657a813b82646790dfbdcfc351216.lua [FILTER] Match tomcat_default.tomcat_default_system @@ -319,7 +319,7 @@ Match tomcat_default.tomcat_default_system Name lua call process - script 21d3ceba9626f74a2ecdf86d03cb7f01.lua + script f4815a7acca6345708027febe179d7b9.lua [FILTER] Match tomcat_syslog_system.tomcat_syslog_access @@ -410,7 +410,7 @@ Match tomcat_syslog_system.tomcat_syslog_access Name lua call process - script 9aa375f179609c1ac9b35c0725685507.lua + script 502572d9e4115849f1341d30653e98bd.lua [FILTER] Match tomcat_syslog_system.tomcat_syslog_system @@ -501,7 +501,7 @@ Match tomcat_syslog_system.tomcat_syslog_system Name lua call process - script e71f186e7695bebb247b4e24dc2781e9.lua + script caf9982d9ff7ddea115eef8eb7e324e1.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|tomcat_custom\.tomcat_custom_access|tomcat_custom\.tomcat_custom_system|tomcat_default\.tomcat_default_access|tomcat_default\.tomcat_default_system|tomcat_syslog_system\.tomcat_syslog_access|tomcat_syslog_system\.tomcat_syslog_system)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_wildfly/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_wildfly/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_wildfly/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_wildfly/golden_76b717ba54f8211b71f78871f3463793.lua b/confgenerator/testdata/valid/linux/logging-receiver_wildfly/golden_76b717ba54f8211b71f78871f3463793.lua new file mode 100644 index 0000000000..3a08ce2e8a --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_wildfly/golden_76b717ba54f8211b71f78871f3463793.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "wildfly_system" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_wildfly/golden_8afcfed0d515b6c57d05b375ad6de84a.lua b/confgenerator/testdata/valid/linux/logging-receiver_wildfly/golden_8afcfed0d515b6c57d05b375ad6de84a.lua deleted file mode 100644 index 7a2afc288c..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_wildfly/golden_8afcfed0d515b6c57d05b375ad6de84a.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "wildfly_system" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_wildfly/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_wildfly/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_wildfly/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_wildfly/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_wildfly/golden_fluent_bit_main.conf index 1e130a0515..b551b645a0 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_wildfly/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_wildfly/golden_fluent_bit_main.conf @@ -64,7 +64,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Match wildfly_system.wildfly_system @@ -111,7 +111,7 @@ Match wildfly_system.wildfly_system Name lua call process - script 8afcfed0d515b6c57d05b375ad6de84a.lua + script 76b717ba54f8211b71f78871f3463793.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|wildfly_system\.wildfly_system)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_zookeeper/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_zookeeper/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_zookeeper/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_zookeeper/golden_4f36c193d833217d9e12074df344d402.lua b/confgenerator/testdata/valid/linux/logging-receiver_zookeeper/golden_4f36c193d833217d9e12074df344d402.lua new file mode 100644 index 0000000000..5f6c337a7c --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_zookeeper/golden_4f36c193d833217d9e12074df344d402.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "zookeeper_general" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_zookeeper/golden_874241bd2458e905d64cb6f9feb68da3.lua b/confgenerator/testdata/valid/linux/logging-receiver_zookeeper/golden_874241bd2458e905d64cb6f9feb68da3.lua deleted file mode 100644 index f63c29d396..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_zookeeper/golden_874241bd2458e905d64cb6f9feb68da3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "zookeeper_general" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_zookeeper/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_zookeeper/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_zookeeper/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_zookeeper/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_zookeeper/golden_fluent_bit_main.conf index 29e4a2a5ae..a398fd5b59 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_zookeeper/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_zookeeper/golden_fluent_bit_main.conf @@ -64,7 +64,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Match zookeeper_general.zookeeper_general @@ -131,7 +131,7 @@ Match zookeeper_general.zookeeper_general Name lua call process - script 874241bd2458e905d64cb6f9feb68da3.lua + script 4f36c193d833217d9e12074df344d402.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|zookeeper_general\.zookeeper_general)$ diff --git a/confgenerator/testdata/valid/linux/logging-receiver_zookeeper_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/logging-receiver_zookeeper_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_zookeeper_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_zookeeper_custom/golden_4f36c193d833217d9e12074df344d402.lua b/confgenerator/testdata/valid/linux/logging-receiver_zookeeper_custom/golden_4f36c193d833217d9e12074df344d402.lua new file mode 100644 index 0000000000..5f6c337a7c --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_zookeeper_custom/golden_4f36c193d833217d9e12074df344d402.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "zookeeper_general" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_zookeeper_custom/golden_874241bd2458e905d64cb6f9feb68da3.lua b/confgenerator/testdata/valid/linux/logging-receiver_zookeeper_custom/golden_874241bd2458e905d64cb6f9feb68da3.lua deleted file mode 100644 index f63c29d396..0000000000 --- a/confgenerator/testdata/valid/linux/logging-receiver_zookeeper_custom/golden_874241bd2458e905d64cb6f9feb68da3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "zookeeper_general" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_zookeeper_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/logging-receiver_zookeeper_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/logging-receiver_zookeeper_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/logging-receiver_zookeeper_custom/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/logging-receiver_zookeeper_custom/golden_fluent_bit_main.conf index ba4b0610cd..f26f8cc8dc 100644 --- a/confgenerator/testdata/valid/linux/logging-receiver_zookeeper_custom/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/logging-receiver_zookeeper_custom/golden_fluent_bit_main.conf @@ -64,7 +64,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [FILTER] Match zookeeper.zookeeper_general @@ -131,7 +131,7 @@ Match zookeeper.zookeeper_general Name lua call process - script 874241bd2458e905d64cb6f9feb68da3.lua + script 4f36c193d833217d9e12074df344d402.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog|zookeeper\.zookeeper_general)$ diff --git a/confgenerator/testdata/valid/linux/metrics-custom_log_level/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-custom_log_level/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-custom_log_level/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-custom_log_level/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-custom_log_level/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-custom_log_level/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-custom_log_level/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-custom_log_level/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-custom_log_level/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-custom_log_level/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-default_overrides_disable_all/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-default_overrides_disable_all/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-default_overrides_disable_all/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-default_overrides_disable_all/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-default_overrides_disable_all/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-default_overrides_disable_all/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-default_overrides_disable_all/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-default_overrides_disable_all/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-default_overrides_disable_all/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-default_overrides_disable_all/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_globs/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_globs/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_globs/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_globs/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_globs/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_globs/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_globs/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_globs/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_globs/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_globs/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_special_chars/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_special_chars/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_special_chars/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_special_chars/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_special_chars/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_special_chars/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_special_chars/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_special_chars/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_special_chars/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-processor_exclude_metrics_type_filter_with_special_chars/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver-no-collection_interval/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver-no-collection_interval/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver-no-collection_interval/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver-no-collection_interval/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver-no-collection_interval/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver-no-collection_interval/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver-no-collection_interval/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver-no-collection_interval/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver-no-collection_interval/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver-no-collection_interval/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_activemq/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_activemq/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_activemq/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_activemq/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_activemq/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_activemq/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_activemq/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_activemq/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_activemq/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_activemq/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_activemq_no_jvm/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_activemq_no_jvm/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_activemq_no_jvm/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_activemq_no_jvm/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_activemq_no_jvm/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_activemq_no_jvm/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_activemq_no_jvm/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_activemq_no_jvm/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_activemq_no_jvm/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_activemq_no_jvm/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_apache/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_apache/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_apache/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_apache/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_apache/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_apache/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_apache/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_apache/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_apache/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_apache/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_apache_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_apache_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_apache_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_apache_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_apache_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_apache_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_apache_custom/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_apache_custom/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_apache_custom/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_apache_custom/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_cassandra/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_cassandra/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_cassandra/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_cassandra/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_cassandra/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_cassandra/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_cassandra/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_cassandra/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_cassandra/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_cassandra/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_cassandra_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_cassandra_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_cassandra_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_cassandra_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_cassandra_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_cassandra_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_cassandra_custom/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_cassandra_custom/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_cassandra_custom/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_cassandra_custom/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_couchdb/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_couchdb/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_couchdb/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_couchdb/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_couchdb/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_couchdb/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_couchdb/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_couchdb/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_couchdb/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_couchdb/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_custom_collection_interval/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_custom_collection_interval/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_custom_collection_interval/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_custom_collection_interval/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_custom_collection_interval/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_custom_collection_interval/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_custom_collection_interval/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_custom_collection_interval/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_custom_collection_interval/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_custom_collection_interval/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_credentials/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_credentials/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_credentials/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_credentials/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_credentials/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_credentials/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_credentials/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_credentials/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_credentials/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_credentials/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_custom_endpoint_http/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_custom_endpoint_http/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_custom_endpoint_http/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_custom_endpoint_http/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_custom_endpoint_http/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_custom_endpoint_http/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_custom_endpoint_http/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_custom_endpoint_http/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_custom_endpoint_http/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_custom_endpoint_http/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_disable_cluster_metrics/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_disable_cluster_metrics/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_disable_cluster_metrics/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_disable_cluster_metrics/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_disable_cluster_metrics/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_disable_cluster_metrics/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_disable_cluster_metrics/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_disable_cluster_metrics/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_disable_cluster_metrics/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_disable_cluster_metrics/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_no_jvm/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_no_jvm/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_no_jvm/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_no_jvm/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_no_jvm/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_no_jvm/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_no_jvm/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_no_jvm/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_no_jvm/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_no_jvm/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_tls_credentials/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_tls_credentials/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_tls_credentials/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_tls_credentials/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_tls_credentials/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_tls_credentials/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_tls_credentials/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_tls_credentials/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_tls_credentials/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_elasticsearch_tls_credentials/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_hadoop/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_hadoop/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_hadoop/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_hadoop/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_hadoop/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_hadoop/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_hadoop/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_hadoop/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_hadoop/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_hadoop/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_hadoop_no_jvm/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_hadoop_no_jvm/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_hadoop_no_jvm/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_hadoop_no_jvm/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_hadoop_no_jvm/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_hadoop_no_jvm/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_hadoop_no_jvm/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_hadoop_no_jvm/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_hadoop_no_jvm/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_hadoop_no_jvm/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_hbase/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_hbase/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_hbase/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_hbase/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_hbase/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_hbase/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_hbase/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_hbase/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_hbase/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_hbase/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_hbase_no_jvm/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_hbase_no_jvm/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_hbase_no_jvm/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_hbase_no_jvm/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_hbase_no_jvm/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_hbase_no_jvm/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_hbase_no_jvm/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_hbase_no_jvm/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_hbase_no_jvm/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_hbase_no_jvm/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_jvm/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_jvm/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_jvm/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_jvm/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_jvm/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_jvm/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_jvm/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_jvm/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_jvm/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_jvm/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_jvm_with_auth/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_jvm_with_auth/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_jvm_with_auth/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_jvm_with_auth/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_jvm_with_auth/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_jvm_with_auth/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_jvm_with_auth/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_jvm_with_auth/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_jvm_with_auth/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_jvm_with_auth/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_jvm_with_endpoint/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_jvm_with_endpoint/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_jvm_with_endpoint/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_jvm_with_endpoint/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_jvm_with_endpoint/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_jvm_with_endpoint/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_jvm_with_endpoint/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_jvm_with_endpoint/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_jvm_with_endpoint/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_jvm_with_endpoint/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_kafka/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_kafka/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_kafka/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_kafka/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_kafka/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_kafka/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_kafka/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_kafka/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_kafka/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_kafka/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_kafka_no_jvm/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_kafka_no_jvm/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_kafka_no_jvm/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_kafka_no_jvm/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_kafka_no_jvm/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_kafka_no_jvm/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_kafka_no_jvm/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_kafka_no_jvm/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_kafka_no_jvm/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_kafka_no_jvm/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_memcached/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_memcached/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_memcached/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_memcached/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_memcached/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_memcached/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_memcached/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_memcached/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_memcached/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_memcached/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_mongodb/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_mongodb/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_mongodb/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_mongodb/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_mongodb/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_mongodb/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_mongodb/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_mongodb/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_mongodb/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_mongodb/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_mongodb_unix_socket/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_mongodb_unix_socket/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_mongodb_unix_socket/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_mongodb_unix_socket/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_mongodb_unix_socket/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_mongodb_unix_socket/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_mongodb_unix_socket/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_mongodb_unix_socket/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_mongodb_unix_socket/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_mongodb_unix_socket/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_mysql/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_mysql/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_mysql/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_mysql/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_mysql/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_mysql/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_mysql/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_mysql/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_mysql/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_mysql/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_nginx/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_nginx/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_nginx/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_nginx/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_nginx/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_nginx/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_nginx/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_nginx/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_nginx/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_nginx/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_nginx_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_nginx_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_nginx_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_nginx_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_nginx_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_nginx_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_nginx_custom/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_nginx_custom/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_nginx_custom/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_nginx_custom/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_postgresql/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_postgresql/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_postgresql/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_postgresql/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_postgresql/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_postgresql/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_postgresql/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_postgresql/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_postgresql/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_postgresql/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls_no_sni/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls_no_sni/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls_no_sni/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls_no_sni/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls_no_sni/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls_no_sni/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls_no_sni/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls_no_sni/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls_no_sni/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls_no_sni/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls_with_certs/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls_with_certs/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls_with_certs/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls_with_certs/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls_with_certs/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls_with_certs/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls_with_certs/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls_with_certs/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls_with_certs/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_postgresql_tls_with_certs/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls_no_sni/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls_no_sni/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls_no_sni/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls_no_sni/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls_no_sni/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls_no_sni/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls_no_sni/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls_no_sni/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls_no_sni/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls_no_sni/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls_with_certs/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls_with_certs/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls_with_certs/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls_with_certs/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls_with_certs/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls_with_certs/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls_with_certs/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls_with_certs/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls_with_certs/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_rabbitmq_tls_with_certs/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_redis/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_redis/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_redis/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_redis/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_redis/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_redis/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_redis/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_redis/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_redis/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_redis/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_redis_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_redis_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_redis_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_redis_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_redis_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_redis_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_redis_custom/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_redis_custom/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_redis_custom/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_redis_custom/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_solr/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_solr/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_solr/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_solr/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_solr/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_solr/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_solr/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_solr/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_solr/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_solr/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_tomcat/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_tomcat/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_tomcat/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_tomcat/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_tomcat/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_tomcat/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_tomcat/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_tomcat/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_tomcat/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_tomcat/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_tomcat_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_tomcat_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_tomcat_custom/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_tomcat_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_tomcat_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_tomcat_custom/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_tomcat_custom/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_tomcat_custom/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_tomcat_custom/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_tomcat_custom/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_varnish/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_varnish/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_varnish/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_varnish/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_varnish/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_varnish/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_varnish/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_varnish/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_varnish/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_varnish/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_wildfly/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_wildfly/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_wildfly/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_wildfly/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_wildfly/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_wildfly/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_wildfly/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_wildfly/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_wildfly/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_wildfly/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_wildfly_with_host_port/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_wildfly_with_host_port/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_wildfly_with_host_port/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_wildfly_with_host_port/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_wildfly_with_host_port/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_wildfly_with_host_port/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_wildfly_with_host_port/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_wildfly_with_host_port/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_wildfly_with_host_port/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_wildfly_with_host_port/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_zookeeper/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_zookeeper/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_zookeeper/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_zookeeper/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_zookeeper/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_zookeeper/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_zookeeper/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_zookeeper/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_zookeeper/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_zookeeper/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_zookeeper_endpoint/golden_10fdedaf5448c4114b7b329139f093fc.lua b/confgenerator/testdata/valid/linux/metrics-receiver_zookeeper_endpoint/golden_10fdedaf5448c4114b7b329139f093fc.lua deleted file mode 100644 index ff874a46d7..0000000000 --- a/confgenerator/testdata/valid/linux/metrics-receiver_zookeeper_endpoint/golden_10fdedaf5448c4114b7b329139f093fc.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "syslog" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_zookeeper_endpoint/golden_8f841e1624ad9de1bb98322777b1ac10.lua b/confgenerator/testdata/valid/linux/metrics-receiver_zookeeper_endpoint/golden_8f841e1624ad9de1bb98322777b1ac10.lua new file mode 100644 index 0000000000..9a3b83c50d --- /dev/null +++ b/confgenerator/testdata/valid/linux/metrics-receiver_zookeeper_endpoint/golden_8f841e1624ad9de1bb98322777b1ac10.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "syslog" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/linux/metrics-receiver_zookeeper_endpoint/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/linux/metrics-receiver_zookeeper_endpoint/golden_fluent_bit_main.conf index ab7c7ec033..df141f76a0 100644 --- a/confgenerator/testdata/valid/linux/metrics-receiver_zookeeper_endpoint/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/linux/metrics-receiver_zookeeper_endpoint/golden_fluent_bit_main.conf @@ -49,7 +49,7 @@ Match default_pipeline.syslog Name lua call process - script 10fdedaf5448c4114b7b329139f093fc.lua + script 8f841e1624ad9de1bb98322777b1ac10.lua [OUTPUT] Match_Regex ^(default_pipeline\.syslog)$ diff --git a/confgenerator/testdata/valid/windows/all-backward_compatible_with_explicit_exporters/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/all-backward_compatible_with_explicit_exporters/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/all-backward_compatible_with_explicit_exporters/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/all-backward_compatible_with_explicit_exporters/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/all-backward_compatible_with_explicit_exporters/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/all-backward_compatible_with_explicit_exporters/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/all-backward_compatible_with_explicit_exporters/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/all-backward_compatible_with_explicit_exporters/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/all-backward_compatible_with_explicit_exporters/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/all-backward_compatible_with_explicit_exporters/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/all-built_in_config/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/all-built_in_config/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/all-built_in_config/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/all-built_in_config/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/all-built_in_config/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/all-built_in_config/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/all-built_in_config/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/all-built_in_config/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/all-built_in_config/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/all-built_in_config/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/all-user_config_file_deleted/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/all-user_config_file_deleted/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/all-user_config_file_deleted/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/all-user_config_file_deleted/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/all-user_config_file_deleted/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/all-user_config_file_deleted/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/all-user_config_file_deleted/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/all-user_config_file_deleted/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/all-user_config_file_deleted/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/all-user_config_file_deleted/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/logging-receiver_active_directory_ds/golden_1fe0970e35d8486399dd9db1a558eb28.lua b/confgenerator/testdata/valid/windows/logging-receiver_active_directory_ds/golden_1fe0970e35d8486399dd9db1a558eb28.lua deleted file mode 100644 index 158cc30fa8..0000000000 --- a/confgenerator/testdata/valid/windows/logging-receiver_active_directory_ds/golden_1fe0970e35d8486399dd9db1a558eb28.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "active_directory_ds" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/logging-receiver_active_directory_ds/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/logging-receiver_active_directory_ds/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/logging-receiver_active_directory_ds/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/logging-receiver_active_directory_ds/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/logging-receiver_active_directory_ds/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/logging-receiver_active_directory_ds/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/logging-receiver_active_directory_ds/golden_e4402bdfadf65fd36304cd4ca40c3614.lua b/confgenerator/testdata/valid/windows/logging-receiver_active_directory_ds/golden_e4402bdfadf65fd36304cd4ca40c3614.lua new file mode 100644 index 0000000000..0054033517 --- /dev/null +++ b/confgenerator/testdata/valid/windows/logging-receiver_active_directory_ds/golden_e4402bdfadf65fd36304cd4ca40c3614.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "active_directory_ds" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/logging-receiver_active_directory_ds/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/logging-receiver_active_directory_ds/golden_fluent_bit_main.conf index b4fc982a2a..073e4f62aa 100644 --- a/confgenerator/testdata/valid/windows/logging-receiver_active_directory_ds/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/logging-receiver_active_directory_ds/golden_fluent_bit_main.conf @@ -87,7 +87,7 @@ Match active_directory_ds.active_directory_ds Name lua call process - script 1fe0970e35d8486399dd9db1a558eb28.lua + script e4402bdfadf65fd36304cd4ca40c3614.lua [FILTER] Key_Name TimeGenerated @@ -131,7 +131,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(active_directory_ds\.active_directory_ds|default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/logging-receiver_files_refresh_interval/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/logging-receiver_files_refresh_interval/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/logging-receiver_files_refresh_interval/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/logging-receiver_files_refresh_interval/golden_bbe493b54b165ca3149fd2168216ea97.lua b/confgenerator/testdata/valid/windows/logging-receiver_files_refresh_interval/golden_bbe493b54b165ca3149fd2168216ea97.lua deleted file mode 100644 index 3cee714d27..0000000000 --- a/confgenerator/testdata/valid/windows/logging-receiver_files_refresh_interval/golden_bbe493b54b165ca3149fd2168216ea97.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "log_source_id1" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/logging-receiver_files_refresh_interval/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/logging-receiver_files_refresh_interval/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/logging-receiver_files_refresh_interval/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/logging-receiver_files_refresh_interval/golden_fc00cb02b9b88c98bb35ef80a02c314d.lua b/confgenerator/testdata/valid/windows/logging-receiver_files_refresh_interval/golden_fc00cb02b9b88c98bb35ef80a02c314d.lua new file mode 100644 index 0000000000..74d61bd410 --- /dev/null +++ b/confgenerator/testdata/valid/windows/logging-receiver_files_refresh_interval/golden_fc00cb02b9b88c98bb35ef80a02c314d.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "log_source_id1" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/logging-receiver_files_refresh_interval/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/logging-receiver_files_refresh_interval/golden_fluent_bit_main.conf index ae90ed4179..c82f78ebe1 100644 --- a/confgenerator/testdata/valid/windows/logging-receiver_files_refresh_interval/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/logging-receiver_files_refresh_interval/golden_fluent_bit_main.conf @@ -95,13 +95,13 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [FILTER] Match pipeline1.log_source_id1 Name lua call process - script bbe493b54b165ca3149fd2168216ea97.lua + script fc00cb02b9b88c98bb35ef80a02c314d.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log|pipeline1\.log_source_id1)$ diff --git a/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_13322ed6829712e9e8004b6705b58020.lua b/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_13322ed6829712e9e8004b6705b58020.lua new file mode 100644 index 0000000000..80256c7c66 --- /dev/null +++ b/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_13322ed6829712e9e8004b6705b58020.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "log_source_id2" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_a8d53383411830cfac4f0703a037ce13.lua b/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_a8d53383411830cfac4f0703a037ce13.lua deleted file mode 100644 index 84aad71ea2..0000000000 --- a/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_a8d53383411830cfac4f0703a037ce13.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "log_source_id2" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_bbe493b54b165ca3149fd2168216ea97.lua b/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_bbe493b54b165ca3149fd2168216ea97.lua deleted file mode 100644 index 3cee714d27..0000000000 --- a/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_bbe493b54b165ca3149fd2168216ea97.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "log_source_id1" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_fc00cb02b9b88c98bb35ef80a02c314d.lua b/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_fc00cb02b9b88c98bb35ef80a02c314d.lua new file mode 100644 index 0000000000..74d61bd410 --- /dev/null +++ b/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_fc00cb02b9b88c98bb35ef80a02c314d.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "log_source_id1" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_fluent_bit_main.conf index b8c6b4871b..15b0d031ab 100644 --- a/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/logging-receiver_files_type_multiple_receivers/golden_fluent_bit_main.conf @@ -108,13 +108,13 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [FILTER] Match pipeline1.log_source_id1 Name lua call process - script bbe493b54b165ca3149fd2168216ea97.lua + script fc00cb02b9b88c98bb35ef80a02c314d.lua [FILTER] Key_Name key_5 @@ -126,7 +126,7 @@ Match pipeline2.log_source_id2 Name lua call process - script a8d53383411830cfac4f0703a037ce13.lua + script 13322ed6829712e9e8004b6705b58020.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log|pipeline1\.log_source_id1|pipeline2\.log_source_id2)$ diff --git a/confgenerator/testdata/valid/windows/logging-receiver_iis/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/logging-receiver_iis/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/logging-receiver_iis/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/logging-receiver_iis/golden_c5b697cda766386cf74173dbac076825.lua b/confgenerator/testdata/valid/windows/logging-receiver_iis/golden_c5b697cda766386cf74173dbac076825.lua deleted file mode 100644 index 3772e47389..0000000000 --- a/confgenerator/testdata/valid/windows/logging-receiver_iis/golden_c5b697cda766386cf74173dbac076825.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "iis_access" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/logging-receiver_iis/golden_c9761f27a0f7441060dbefa7435d026c.lua b/confgenerator/testdata/valid/windows/logging-receiver_iis/golden_c9761f27a0f7441060dbefa7435d026c.lua new file mode 100644 index 0000000000..a96778e869 --- /dev/null +++ b/confgenerator/testdata/valid/windows/logging-receiver_iis/golden_c9761f27a0f7441060dbefa7435d026c.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "iis_access" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/logging-receiver_iis/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/logging-receiver_iis/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/logging-receiver_iis/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/logging-receiver_iis/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/logging-receiver_iis/golden_fluent_bit_main.conf index 1e10c1162e..37381679c0 100644 --- a/confgenerator/testdata/valid/windows/logging-receiver_iis/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/logging-receiver_iis/golden_fluent_bit_main.conf @@ -94,7 +94,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [FILTER] Key_Name message @@ -143,7 +143,7 @@ Match iis.iis_access Name lua call process - script c5b697cda766386cf74173dbac076825.lua + script c9761f27a0f7441060dbefa7435d026c.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log|iis\.iis_access)$ diff --git a/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_all/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_all/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_all/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_all/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_all/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_all/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_all/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_all/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_all/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_all/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_iis/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_iis/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_iis/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_iis/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_iis/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_iis/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_iis/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_iis/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_iis/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_iis/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_mssql/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_mssql/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_mssql/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_mssql/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_mssql/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_mssql/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_mssql/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_mssql/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_mssql/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-default_overrides_disable_mssql/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/metrics-pipeline_multiple_pipelines/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/metrics-pipeline_multiple_pipelines/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/metrics-pipeline_multiple_pipelines/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/metrics-pipeline_multiple_pipelines/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/metrics-pipeline_multiple_pipelines/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/metrics-pipeline_multiple_pipelines/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/metrics-pipeline_multiple_pipelines/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-pipeline_multiple_pipelines/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/metrics-pipeline_multiple_pipelines/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-pipeline_multiple_pipelines/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_by_prefixes/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_globs/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_globs/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_globs/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_globs/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_globs/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_globs/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_globs/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_globs/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_globs/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_globs/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_special_chars/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_special_chars/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_special_chars/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_special_chars/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_special_chars/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_special_chars/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_special_chars/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_special_chars/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_special_chars/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-processor_exclude_metrics_type_filter_with_special_chars/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_active_directory_ds/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/metrics-receiver_active_directory_ds/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/metrics-receiver_active_directory_ds/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_active_directory_ds/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/metrics-receiver_active_directory_ds/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/metrics-receiver_active_directory_ds/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_active_directory_ds/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-receiver_active_directory_ds/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/metrics-receiver_active_directory_ds/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-receiver_active_directory_ds/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_apache/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/metrics-receiver_apache/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/metrics-receiver_apache/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_apache/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/metrics-receiver_apache/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/metrics-receiver_apache/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_apache/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-receiver_apache/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/metrics-receiver_apache/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-receiver_apache/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_apache_status_url/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/metrics-receiver_apache_status_url/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/metrics-receiver_apache_status_url/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_apache_status_url/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/metrics-receiver_apache_status_url/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/metrics-receiver_apache_status_url/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_apache_status_url/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-receiver_apache_status_url/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/metrics-receiver_apache_status_url/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-receiver_apache_status_url/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_custom_collection_interval/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/metrics-receiver_custom_collection_interval/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/metrics-receiver_custom_collection_interval/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_custom_collection_interval/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/metrics-receiver_custom_collection_interval/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/metrics-receiver_custom_collection_interval/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_custom_collection_interval/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-receiver_custom_collection_interval/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/metrics-receiver_custom_collection_interval/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-receiver_custom_collection_interval/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_iis_v2_duplicate/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/metrics-receiver_iis_v2_duplicate/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/metrics-receiver_iis_v2_duplicate/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_iis_v2_duplicate/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/metrics-receiver_iis_v2_duplicate/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/metrics-receiver_iis_v2_duplicate/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_iis_v2_duplicate/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-receiver_iis_v2_duplicate/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/metrics-receiver_iis_v2_duplicate/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-receiver_iis_v2_duplicate/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_iis_v2_override/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/metrics-receiver_iis_v2_override/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/metrics-receiver_iis_v2_override/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_iis_v2_override/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/metrics-receiver_iis_v2_override/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/metrics-receiver_iis_v2_override/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_iis_v2_override/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-receiver_iis_v2_override/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/metrics-receiver_iis_v2_override/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-receiver_iis_v2_override/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_jvm/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/metrics-receiver_jvm/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/metrics-receiver_jvm/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_jvm/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/metrics-receiver_jvm/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/metrics-receiver_jvm/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_jvm/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-receiver_jvm/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/metrics-receiver_jvm/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-receiver_jvm/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_jvm_missing_endpoint/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/metrics-receiver_jvm_missing_endpoint/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/metrics-receiver_jvm_missing_endpoint/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_jvm_missing_endpoint/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/metrics-receiver_jvm_missing_endpoint/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/metrics-receiver_jvm_missing_endpoint/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_jvm_missing_endpoint/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-receiver_jvm_missing_endpoint/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/metrics-receiver_jvm_missing_endpoint/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-receiver_jvm_missing_endpoint/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_mysql/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/metrics-receiver_mysql/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/metrics-receiver_mysql/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_mysql/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/metrics-receiver_mysql/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/metrics-receiver_mysql/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_mysql/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-receiver_mysql/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/metrics-receiver_mysql/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-receiver_mysql/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_mysql_missing_endpoint/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/metrics-receiver_mysql_missing_endpoint/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/metrics-receiver_mysql_missing_endpoint/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_mysql_missing_endpoint/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/metrics-receiver_mysql_missing_endpoint/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/metrics-receiver_mysql_missing_endpoint/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_mysql_missing_endpoint/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-receiver_mysql_missing_endpoint/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/metrics-receiver_mysql_missing_endpoint/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-receiver_mysql_missing_endpoint/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_nginx/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/metrics-receiver_nginx/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/metrics-receiver_nginx/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_nginx/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/metrics-receiver_nginx/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/metrics-receiver_nginx/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_nginx/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-receiver_nginx/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/metrics-receiver_nginx/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-receiver_nginx/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_nginx_missing_status_url/golden_23db17dcdd961f76aa7655f5e211c6f2.lua b/confgenerator/testdata/valid/windows/metrics-receiver_nginx_missing_status_url/golden_23db17dcdd961f76aa7655f5e211c6f2.lua new file mode 100644 index 0000000000..bf54290d77 --- /dev/null +++ b/confgenerator/testdata/valid/windows/metrics-receiver_nginx_missing_status_url/golden_23db17dcdd961f76aa7655f5e211c6f2.lua @@ -0,0 +1,28 @@ + +function process(tag, timestamp, record) +local __field_0 = (function() +if record["logging.googleapis.com/labels"] == nil +then +return nil +end +return record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] +end)(); +local __field_1 = (function() +return record["logging.googleapis.com/logName"] +end)(); +local v = __field_0; +if v == nil then v = "" end; +(function(value) +if record["logging.googleapis.com/labels"] == nil +then +record["logging.googleapis.com/labels"] = {} +end +record["logging.googleapis.com/labels"]["compute.googleapis.com/resource_name"] = value +end)(v) +local v = __field_1; +if v == nil then v = "windows_event_log" end; +(function(value) +record["logging.googleapis.com/logName"] = value +end)(v) +return 2, timestamp, record +end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_nginx_missing_status_url/golden_e264973cb9c4706d884bb5e07270adb3.lua b/confgenerator/testdata/valid/windows/metrics-receiver_nginx_missing_status_url/golden_e264973cb9c4706d884bb5e07270adb3.lua deleted file mode 100644 index 4eee31367e..0000000000 --- a/confgenerator/testdata/valid/windows/metrics-receiver_nginx_missing_status_url/golden_e264973cb9c4706d884bb5e07270adb3.lua +++ /dev/null @@ -1,12 +0,0 @@ - -function process(tag, timestamp, record) -local __field_0 = (function() -return record["logging.googleapis.com/logName"] -end)(); -local v = __field_0; -if v == nil then v = "windows_event_log" end; -(function(value) -record["logging.googleapis.com/logName"] = value -end)(v) -return 2, timestamp, record -end diff --git a/confgenerator/testdata/valid/windows/metrics-receiver_nginx_missing_status_url/golden_fluent_bit_main.conf b/confgenerator/testdata/valid/windows/metrics-receiver_nginx_missing_status_url/golden_fluent_bit_main.conf index 7a1f0efa85..8a5a2839a1 100644 --- a/confgenerator/testdata/valid/windows/metrics-receiver_nginx_missing_status_url/golden_fluent_bit_main.conf +++ b/confgenerator/testdata/valid/windows/metrics-receiver_nginx_missing_status_url/golden_fluent_bit_main.conf @@ -80,7 +80,7 @@ Match default_pipeline.windows_event_log Name lua call process - script e264973cb9c4706d884bb5e07270adb3.lua + script 23db17dcdd961f76aa7655f5e211c6f2.lua [OUTPUT] Match_Regex ^(default_pipeline\.windows_event_log)$ diff --git a/integration_test/ops_agent_test.go b/integration_test/ops_agent_test.go index e1cfa8268a..a80949fd1c 100644 --- a/integration_test/ops_agent_test.go +++ b/integration_test/ops_agent_test.go @@ -679,6 +679,46 @@ func TestModifyFields(t *testing.T) { }) } +func TestResourceNameLabel(t *testing.T) { + t.Parallel() + gce.RunForEachPlatform(t, func(t *testing.T, platform string) { + t.Parallel() + ctx, logger, vm := agents.CommonSetup(t, platform) + file1 := fmt.Sprintf("%s_1", logPathForPlatform(vm.Platform)) + + config := fmt.Sprintf(`logging: + receivers: + f1: + type: files + include_paths: + - %s + processors: + json: + type: parse_json + service: + pipelines: + p1: + receivers: [f1] + processors: [json] +`, file1) + + if err := setupOpsAgent(ctx, logger, vm, config); err != nil { + t.Fatal(err) + } + + line := `{"default_present":"original"}` + "\n" + if err := gce.UploadContent(ctx, logger, vm, strings.NewReader(line), file1); err != nil { + t.Fatalf("error uploading log: %v", err) + } + + // Expect to see the log with the modifications applied + check := fmt.Sprintf(`labels."compute.googleapis.com/resource_name"="%s" AND jsonPayload.default_present="original"`, vm.Name) + if err := gce.WaitForLog(ctx, logger.ToMainLog(), vm, "f1", time.Hour, check); err != nil { + t.Error(err) + } + }) +} + func TestTCPLog(t *testing.T) { t.Parallel() gce.RunForEachPlatform(t, func(t *testing.T, platform string) {