Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't add new plugins to Kibana #16795

Closed
spaceCamel opened this issue Jul 8, 2016 · 4 comments
Closed

Can't add new plugins to Kibana #16795

spaceCamel opened this issue Jul 8, 2016 · 4 comments
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md

Comments

@spaceCamel
Copy link

Issue description

I want to install "elastic/sense" plugin in kibana, but I can't find a way to do it.

Looking into kibana.nix I noticed there is a static bundled_plugin_ids list. I'm not sure if "elastic/sense" should be added there and how.

I tried to use kibana command line to install the plugin as shown below, but that failed too because the plugin directory is read-only.

Steps to reproduce

Add following services to /etc/nixos/configuration.nix and switch:

services {
    elasticsearch = {
        enable = true;
        dataDir = "/home/elasticsearch";
    };
    kibana {
        enable = true;
        dataDir = "/home/kibana";
    };
}

Run from CLI:

# sudo -u kibana BABEL_CACHE_PATH=/home/kibana/.babelcache.json kibana plugin -i elastic/sense
Installing sense
Plugin installation was unsuccessful due to error "EROFS: read-only file system, mkdir '/nix/store/b7fd6i35ym8axl0v7ip9sfhai9grn8ki-kibana-4.4.1/libexec/kibana/installedPlugins/.plugin.installing'"

Note, I configured services.kibana.dataDir = "/home/kibana" so I had to pass BABEL_CACHE_PATH on the CLI otherwise Kibana would try and fail writing the ".babelcache.json" file in "/nix/store/..."

Technical details

  • System: 16.03.1028.0546a4a (Emu)
  • Nix version: nix-env (Nix) 1.11.2
  • Nixpkgs version: 16.03.1028.0546a4a
@0xABAB
Copy link
Contributor

0xABAB commented Jul 9, 2017

There are some other programs in nixpkgs (e.g. for weechat there is a PR), which have implemented plugins, so you could copy from that, if you are still interested that is. If you are not, please mention that instead.

@GlennS
Copy link
Contributor

GlennS commented Feb 14, 2019

I've built a custom version of Kibana 6.5.1 adding in the LogTrail plugin.

I'm putting some information about how I did it here, in case it helps someone.

Plugins go into $out/libexec/kibana/plugins/$pluginName, so I modified the installPhase of the Kibana package to include:
ln -s "${logtrail.src}/logtrail" "$out/libexec/kibana/plugins/logtrail".

Kibana has an optimize step which minifies CSS and JS. It runs this on first startup (or whenever Kibana's system.basePath property changes). This will fail, because the directory it's trying to write to is read only.

I see two ways to get around this:

  1. Run Kibana once as part of the install: $out/bin/kibana --elasticsearch.requestTimeout 1 || echo "Kibana optimize step complete.". This is probably the correct thing for Nix (once these bundles are build, you should really be able to use them anywhere without rebuilding them), but I wasn't able to convince Kibana not to rebuild its bundles, so I abandoned this approach.
  2. Set the optimize.bundleDir Kibana config setting to something mutable. I created a /var/lib/kibana/bundles directory. This is what I ended up doing.

It looks like future versions of Kibana will do option (2) by default: elastic/kibana#5071 elastic/kibana#25944

@stale
Copy link

stale bot commented Jun 3, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2020
@samueldr
Copy link
Member

Kibana has since been removed from Nixpkgs and NixOS.

See:

As such, this issue won't be fixed.

@samueldr samueldr closed this as not planned Won't fix, can't repro, duplicate, stale Apr 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Projects
None yet
Development

No branches or pull requests

4 participants