In addition to the basic projects, elk also do related migrations ....
Logstash say, the client only need to change the code logic Redis address on it, Logstash server directly docker pull mirroring on it.
Elasticsearch need to write our own script migration, because the Cross engine room import export, very time-consuming, about the migration of Elasticsearch, I write the next chapter, today's main write Kibana migration.
Kibana configuration of the migration, his configuration is in Elasticsearch inside, the following figure is Elasticsearch Kibana configuration information.
Business and log Elasticsearch are a cluster, the business data must be migrated past, as for the log even .... Our log, there are dozens of T per month, which for the migration, is very heavy ... Simply kill ....
The key point here is how to export and migrate the KIBANA4 configuration. If you are not lazy, you can use Pyhton to write a Elasticsearch export program, to achieve a very simple ... If you're as lazy as I am, then just use the ready-made tools. Elasticdump is a node.js development of a small and refined Elasticsearch export program. Python apt-get update apt-get install node.js curl-l https://npmjs.org/install.sh | SH ln-s/usr/bin/nodejs/bin/node npm insall elasticdump-g
1 2 3 4 5 6 7 8 9 10 |
Apt-get Update apt-get Install node. JS curl-l https://NPMJS. Org/install. SH | SH ln-s/usr/bin/nodejs/bin/node npm insall elasticdump-g |
Export, can also be used to do elasticsearch backup, Elasticdump can selectively export data and mapping.
Python specific configuration information elasticdump--ignore-errors=true--scrolltime=120m--bulk=true--input=http://xxxxx:9200/.kibana-- Output=data.json--type=data Export mapping information elasticdump--ignore-errors=true--scrolltime=120m--bulk=true--input=http ://xxxxxx/.kibana--output=mapping.json--type=mapping
1 2 3 4 5 6 |
Specific configuration information Elasticdump--ignore-errors = true--Scrolltime = 120m--bulk = true--input = http://xxxxx:9200 / . Kibana--output = data. JSON--type = data export mapping information elasticdump--ignore-errors = true--Scrolltime = 120m--bulk = true--I Nput = http://XXXXXX/. Kibana--Output = mapping. JSON--type = mapping |
Let's import the data we just backed up to the target elasticsearch.
Python Import Mapping elasticdump--input=mapping.json--output=http://xxxxxxx:9000/.kibana--type=mapping Import specific Kibana configuration information elasticdump--input=data.json--output=http://xxxxx:9000/.kibana--type=data
1 2 3 4 5 6 |
Import mapping elasticdump-input = mapping. JSON-output = http://xxxxxxx:9000/. Kibana--type = mapping Import specific Kibana configuration information elasticdump--input = data. JSON-output = http://xxxxx:9000/. Kibana--type = data |
Elasticdump Walk up ...
Summary, through Elasicdump we can easily backup Kibana configuration, or migration.