メイン コンテンツをスキップする 補完的コンテンツへスキップ

リモートのElasticsearchクラスターから再インデックス化

LogstashとTalend ESBのインデックスを再インデックス化する必要があります。

手順

  1. 以下のコマンドを実行し、既存のインデックスをすべて表示します。
    curl -XGET 'oldhost9200/_cat/indices'
    oldhostを7.2.xで使用されているElasticsearchクラスターのIPアドレスまたはホスト名に置き換えます。
  2. 7.3.xで使用されているインデックスから8.0.xで使用されているインデックスにドキュメントをプルするように、リモートクラスターからLogstashインデックスを再インデックス化します。
    curl -XPOST 'localhost:9200/_reindex?pretty' -H 'Content-Type: application/json' -d'
    {
      "source": {
        "remote": {
          "host": "http://oldhost:9200"
        },
        "index": "logstash-YYYY.MM.dd"
      },
      "dest": {
        "index": "logstash-YYYY.MM.dd"
      }
    }
    '
  3. 7.3.xで使用されているインデックスから8.0.xで使用されているインデックスにドキュメントをプルするように、リモートクラスターからTalend ESBインデックスを再インデックス化します。
    curl -XPOST 'localhost:9200/_reindex?pretty' -H 'Content-Type: application/json' -d'
    {
      "source": {
        "remote": {
          "host": "http://oldhost:9200"
        },
        "index": "talendesb-YYYY.MM.dd"
      },
      "dest": {
        "index": "talendesb-YYYY.MM.dd"
      }
    }
    '
    情報メモ注:

    すべてのlogstash-YYYY.MM.ddtalendesb-YYYY.MM.ddインデックスを1つずつ移行するか、または移行するインデックスのみを選択してください。

    インデックス名にlogstash-*を指定すると、以下のようなエラーが返されます:

    インデックス名にlogstash-*またはtalendesb-*を指定すると、以下のようなエラーが返されます:

    "failures" : [
    {
    "index" : "logstash-*",
    "type" : "xxxxxxxx",
    "id" : "xxxxxxxxxxxxxx",
    "cause" : {
    "type" : "invalid_index_name_exception",
    "reason" : "Invalid index name [logstash-*], must not contain the following characters [ , \", *, \\, <, |, ,, >, /, ?]",
    "index_uuid" : "_na_",
    "index" : "logstash-*"
    },
    "status" : 400
    },
    {
    "index" : "logstash-*",
    "type" : "xxxxxx",
    "id" : "xxxxxxxxxxxxxxx",
    "cause" : {
    "type" : "invalid_index_name_exception",
    "reason" : "Invalid index name [logstash-*], must not contain the following characters [ , \", *, \\, <, |, ,, >, /, ?]",
    "index_uuid" : "_na_",
    "index" : "logstash-*"
    },
    "status" : 400
    }
    ]

このページは役に立ちましたか?

このページまたはコンテンツに、タイポ、ステップの省略、技術的エラーなどの問題が見つかった場合は、お知らせください。改善に役立たせていただきます。