Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ibrahimgunduz34/0efc2e9d6f985565728741388f2204e3 to your computer and use it in GitHub Desktop.
Save ibrahimgunduz34/0efc2e9d6f985565728741388f2204e3 to your computer and use it in GitHub Desktop.
How To Install New License File To Elasticsearch

How To Install New License File To Elasticsearch

Check the elasticsearch version with the following request

$ curl http://<host>:9200/

You should see a response like the following which contains all the version information:

{
  "name" : "10.0.0.168",
  "cluster_name" : "api",
  "cluster_uuid" : "9bLO8dZQSPuT0QWBEPj1qg",
  "version" : {
    "number" : "2.4.6",
    "build_hash" : "5376dca9f70f3abef96a77f4bb22720ace8240fd",
    "build_timestamp" : "2017-07-18T12:17:44Z",
    "build_snapshot" : false,
    "lucene_version" : "5.5.4"
  },
  "tagline" : "You Know, for Search"
}

Then check the license status with the following request. You can not install a new license if the license is not expired yet.

$ curl http://<host>:9200/_license

You should see a response like the following and this response is about a still valid license response by the current date.

{
  "license" : {
    "status" : "active",
    "uid" : "8a737d25-dfa0-41e7-9996-357e9a95e476",
    "type" : "basic",
    "issue_date" : "2017-12-18T00:00:00.000Z",
    "issue_date_in_millis" : 1513555200000,
    "expiry_date" : "2018-12-18T23:59:59.999Z",
    "expiry_date_in_millis" : 1545177599999,
    "max_nodes" : 100,
    "issued_to" : "Ibrahim Gunduz (example.ro)",
    "issuer" : "Web Form"
  }
}

For installing a new elasticsearch license, you should visit the following page and download the version file which related your elasticsearch version.

https://license.elastic.co/registration/download/797f650e-6429-4414-ac8e-7454aca1894c

After you downloaded the file, install the liencese with the following request.

$ curl -XPUT http://<host>:9200/_license -d@new_license_filename.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment