Installation of kopf plugin for elasticsearch 5.1.1?

9.4k views Asked by At

Actually i have elasticsearch 5.1.1 and tried downloading kopf plugin with the following commands and i got a error like this ..Can u help me in solving this problem??

C:\Users\896323\Downloads\elasticsearch-5.1.1\elasticsearch-5.1.1\bin>plugin install lmenezes/elasticsearch-kopf/2.1.1 A tool for managing installed elasticsearch plugins

Commands

  • list - Lists installed elasticsearch plugins
  • install - Install a plugin
  • remove - Removes a plugin from elasticsearch

Non-option arguments: command

Option Description ------ -----------

  • -h, --help show help
  • -s, --silent show minimal output
  • -v, --verbose show verbose output

ERROR: Unknown plugin lmenezes/elasticsearch-kopf/2.1.1

2

There are 2 answers

0
Purija Beigi On

The plugin you are trying to use is not compatible with your elasticsearch version 5.x.

Further there is no compatible depency for the plugin uri "lmenezes/elasticsearch-kopf/2.1.1" which results to your already mentioned error "Unknown plugin lmenezes/elasticsearch-kopf/2.1.1". Additional plugin uri depencies are unknowen and not commited by producers.

I was trying to use a localy kopf plugin outsite the plugins space of elasticsearch with but thats not working correctly without configurations.

The alternative plugin Head is not available for es version 5.1 too which makes it worse.

If somebody knows some good alternatives beside an own custom modification of those plugins i would be glad.

Solution 1 :

Use a standalone head plugin which is described here: https://github.com/mobz/elasticsearch-head#running-with-built-in-server

The important part is to enable cors for your es-5.x

Solution 2 : Use a standalone kopf plugin from here : https://github.com/lmenezes/elasticsearch-kopf/blob/master/README.md

  1. clone or download the sources
  2. enable cors for es-5.x by elasticsearch.yml modification
  3. modify / customize kopf sources

Step 1

git clone git://github.com/lmenezes/elasticsearch-kopf.git

Step 2

Modifiy the elasticsearch.yml

#enable cors for standalone plugins
http.cors.enabled: true
http.cors.allow-origin: "*"

Step 3 Add a property for elasticsearch port in _site/kopf_external_settings.json. sample

{
    "elasticsearch_root_path": "",
    "elasticsearch_port": 9200,
    "with_credentials": false,
    "theme": "dark",
    "refresh_rate": 5000
}

Modify javascript of _site/dist/kopf.js

1- Add a constant for the port value beginning in line 5562

var ES_PORT = 'elasticsearch_port';

2- Add a getter for the property beginning in line 5615

this.getElasticsearchPort = function () {
    return this.getSettings()[ES_PORT];
};

3- Replace $location.port(); with ExternalSettingsService.getElasticsearchPort(); on line 1269

4- avoid the nervouse amount of version compatibility alerts beginning on line 1215 sample could be a different version , though throw the alert once

    $scope.version = '2.1.2';

    $scope.modal = new ModalControls();
    var alertedOnce = false;

    $scope.$watch(
        function () {
            return ElasticService.cluster;
        },
        function (newValue, oldValue) {
            var version = ElasticService.getVersion();
            if (version && version.isValid()) {
                var major = version.getMajor();
                if (major != parseInt($scope.version.charAt(0)) && !alertedOnce) {
                    AlertService.warn(
                        'This version of kopf is not compatible with your ES version',
                        'Upgrading to newest supported version is recommeded'
                    );
                    alertedOnce = true;
                }
            }
        }
    );
1
jordivador On

As far as I know in Elasticsearch version 5 there are no possibility to add site plugins into Elasticsearch, all site plugins must be implemented as kibana plugins. Plugin changes elastic v5

In other hand, the kopf creator it's working on isolated plugin for elasticsearch > v5

You can check it here:

https://github.com/lmenezes/cerebro