mobz / elasticsearch-head

A web front end for an elastic search cluster
http://mobz.github.io/elasticsearch-head/
Other
9.41k stars 2.02k forks source link

h1. elasticsearch-head

h2. A web front end for an Elasticsearch cluster

h3. "http://mobz.github.io/elasticsearch-head":http://mobz.github.io/elasticsearch-head

h2. Running

There are multiple ways of running elasticsearch-head.

h4. Running with built in server

This will start a local webserver running on port 9100 serving elasticsearch-head

h4. Running with docker

h4. Running as a Chrome extension

h4. Running as a plugin of Elasticsearch (deprecated)

This will automatically download the appropriate version of elasticsearch-head from github and run it as a plugin within the elasticsearch cluster. In this mode elasticsearch-head automatically connects to the node that is running it

h4. Running with the local proxy

This is an experimental feature which creates a local proxy for many remote elasticsearch clusters

At the moment it only works with @grunt server@ running on http://localhost:9100

h4. Alternatives

h3. Connecting to elasticsearch

By default elasticsearch exposes a http rest API on port 9200 which elasticsearch-head connects to.

h4. Enable CORS in elasticsearch

When not running as a Chrome extension or as a plugin of elasticsearch (which is not even possible from version 5), you must enable "CORS":https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-http.html in elasticsearch, or else your browser will reject elasticsearch-head's requests due to violation of the same-origin policy.

In elasticsearch configuration;

h4. Basic Authentication

elasticsearch-head will add basic auth headers to each request if you pass in the "correct url parameters":#url-parameters You will also need to add @http.cors.allow-headers: Authorization@ to the elasticsearch configuration

h4. x-pack

elasticsearch x-pack requires basic authentication and CORS as described above. Make sure you have the correct CORS setup and then open es-head with a url like "http://localhost:9100/?auth_user=elastic&auth_password=changeme"

h4. URL Parameters

Parameters may be appended to the url to set an initial state eg. @head/index.html?base_uri=http://node-01.example.com:9200@

h4. Contributing

To contribute to elasticsearch-head you will need the following developer tools

git and a "github":https://github.com/ account

"node ( including npm )":http://nodejs.org/download

"grunt-cli":http://gruntjs.com/getting-started

(to run jasmine tests) "phantomjs":http://phantomjs.org

Then

create a fork of elasticsearch-head on github

clone your fork to your machine

@cd elasticsearch-head@

@npm install@ # downloads node dev dependencies

@grunt dev@ # builds the distribution files, then watches the src directory for changes (if you have an warning like "Warning: Task "clean" failed. Use --force to continue.", well use --force ;) )

Changes to both _site and src directories must be committed, to allow people to run elasticsearch-head without running dev tools and follow existing dev patterns, such as indenting with tabs.

h5. Contributing an Internationalisation

To contribute an internationalisation

Follow "Contributing" instructions above

Find your 2-character "ISO 639-1 language code":http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes

edit _site/index.html to add your 2 letter language code to the data-langs attribute of this line @@

make a copy of @src/app/langs/en_strings.js@ prefixed with your language code

convert english strings and fragments to your language. "Formatting Rules":http://docs.oracle.com/javase/tutorial/i18n/format/messageintro.html

Submit a pull request

!http://mobz.github.com/elasticsearch-head/screenshots/clusterOverview.png(ClusterOverview Screenshot)!