voxpupuli / puppet-kibana

Kibana Puppet module by Elastic.
Apache License 2.0
16 stars 48 forks source link

Plugins constantly try to install #17

Open minorOffense opened 6 years ago

minorOffense commented 6 years ago

Bug Report

Bug description

Expected behavior: Install kibana plugin once (e.g. wazuh)

Observed behavior: Constantly tries to reinstall the plugin on every puppet run even if I set a version. I'm not sure if it's an issue with the plugin itself or with the puppet module.

Example manifest:

  class { 'kibana':
    manage_repo => false,
    ensure => latest,
    config => {
      'server.host' => '0.0.0.0',
      'elasticsearch.url' => 'http://localhost:9200',
      'server.port' => '5601',
    },
    require => [Class['java'], Class['elastic_stack::repo']],
  } 

  kibana_plugin { 'wazuhapp':
    url => 'http://packages.wazuh.com/wazuhapp/wazuhapp.zip',
    version => '2.1.1',
    ensure => 'present',
  }

Puppet run logs:

Error: /Stage[main]/Coldfront::Profile::Elk/Kibana_plugin[wazuhapp]: Could not evaluate: Found previous install attempt. Deleting...
tylerjl commented 6 years ago

@minorOffense I see that the app is installed under the wazuh directory. If you change

kibana_plugin { 'wazuhapp' :

to

kibana_plugin { 'wazuh' :

Does that change anything?

minorOffense commented 6 years ago

Sorry I haven't had a chance to try yet. It's on my list for tomorrow. Thanks for the quick response though.

minorOffense commented 6 years ago

I renamed it and it removed the app completely. And the errors went away though. So I’m just going to reinstall kibana and see what it does now. This is a dev server for this new monitoring anyways. Want to make sure it’s a valid test.

Make sure none of my debugging is breaking anything.

minorOffense commented 6 years ago

Alright so I've tried to update to 6.1.0 and installed the plugin fresh and I still get the same error message.

Is there somewhere on the disk I can check for the plugin files? I can try to clear them out manually and run puppet again a few times to see if something's just stuck somehow.

tylerjl commented 6 years ago

The module just references the files in /usr/share/kibana/plugins. For context, the module looks for all plugin names in that directory, and if a plugin in the manifest isn't in that directory, it'll try and install it. The module provider uses the pre-existing /usr/share/kibana/bin/kibana-plugin command to install and remove plugins, so you can also use it to list plugins/remove/install to see what the behavior is.

elfranne commented 3 years ago

I ran into the same issue and the name of the plugin should be exactly the same as in /usr/share/kibana/plugins.

I was using a plugin named kibana-enhanced-table that got installed as enhancedTable. And yes it is case sensitive.