diff --git a/filebeat/tests/system/test_base.py b/filebeat/tests/system/test_base.py index ba21f21c2f6..c4137f6c7f7 100644 --- a/filebeat/tests/system/test_base.py +++ b/filebeat/tests/system/test_base.py @@ -40,3 +40,19 @@ def test_template(self): assert exit_code == 0 assert self.log_contains('Loaded index template') assert len(es.cat.templates(name='filebeat-*', h='name')) > 0 + + @unittest.skipUnless(INTEGRATION_TESTS, "integration test") + def test_template_migration(self): + """ + Test that the template can be loaded with `setup --template` + """ + es = Elasticsearch([self.get_elasticsearch_url()]) + self.render_config_template( + elasticsearch={"host": self.get_elasticsearch_url()}, + ) + exit_code = self.run_beat(extra_args=["setup", "--template", + "-E", "setup.template.overwrite=true", "-E", "migration.enabled=true"]) + + assert exit_code == 0 + assert self.log_contains('Loaded index template') + assert len(es.cat.templates(name='filebeat-*', h='name')) > 0 diff --git a/metricbeat/docs/fields.asciidoc b/metricbeat/docs/fields.asciidoc index 876c5eb29b5..6c3d0bf40bf 100644 --- a/metricbeat/docs/fields.asciidoc +++ b/metricbeat/docs/fields.asciidoc @@ -20073,16 +20073,6 @@ RabbitMQ module -*`rabbitmq.node.name`*:: -+ --- -type: keyword - -Node name - - --- - *`rabbitmq.vhost`*:: + -- @@ -20103,9 +20093,7 @@ connection *`rabbitmq.connection.name`*:: + -- -type: alias - -alias to: rabbitmq.name +type: keyword The name of the connection with non-ASCII characters escaped as in C. @@ -20663,13 +20651,10 @@ Number of messages which have been written to the message store. *`rabbitmq.node.name`*:: + -- -type: alias - -alias to: rabbitmq.node.name +type: keyword Node name - -- *`rabbitmq.node.proc.total`*:: diff --git a/metricbeat/module/rabbitmq/_meta/fields.yml b/metricbeat/module/rabbitmq/_meta/fields.yml index f964967e8e4..5abfd082dd8 100644 --- a/metricbeat/module/rabbitmq/_meta/fields.yml +++ b/metricbeat/module/rabbitmq/_meta/fields.yml @@ -9,11 +9,6 @@ type: group description: > fields: - - name: node.name - type: keyword - description: > - Node name - - name: vhost type: keyword description: > diff --git a/metricbeat/module/rabbitmq/connection/_meta/fields.yml b/metricbeat/module/rabbitmq/connection/_meta/fields.yml index d595cc97928..566bad10753 100644 --- a/metricbeat/module/rabbitmq/connection/_meta/fields.yml +++ b/metricbeat/module/rabbitmq/connection/_meta/fields.yml @@ -5,9 +5,7 @@ release: ga fields: - name: name - type: alias - path: rabbitmq.name - migration: true + type: keyword description: > The name of the connection with non-ASCII characters escaped as in C. - name: vhost diff --git a/metricbeat/module/rabbitmq/fields.go b/metricbeat/module/rabbitmq/fields.go index dc6b1555610..30e982f3b3f 100644 --- a/metricbeat/module/rabbitmq/fields.go +++ b/metricbeat/module/rabbitmq/fields.go @@ -32,5 +32,5 @@ func init() { // AssetRabbitmq returns asset data. // This is the base64 encoded gzipped contents of ../metricbeat/module/rabbitmq. func AssetRabbitmq() string { - return "eJzsWs2S27gRvs9TdOlib9WY5VznkKqNN7vxYVze2JscUqmpFtgiEYEAjQalYVJ591QD1D85kmZIO9msTjMS2f193Y3+AfAGltTegcf5XIfqyw1A0MHQHcz+HL+6/3l2A5ATK6/roJ29g9/fAABsfobK5Y2hGwBPhpDpDgq8AWAKQduC7+BvM2Yzu4VZGUI9+/sNwEKTyfkuynkDFis6QCCf0NYiybum7r7pwXAoaV+adTll8uf2l43IJbVr5/O973sFp88Hl1OUeHOiYVU6Di+T/hftQ4MGRFKUCmsdSrDOvvn+07v370GV6FEF8gzECmvKARm0hXfZCR7lrCUlak5A7VvxDKReKYeO3XyOTX9g/kPL76Cg0chHv9QYyp3/j70mn0oXHhPc4JvjX5+gI5/PZXIhuAWEkvYoPsfc8EQIXEWz7+UX8RwlmvbpNUz+SnbyyugO/IXJR0j9MGWpPzvWetLEi/Fuk0Y/XlWitWSOkSXMxtniGeHdVHPyEuAb4eDsUbA/CeahwscR8VT4qKum6sOFxrg15ZfiW3isaER09x2ymnylmfXcELD+Z0wOmLTBa21h3gbi7yA4sFS4oDF0y0kZTTZwdiR54XyF4S6918tEEPeSOC0Zl1i5rXsSWr8NB7PUszR/Ir8iH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BeRO8UDW6FCNmDdOQMXy5ByOcS+kxJQt7w+ciNQnJfcLAlZ0JYmnM9bjOLx6yHos4PcD2N8PYP83D2DpUZmG9WpSrJp3euB1PDUqkcGtLfmHWuff/TZufXIYOr56dlKIIg+yQgYfpC0WJ7/yjbXaFq9uYd4EqLCVgJj9i1urtC1u4Z6LeKj37xnoxaE/5JnSO6tZ2yKDn+X7TYuAnsA4FU+TnQVxXCAf3cGpOZMnVOM92WBayN3abuORy/RfKAEj/IYF/yt56NXAivFFU8UblxU+PtReO69DO1nhv1EAhlZkOG7qO9sEB9zUw9fflLPcVOR5ovpsJ/+M+iZooznGclari4Fshio1eUU2YHHlGvjRpwZ+E5SyQ8PrOYW19JRvs7exg/i/7O13KVQOoi4WUcGBrirKNQaS6CGjJatu+9Tg9ljC51IzKLQSW4Y4BqAV+RLS2+dSzOpKS8zOW7AU1s4v5YGCOOH1UHtaUFBlOvc9cz4dS8pRnfypqVIFjnmb+iyLamnd2lBeUL6zwOtksJzqUA7kxiOYUxygHxyf7yGa8G5DNM3Uc5Bk/+C63VOCL9356b33PYBxcoOrk9sYCfd0xj+Mxqm90Gf5uI1J7dVSgAMwVyH/er4ZWsAT3v4hz5oD2XFPcj9LFtnfI7dqdqQ69CkTvI77PZo1tiwL6W3aRj1aFlemp3gweVXOt9cN7YcPA86S+0M85o/BFyf73a4RNwphdDh4AGR2SsfqJ5YxW9K3oK0yTbxczQHV8hZKwjqm8s31QuDgGxUaPzRQjNNrWcrjFhDHDpRtmfcD8nRKHW/GRBNo3nQ62ioCHSA2OEPrLlJI8/hvw2FvdnURif8EAAD//7kV3Nc=" } diff --git a/metricbeat/module/rabbitmq/node/_meta/fields.yml b/metricbeat/module/rabbitmq/node/_meta/fields.yml index 11ab0f69836..dce18fec55f 100644 --- a/metricbeat/module/rabbitmq/node/_meta/fields.yml +++ b/metricbeat/module/rabbitmq/node/_meta/fields.yml @@ -111,10 +111,8 @@ description: > Number of messages which have been written to the message store. - name: name - type: alias - path: rabbitmq.node.name - migration: true - description: > + type: keyword + description: Node name - name: proc.total type: long diff --git a/metricbeat/tests/system/test_base.py b/metricbeat/tests/system/test_base.py index e5d58e0284d..146cdd064ac 100644 --- a/metricbeat/tests/system/test_base.py +++ b/metricbeat/tests/system/test_base.py @@ -75,3 +75,25 @@ def test_dashboards(self): assert exit_code == 0 assert self.log_contains("Kibana dashboards successfully loaded.") + + @unittest.skipUnless(INTEGRATION_TESTS, "integration test") + def test_migration(self): + """ + Test that the template loads when migration is enabled + """ + + es = Elasticsearch([self.get_elasticsearch_url()]) + self.render_config_template( + modules=[{ + "name": "apache", + "metricsets": ["status"], + "hosts": ["localhost"], + }], + elasticsearch={"host": self.get_elasticsearch_url()}, + ) + exit_code = self.run_beat(extra_args=["setup", "--template", + "-E", "setup.template.overwrite=true", "-E", "migration.enabled=true"]) + + assert exit_code == 0 + assert self.log_contains('Loaded index template') + assert len(es.cat.templates(name='metricbeat-*', h='name')) > 0