Giter Site home page Giter Site logo

voxpupuli / puppet-kibana Goto Github PK

View Code? Open in Web Editor NEW
16.0 265.0 49.0 393 KB

Kibana Puppet module by Elastic.

License: Apache License 2.0

Ruby 87.57% Puppet 12.43%
puppet kibana hacktoberfest amazon-puppet-module centos-puppet-module debian-puppet-module fedora-puppet-module linux-puppet-module redhat-puppet-module ubuntu-puppet-module

puppet-kibana's Introduction

Kibana Puppet Module

Build Status Release Puppet Forge Puppet Forge - downloads Puppet Forge - endorsement Puppet Forge - scores puppetmodule.info docs Apache-2.0 License

Table of Contents

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Setup - The basics of getting started with Kibana
  4. Usage - Configuration options and additional functionality
  5. Reference - An under-the-hood peek at what the module is doing and how
  6. Limitations - OS compatibility, etc.
  7. Development - Guide for contributing to the module

Overview

This module manages Kibana for use with Elasticsearch.

Module Description

In addition to managing the Kibana system package and service, this module also exposes options to control the configuration file for Kibana. Kibana plugins are also supported via a native type and provider.

Dependencies are fairly standard (such as stdlib).

Setup

What Kibana affects

  • The kibana system package and service
  • /etc/kibana/kibana.yml
  • /usr/share/kibana/plugins/*

Setup Requirements

In addition to basic puppet settings (such as pluginsync), ensure that the required dependencies for the module are met (these are listed in metadata.json and listed in the Puppet Forge).

Beginning with kibana

Quick start:

class { 'kibana' : }

Usage

In order to control Kibana's configuration file, use the config parameter:

class { 'kibana':
  config => {
    'server.port' => '8080',
  }
}

The kibana class also supports additional values for the ensure parameter that will be passed along to the package resource for Kibana. For example, to ensure the latest version of Kibana is always installed:

class { 'kibana': ensure => latest }

In order to explicitly ensure that version 5.2.0 of Kibana is installed:

class { 'kibana': ensure => '5.2.0' }

Package revisions are supported too:

class { 'kibana': ensure => '5.2.2-1' }

The kibana class also supports removal through use of ensure => absent:

class { 'kibana': ensure => absent }

OSS Packages and Repository Management

This module uses the puppet/elastic_stack module to manage the elastic package repositories. In order to control which major version of package repository to manage, declare the associated repository version in the elastic_stack::repo class. For example, to explicitly set the repository version to 5 instead of the default (which, at the time of this writing, is 6):

class { 'elastic_stack::repo':
  version => 5,
}

class { 'kibana':
  ensure => latest
}

This module defaults to the upstream package repositories, which as of 6.3, includes X-Pack. In order to use the purely OSS (open source) package and repository, the appropriate oss flag must be set on the elastic_stack::repo and kibana classes:

class { 'elastic_stack::repo':
  oss => true,
}

class { 'kibana':
  oss => true,
}

Plugins

Kibana plugins can be managed by this module.

Kibana 5.x & 6.x

In the most basic form, official plugins (provided by Elastic) can simply be specified by name alone:

kibana_plugin { 'x-pack': }

The type also supports installing third-party plugins from a remote URL:

kibana_plugin { 'health_metric_vis':
  url => 'https://github.com/DeanF/health_metric_vis/releases/download/v0.3.4/health_metric_vis-5.2.0.zip',
}

When updating plugins, it is important to specify the version of the plugin that should be installed. For example, the preceding block of code installed version 0.3.4 of the health_metric_vis plugin. In order to update that plugin to version 0.3.5, you could use a resource such as the following:

kibana_plugin { 'health_metric_vis':
  url => 'https://github.com/DeanF/health_metric_vis/releases/download/v0.3.5/health_metric_vis-5.2.0.zip',
  version => '0.3.5',
}

Plugins can also be removed:

kibana_plugin { 'x-pack': ensure => absent }

Kibana 4.x

Plugin operations are similar to 6.x resources, but in keeping with the kibana command-line utility, an organization and version must be specified:

kibana_plugin { 'marvel':
  version => '2.4.4',
  organization => 'elasticsearch',
}

The version and organization parameters correspond to the same values for a given plugin in the plugin's documentation, and the provider assembles the correct name on the backend on your behalf. For instance, the previous example will be translated to

kibana plugin --install elasticsearch/marvel/2.4.4

For you. Removal through the use of ensure => absent is the same as for 5.x plugins.

Reference

Class parameters are available in the auto-generated documentation pages. Autogenerated documentation for types, providers, and ruby helpers is also available on the same documentation site.

Limitations

This module is actively tested against the versions and distributions listed in metadata.json.

Development

See CONTRIBUTING.md with help to get started.

Quickstart

Install gem dependencies:

$ bundle install

Run the test suite (without acceptance tests):

$ bundle exec rake test

Run acceptance tests against a platform (requires Docker):

$ bundle exec rake beaker:centos-7-x64

Support

Need help? Join us in #Kibana on Freenode IRC or on the https://discuss.elastic.co/c/kibana discussion forum.

puppet-kibana's People

Contributors

anesterova avatar bastelfreak avatar baurmatt avatar elasticdog avatar farlerac avatar hex2a avatar jmlrt avatar maxadamo avatar mgreau avatar mmoll avatar mzahorik avatar root-expert avatar rwaffen avatar smokris avatar smortex avatar soxwellfb avatar stjmt avatar tylerjl avatar zilchms avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

puppet-kibana's Issues

Support alternative package & service name for Kibana

Hi,

Firstly, thanks so much for finally coming out with an "Elastic" Kibana module! I'd love to start making use of the module, but can't because I rebuild Kibana from source to add additional features and name the package (& service) differently in order to de-conflict with the official release.

Could I please request that you support alternative names for the package and service resources?

Many thanks,
Nick G

Getting a cyclic dependency when trying to install kibana.

Bug Report

  • Module version: 6.0.0
  • Puppet version: puppetserver version 5.1.4
  • OS and version: Ubuntu 16.04.3 LTS

Bug description

Expected behavior:
I'm expecting kibana to install.

Observed behavior:
I get an error about a cyclic dependency.

I have managed to successfully install logstash and elasticsearch on the same server..

Example manifest:

  # install kibana

  class { 'kibana':
    config => {
      'server.host'       => $::role::elk::kibana_addr,
      'server.port'       => '5601',
      'elasticsearch.url' => "http://${::role::elk::elasticsearch_url}:${::role::elk::elasticsearch_port}",
    }
  }

Puppet run logs:

Error: Found 1 dependency cycle:
(Exec[apt_update] => Class[Apt::Update] => Package[apt-transport-https] => Exec[apt_update])
Cycle graph written to /opt/puppetlabs/puppet/cache/state/graphs/cycles.dot.
Error: Failed to apply catalog: One or more resource dependency cycles detected in graph

cycles

kibana_plugin fails version change unless installed plugin is first removed (feature request)

PE3.8
CentOS 6.8
x-pack 5.4.2
kibana 5.4.2 -> 5.6.8 successfully
attempt upgrade to x-pack 5.6.8

Notice: /Stage[main]/Profile::Kibana/Profile::Kibana_plugin[x-pack]/Exec[install-/opt/staging/profile/x-pack-5.6.8.zip]/returns: Attempting to transfer from file:///opt/staging/profile/x-pack-5.6.8.zip
Notice: /Stage[main]/Profile::Kibana/Profile::Kibana_plugin[x-pack]/Exec[install-/opt/staging/profile/x-pack-5.6.8.zip]/returns: Transferring 119517805 bytes....................
Notice: /Stage[main]/Profile::Kibana/Profile::Kibana_plugin[x-pack]/Exec[install-/opt/staging/profile/x-pack-5.6.8.zip]/returns: Transfer complete
Notice: /Stage[main]/Profile::Kibana/Profile::Kibana_plugin[x-pack]/Exec[install-/opt/staging/profile/x-pack-5.6.8.zip]/returns: Retrieving metadata from plugin archive
Notice: /Stage[main]/Profile::Kibana/Profile::Kibana_plugin[x-pack]/Exec[install-/opt/staging/profile/x-pack-5.6.8.zip]/returns: Extracting plugin archive
Notice: /Stage[main]/Profile::Kibana/Profile::Kibana_plugin[x-pack]/Exec[install-/opt/staging/profile/x-pack-5.6.8.zip]/returns: Extraction complete
Notice: /Stage[main]/Profile::Kibana/Profile::Kibana_plugin[x-pack]/Exec[install-/opt/staging/profile/x-pack-5.6.8.zip]/returns: Plugin x-pack already exists, please remove before installing a new version```

I've obviously solved the plugin issue superficially, but could you update the module to handle this?

feature request: handle plugin version changes

kibana plugin installation and directory permissions issue

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 7.93
  • Ruby:
  • Distribution: CentOS Stream 8 (el8)
  • Module version: 7.0.1

How to reproduce (e.g Puppet code you use)

Attempting to install a Kibana plugin using the resource:

kibana_plugin { 'xx':
                url => 'https://{URL for a Kibana plugin}',
        }

What are you seeing

Error: /Stage[main]/Gms::Monitor/Kibana_plugin[xx]: Could not evaluate: 

What behaviour did you expect instead

Plugin should install

Log file

Executing with uid=kibana gid=kibana: '/usr/share/kibana/bin/kibana-plugin install https://...'

Any additional information you'd like to impart

The issue seems to be the use of uid and gid = kibana on this system. I can work around the problems by setting owner and group to kibana on /usr/share/kibana/plugins directory, though the package installation leaves that directory as root owned.

Allow service to be managed outside of kibana class

To aid in a dependency/order chain it would be nice to either have "unmanaged" or a new option "external" in "kibana::status" completely skip everything within the "kibana::service" class or allow adding "requires" to the service that is defined there.

In our case, we are setting a configuration that has a dependency on SSL certificates and if the certificates are not present or permissions do not allow the kibana service access, it fails to start until other things have completed. As we are using facls, we cannot put the dependency on kibana as the username will not exist until it has been installed.

If time allows, I may try to do a PR w/ the external scenario described above.

Plugin install should either update existing plugin or break with error

Bug Report

Plugin install should either update existing plugin or break with error. Currently it fails silently and puppetrun seems to be successful.

  • Module version:
    6.3.0
  • Puppet version:
    4.10.12
  • OS and version:
    Linux mtis-es-portal-wfe-qa001 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64 GNU/Linux

Bug description

Expected behavior:
kibana_plugin should update existing plugin or break with error. 6.4.2-15 should be installed.

Observed behavior:
kibana_plugin does not update the existing plugin and continues without failing. 6.3.0-13 is still installed.

Example manifest:

  kibana_plugin { 'searchguard':
    url     => 'https://oss.sonatype.org/service/local/repositories/releases/content/com/floragunn/search-guard-kibana-plugin/6.4.2-15/search-guard-kibana-plugin-6.4.2-15.zip',
  }

Puppet run logs:

Output from puppetboard and thus somewhat convoluted. sry

Oct 11 2018 - 17:34:17 | /Stage[main]/Profile::Elasticsearch::Elasticsearch/Elasticsearch::Plugin[com.floragunn:search-guard-6:6.4.2-23.1]/Elasticsearch_plugin[com.floragunn:search-guard-6:6.4.2-23.1]/ensure 
created

Support apt module 4.x.x

I was starting to write my own puppet module for the ELK stack, but realized it's already done by you guys at elastic. However, I'm not able to use this kibana module because this module is incompatible with apt module 4.1.0.

The puppet-elasticsearch module however has this:

{
      "name": "puppetlabs/apt",
      "version_requirement": ">= 2.0.0 < 5.0.0"
}

Can we update puppet-kibana to support the same?

kibana_plugin fails with "Error: /Stage[main]/Testserver/Kibana_plugin[x-pack]: Could not evaluate: Attempting to transfer from x-pack"

Bug Report

  • Module version: 6.0.1
  • Puppet version: 4.10.10
  • OS and version: CentOS Linux release 7.4.1708 (Core)

Bug description

Expected behavior:
the example manifest below should install Kibana 6.2.3 and x-pack

Observed behavior:
Kibana is installed, x-pack installation fails with:

Error: /Stage[main]/Testserver/Kibana_plugin[x-pack]: Could not evaluate: Attempting to transfer from x-pack
Attempting to transfer from https://artifacts.elastic.co/downloads/kibana-plugins/x-pack/x-pack-6.2.3.zip
Picked up proxy http://172.16.136.10:8181/ from environment variable.

When specifying a different version e.g. 6.0.0, I am getting similar but not identical errors:

Error: /Stage[main]/Testserver/Kibana_plugin[x-pack]: Could not evaluate: Attempting to transfer from x-pack
Attempting to transfer from https://artifacts.elastic.co/downloads/kibana-plugins/x-pack/x-pack-6.0.0.zip

Example manifest:

  class{'kibana':
    ensure      => latest,
    manage_repo => true,
  }

  kibana_plugin{'x-pack':
    ensure => present,
  }

Puppet run logs:

[root@ptest01 modules]# puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for ptest01.insiders.intern
Info: Applying configuration version '1523604295'
Notice: /Stage[main]/Kibana::Service/Service[kibana]/ensure: ensure changed 'stopped' to 'running'
Info: /Stage[main]/Kibana::Service/Service[kibana]: Unscheduling refresh on Service[kibana]
Notice: /Stage[main]/Testserver/Kibana_plugin[x-pack]/ensure: created
Error: /Stage[main]/Testserver/Kibana_plugin[x-pack]: Could not evaluate: Attempting to transfer from x-pack
Attempting to transfer from https://artifacts.elastic.co/downloads/kibana-plugins/x-pack/x-pack-6.2.3.zip
Picked up proxy http://172.16.136.10:8181/ from environment variable.

Info: Stage[main]: Unscheduling all events on Stage[main]
Notice: Applied catalog in 3.20 seconds

Import Kibana Dashboard Elements

Feature Request

It's possible to export and import Kibana searches, visualizations and dashboards as JSON files.
It would be nice to have a class to import such files with puppet.

Feature Description

There will be a puppet defined type that imports files exported by Kibana.
It will only add new elements and overwrite previously imported elements, which means, a customer can copy dashboards as new ones that will not be wiped! However, it will be possible to call this puppet defined type multiple times to slipstream dashboards for Windows and Linux in one Kibana instance.

Discrepancy in lib/puppet_x/elastic/hash.rb library file between kibana and elasticsearch modules

Bug Report

  • Module version: 5.2.0
  • Puppet version: 3.8.7
  • OS and version: Ubuntu 14.04.5 LTS
  • elasticsearch (5.4.3) and kibana (5.2.0) modules present

Bug description

While relatively minor (a bit annoying for us), a discrepancy has been noted in the lib/puppet_x/elastic/hash.rb content between the kibana and elasticsearch Puppet modules. Depending on which Puppet environment is used, one or the other is used to update the agent. The issue is being opened here since a rubocop:disable line is missing in the kibana library file.

Expected behavior:
No changes between Puppet agent runs using different environments referencing with same code

Observed behavior:
# rubocop:disable Metrics/AbcSize line is added/removed, depending on which module is considered first/last.

File differences:

# diff modules/vendor/elasticsearch/lib/puppet_x/elastic/hash.rb modules/vendor/kibana/lib/puppet_x/elastic/hash.rb
10d9
<       # rubocop:disable Metrics/AbcSize

Example:

  • Environment abc
# puppet agent -t --environment env1
Info: Retrieving pluginfacts
Info: Retrieving plugin
Notice: /File[/var/lib/puppet/lib/puppet_x/elastic/hash.rb]/content:
--- /var/lib/puppet/lib/puppet_x/elastic/hash.rb        2018-03-09 10:02:56.107748541 +0000
+++ /tmp/puppet-file20180309-30590-vg0syb       2018-03-09 10:05:48.260058045 +0000
@@ -7,7 +7,6 @@
       # Upon extension, modify the hash appropriately to render
       # sorted yaml dependent upon whichever way is supported for
       # this version of Puppet/Ruby's yaml implementation.
-      # rubocop:disable Metrics/AbcSize
       # rubocop:disable Metrics/PerceivedComplexity
       def self.extended(base)
         if RUBY_VERSION >= '1.9'

Notice: /File[/var/lib/puppet/lib/puppet_x/elastic/hash.rb]/content: content changed '{md5}5482a43a74b80467b5078cab48aa3cf7' to '{md5}10dc543476cf0efdacae56694403f705'
Info: Loading facts
Info: Caching catalog for adm-dev-test01.local
Info: Applying configuration version '1520589951'
Notice: Finished catalog run in 4.64 seconds
  • Environment xyz
# puppet agent -t --environment env2
Info: Retrieving pluginfacts
Notice: /File[/var/lib/puppet/facts.d]/mode: mode changed '0755' to '0775'
Info: Retrieving plugin
Notice: /File[/var/lib/puppet/lib/puppet_x/elastic/hash.rb]/content:
--- /var/lib/puppet/lib/puppet_x/elastic/hash.rb        2018-03-09 10:05:48.416069199 +0000
+++ /tmp/puppet-file20180309-31219-1y9m6eg      2018-03-09 10:10:59.882337244 +0000
@@ -7,6 +7,7 @@
       # Upon extension, modify the hash appropriately to render
       # sorted yaml dependent upon whichever way is supported for
       # this version of Puppet/Ruby's yaml implementation.
+      # rubocop:disable Metrics/AbcSize
       # rubocop:disable Metrics/PerceivedComplexity
       def self.extended(base)
         if RUBY_VERSION >= '1.9'

Notice: /File[/var/lib/puppet/lib/puppet_x/elastic/hash.rb]/content: content changed '{md5}10dc543476cf0efdacae56694403f705' to '{md5}5482a43a74b80467b5078cab48aa3cf7'
Info: Loading facts
Info: Caching catalog for adm-dev-test01.local
Info: Applying configuration version '1520590263'
Notice: Finished catalog run in 5.33 seconds

no check for manage_repo

Bug Report

  • Module version: 0.1.0
  • Puppet version: 4.9.2
  • OS and version: Centos 7.3.1611

Bug description

Expected behavior:
Do not install Elastic.co kibana repo. As I have a local copy of the Elastic repo.

Observed behavior:
Installs Kibana repo even when $manage_repo is set to 'false'.

Example manifest:
class { '::kibana': include profile::yum::elk include profile::nginx manage_repo => false, ensure => $profile::kibana::base::kibana_version, config => { 'kibana.defaultAppId' => $profile::kibana::base::kibana_defaultappid, 'elasticsearch.requestTimeout' => $profile::kibana::base::kibana_reqtime, } } kibana_plugin { 'x-pack': url => "http://katello01.infra.aza.nu/pulp/isos/Default_Organization-ELK-xpack/x-pack-${profile::kibana::base::kibana_version}.zip", }

Puppet run logs:
puppet-agent[2223]: (/Stage[main]/Kibana::Install/Yumrepo[kibana]/ensure) created
puppet-agent[2223]: Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y install tmux' returned 1: One of the configured repositories failed (Elastic 5.x repository),
puppet-agent[2223]: Could not update: Execution of '/usr/bin/yum -d 0 -e 0 -y install tmux' returned 1: One of the configured repositories failed (Elastic 5.x repository),

Info:
Would like to say that I do not find any check in install.pp towards if manage_repo is true or not. And seems to have the Elastic.co URL added anyway.

Kibana module sub-classes aren't properly contained

I am maintaining my own repositories and require that the kibana class proceed after the repository is created.

class { 'kibana':
[.. snip ..]
require => Yumrepo['elastic-repo'],
}

Expected behavior:

kibana::install will execute after the resource yumrepo{'elastic-repo': }

Observed behavior:

kibana::install executes before the resource yumrepo{'elastic-repo': } and therefore the yum install fails.

Root cause:

The kibana::install, kibana::config, and kibana::service sub-classes are not contained by the kibana class. Therefore they do not follow the dependency on the parent class.

PR #11 is submitted to correct this behavior.

Discrepancy in lib/puppet_x/elastic/hash.rb library file between kibana and elasticsearch modules

Bug Report

  • Module version: 6.3.1
  • Puppet version: 5.5.19
  • OS and version: Debian 9 (Stretch)
  • elasticsearch (6.4.0) and kibana (6.3.1)

Bug description

When using both the elasticsearch and kibana puppet modules, depending on the environment you get the lib/puppet_x/elastic/hash.rb file changing from the one provided by elasticsearch and the one provided by kibana. I believe this is due to the last update of elasticsearch from version 6.3.1 to 6.4.0 and the kibana module not following it

This is the same as issue #41

Expected behavior:

Consistent puppet runs across all environments when using both elasticsearch and kibana modules

Observed behavior:

hash.rb is updated when running different puppet environments

serverX (Stretch) ~ # diff /etc/puppetlabs/puppet/environments/production/modules/elasticsearch/lib/puppet_x/elastic/hash.rb /etc/puppetlabs/puppet/environments/production/modules/kibana/lib/puppet_x/elastic/hash.rb
67d66
<         return to_enum(:each_pair) unless block_given?
71d69
<         self

Puppet run logs:

Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet_x/elastic/hash.rb]/content: 
--- /opt/puppetlabs/puppet/cache/lib/puppet_x/elastic/hash.rb   2020-04-02 15:38:23.456567786 +0200
+++ /tmp/puppet-file20200403-40095-tffv5z       2020-04-03 09:27:51.847891889 +0200
@@ -64,11 +64,9 @@
       # Override each_pair with a method that yields key/values in
       # sorted order.
       def each_pair
-        return to_enum(:each_pair) unless block_given?
         keys.sort.each do |key|
           yield key, self[key]
         end
-        self
       end
     end
   end

Notice: /File[/opt/puppetlabs/puppet/cache/lib/puppet_x/elastic/hash.rb]/content: content changed '{md5}4300b3a1327121c196bc7c02e51055e4' to '{md5}159abda7275f5bc45f354ce4fc59cce9'

Feature Request

Bring the kibana module to version 6.4.0 with the update library to match the elasticsearch module

bundle exec rake spec failed

Affected Puppet, Ruby, OS and module versions/distributions

  • Module version: 7.0.1

How to reproduce (e.g Puppet code you use)

bundle exec rake spec

Output log

Failures:

  1. kibana supported operating systems on debian-10-x86_64 installation kibana class without any parameters is expected to compile into a catalogue without dependency cycles
    Failure/Error: it { is_expected.to compile.with_all_deps }
    error during compilation: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/apt_key: Could not autoload puppet/provider/apt_key/apt_key: cannot load such file -- net/ftp (file: D:/Projets/Puppet/puppet-kibana/spec/fixtures/modules/apt/manifests/key.pp, line: 55, column: 9) (file: D:/Projets/Puppet/puppet-kibana/spec/fixtures/modules/apt/manifests/source.pp, line: 183) on node xxxxx
    # ./spec/classes/kibana_spec.rb:15:in block (7 levels) in <top (required)>'`

Any additional information you'd like to impart

C:/ProgramData/Ruby31-x64/bin/ruby.exe -I'C:/ProgramData/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/lib';'C:/ProgramData/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rspec-support-3.11.0/lib' 'C://3.1.0/gems/rspec-support-3.11.0/lib' 'C:/ProgramData/Ruby31-x64/lib/ruby/gems/3.1.0/gems/rspec-core-3.11.0/exe/rspec' --pattern 'spec/{aliases,classes,defis,type_aliases,types,unit}//*_spec.rb' fnes,functions,hosts,integration,plans,tasks,type_aliases,types,unit}//*_spec.rb' failed

How to install Kibana 4?

I'm attempting to replace the lesaux/kibana4 module with yours and before upgrading the current Kibana 4.5.4, I want to make sure that I can adapt my code to this module.
In ensuring 4.5.4 only, I get this error:

Error: Could not set 'file' on ensure: No such file or directory @ dir_s_mkdir - /etc/kibana/kibana.yml20171220-18310-199jtgn.lock at /etc/puppetlabs/code/environments/vagrant/modules/kibana/manifests/config.pp:19
Error: Could not set 'file' on ensure: No such file or directory @ dir_s_mkdir - /etc/kibana/kibana.yml20171220-18310-199jtgn.lock at /etc/puppetlabs/code/environments/vagrant/modules/kibana/manifests/config.pp:19
Wrapped exception:
No such file or directory @ dir_s_mkdir - /etc/kibana/kibana.yml20171220-18310-199jtgn.lock
Error: /Stage[main]/Kibana::Config/File[/etc/kibana/kibana.yml]/ensure: change from absent to file failed: Could not set 'file' on ensure: No such file or directory @ dir_s_mkdir - /etc/kibana/kibana.yml20171220-18310-199jtgn.lock at /etc/puppetlabs/code/environments/vagrant/modules/kibana/manifests/config.pp:19

So is looking in /etc/kibana while it should only stick to /opt/kibana as I'm using the old 4.x. This is what happens in the /etc/apt/sources.list.d/

root@vagrant:/etc/apt# grep -inr "elastic" .
./sources.list.d/elasticsearch.list:3:deb http://packages.elastic.co/elasticsearch/2.x/debian stable main
./sources.list.d/**kibana-4.5.list**:3:deb http://packages.elastic.co/kibana/4.5/debian stable main
./sources.list.d/**kibana.list**:3:deb https://artifacts.elastic.co/packages/6.x/apt stable main

The readme doesn't cover this but I figure out that your default repo_version is set to 6.x so I'm overwriting that:

  class { 'kibana':
    repo_version => '4.x',
    ensure       => '4.5.4',
    config       => {
      'server.host' => $elasticsearch_host,
      'server.port' => '9200',
    }
  }

But then I get:
Error: Evaluation Error: Error while evaluating a Resource Statement, Class[Kibana]: parameter 'repo_version' expects a match for Variant[Enum['5.x', '6.x'], Pattern[/^4\.(1|[4-6])$/]], got '4.x' at /etc/puppetlabs/code/environments/vagrant/site/profile/manifests/kibana.pp:7:3 on node dev-logstation.mobilefun.co.uk

A little help would be appreciated.

Puppet 3.8 Support

Feature Request

Puppet 3.8 Support

Feature Description

Support for Puppet 3.8 at least in the short to mid term aligning with the other elastic 5.x puppet module requirements.

Support for multiple Kibana instances

Feature Request

Feature Description

I think it would be useful to have the ability to manage multiple independent kibana instances, like the elasticsearch module does. We have different es clusters and we would like to have separate kibana instances which access these instances.

Plugins constantly try to install

Bug Report

  • Module version: 6.0.0
  • Puppet version: 5.3.3
  • OS and version: Centos 7

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...

Unexpected Permissions issues

https://discuss.elastic.co/t/kibana-6-2-3-6-2-4-error-invalid-dimensions-for-plot-width-473-height-0/129140/4?u=pickypg

After the user installed Kibana via the puppet module, they ran into weird permissions issues until they reinstalled it:

FATAL { Error: EACCES: permission denied, open '/usr/share/kibana/optimize/bundles/ml.style.css'
    at Error (native)
  cause: 
   { Error: EACCES: permission denied, open '/usr/share/kibana/optimize/bundles/ml.style.css'
       at Error (native)
     errno: -13,
     code: 'EACCES',
     syscall: 'open',
     path: '/usr/share/kibana/optimize/bundles/ml.style.css' },
  isOperational: true,
  errno: -13,
  code: 'EACCES',
  syscall: 'open',
  path: '/usr/share/kibana/optimize/bundles/ml.style.css' }

I've asked that the user respond here in case there are any questions.

Config doesn't allow to use hash

Code:

class { 'kibana':
    ensure => $kibana_version,
    config => {
      'server.host'                        => $server_host,
      'elasticsearch.url'                  => $elasticsearch_url,
      # Sentinl Configuration
      'sentinl' => {
        'settings' => {
          'email' => {
            'active'   => true,
            'host'     => $smtp_server,
            'port'     => $smtp_server_port,
            'ssl'      => $smtp_ssl,
            'user'     => $smtp_username,
            'password' => $smtp_password
          }
        }
      }
  }

Error:
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Class[Kibana]: parameter 'config' entry 'sentinl' expects a value of type String, Integer, Boolean, or Array, got Struct (file: /modules/elk/manifests/kibana.pp, line: 31, column: 3) on node ip-192-168-1-1.ec2.internal

Feature Request

Config should accept Struct.

Secure /etc/kibana/kibana.yml

Feature Request

Currently, /etc/kibana/kibana.yml is world-readable.
Please make it RW only for the elasticsearch user.

Feature Description

When storing credentials inside kibana.yml it shoul not be readable by any other user than the elasticsearch user for security reasons.

Kibana 4.x plugin installation via Url not working

Bug Report

  • Module version: 6d8dd95
  • Puppet version: 4.7.0
  • OS and version: Centos 6.8

Bug description

Installation of plugin via url on Kibana 4 doesn't work, but status reported OK

Expected behavior:

Plugin installed or explicit error during puppet agent run.

Observed behavior:

Resource created, but no plugin installed.
Organization is REQUIRED but if url is provided it would not be necessary.
Plugin resource reported as created but nothing happened. Should report:

/opt/kibana/bin/kibana plugin --install https://xxxxxxxxxxxxxxxx/marvel-2.4.4.tar.gz
Invalid install option. Please use the format <org>/<plugin>/<version>.

Example manifest:

custom_module.pp

  $kibana_plugins = hiera_hash('profile::kibana::plugins', {})
  create_resources('kibana_plugin', $kibana_plugins)

hieralevel.yaml

profile::kibana::plugins:
  'marvel':
    url: 'https://xxxxxxxxxxxxxxx/marvel-2.4.4.tar.gz'
    organization: 'elasticsearch' # Tried with and without it
    version: '2.4.4' # Tried with and without it

Puppet run logs:

Debug: Executing: '/sbin/service kibana status'
Debug: Executing: '/sbin/chkconfig kibana'
Debug: Prefetching kibana resources for kibana_plugin
Notice: /Stage[main]/Profile::Kibana/Kibana_plugin[marvel]/ensure: created
Debug: Executing with uid=kibana gid=kibana: '/opt/kibana/bin/kibana plugin --install https://xxxxxxxxxxxxx/marvel-2.4.4.tar.gz'
Debug: Kibana_plugin[marvel](provider=kibana): 
Debug: /Stage[main]/Profile::Kibana/Kibana_plugin[marvel]: The container Class[Profile::Kibana] will propagate my refresh event

Feature Request

Allow installation via url and name also for Kibana 4.6

Feature Description

Installation via url is available executing kibana plugin --install <name> --url <url> in Kibana 4.6 (even before).

any plan for ELK 7.x ?

Feature Request

Do you plan to update (if needed) to make this module compatible with future releases of ELK(7.x)?
If it not needed, do you plan to test and verify ?

This is true alos for the puppet-elasticsearch and puppet-logstash.

Feature Description

NTR.

Thanks
Cheers
Sophie

Module dependency for elastic-elastick_stack

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.22
  • Ruby: ruby 2.4.10p364
  • Distribution: CentOS Linux release 7.9.2009 (Core)
  • Module version: v7.0.0

How to reproduce (e.g Puppet code you use)

run r10k on Puppetfile

What are you seeing

puppet-kibana' (v7.0.0) requires 'elastic-elastic_stack' (>= 6.1.0 < 7.0.0)

What behaviour did you expect instead

puppet-kibana' (v7.0.0) requires 'puppet-elastic_stack'

Output log

Any additional information you'd like to impart

Because elastic-elastic_stack is now puppet-elastic_stack I expected to find that module in the metadata.json.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.