kibana: fix pkg and module
This commit is contained in:
parent
e1493f2ba7
commit
c2b578386e
@ -7,37 +7,33 @@ let
|
|||||||
|
|
||||||
cfgFile = pkgs.writeText "kibana.json" (builtins.toJSON (
|
cfgFile = pkgs.writeText "kibana.json" (builtins.toJSON (
|
||||||
(filterAttrsRecursive (n: v: v != null) ({
|
(filterAttrsRecursive (n: v: v != null) ({
|
||||||
server = {
|
host = cfg.listenAddress;
|
||||||
host = cfg.listenAddress;
|
port = cfg.port;
|
||||||
port = cfg.port;
|
ssl_cert_file = cfg.cert;
|
||||||
ssl = {
|
ssl_key_file = cfg.key;
|
||||||
cert = cfg.cert;
|
|
||||||
key = cfg.key;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
kibana = {
|
kibana_index = cfg.index;
|
||||||
index = cfg.index;
|
default_app_id = cfg.defaultAppId;
|
||||||
defaultAppId = cfg.defaultAppId;
|
|
||||||
};
|
|
||||||
|
|
||||||
elasticsearch = {
|
elasticsearch_url = cfg.elasticsearch.url;
|
||||||
url = cfg.elasticsearch.url;
|
kibana_elasticsearch_username = cfg.elasticsearch.username;
|
||||||
username = cfg.elasticsearch.username;
|
kibana_elasticsearch_password = cfg.elasticsearch.password;
|
||||||
password = cfg.elasticsearch.password;
|
kibana_elasticsearch_cert = cfg.elasticsearch.cert;
|
||||||
ssl = {
|
kibana_elasticsearch_key = cfg.elasticsearch.key;
|
||||||
cert = cfg.elasticsearch.cert;
|
ca = cfg.elasticsearch.ca;
|
||||||
key = cfg.elasticsearch.key;
|
|
||||||
ca = cfg.elasticsearch.ca;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
logging = {
|
bundled_plugin_ids = [
|
||||||
verbose = cfg.logLevel == "verbose";
|
"plugins/dashboard/index"
|
||||||
quiet = cfg.logLevel == "quiet";
|
"plugins/discover/index"
|
||||||
silent = cfg.logLevel == "silent";
|
"plugins/doc/index"
|
||||||
dest = "stdout";
|
"plugins/kibana/index"
|
||||||
};
|
"plugins/markdown_vis/index"
|
||||||
|
"plugins/metric_vis/index"
|
||||||
|
"plugins/settings/index"
|
||||||
|
"plugins/table_vis/index"
|
||||||
|
"plugins/vis_types/index"
|
||||||
|
"plugins/visualize/index"
|
||||||
|
];
|
||||||
} // cfg.extraConf)
|
} // cfg.extraConf)
|
||||||
)));
|
)));
|
||||||
in {
|
in {
|
||||||
@ -118,12 +114,6 @@ in {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
logLevel = mkOption {
|
|
||||||
description = "Kibana log level";
|
|
||||||
default = "normal";
|
|
||||||
type = types.enum ["verbose" "normal" "silent" "quiet"];
|
|
||||||
};
|
|
||||||
|
|
||||||
package = mkOption {
|
package = mkOption {
|
||||||
description = "Kibana package to use";
|
description = "Kibana package to use";
|
||||||
default = pkgs.kibana;
|
default = pkgs.kibana;
|
||||||
@ -149,6 +139,7 @@ in {
|
|||||||
description = "Kibana Service";
|
description = "Kibana Service";
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
after = [ "network-interfaces.target" "elasticsearch.service" ];
|
after = [ "network-interfaces.target" "elasticsearch.service" ];
|
||||||
|
environment = { BABEL_CACHE_PATH = "${cfg.dataDir}/.babelcache.json"; };
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${cfg.package}/bin/kibana --config ${cfgFile}";
|
ExecStart = "${cfg.package}/bin/kibana --config ${cfgFile}";
|
||||||
User = "kibana";
|
User = "kibana";
|
||||||
|
@ -19,6 +19,7 @@ stdenv.mkDerivation rec {
|
|||||||
rm -r $out/libexec/kibana/node
|
rm -r $out/libexec/kibana/node
|
||||||
makeWrapper $out/libexec/kibana/bin/kibana $out/bin/kibana \
|
makeWrapper $out/libexec/kibana/bin/kibana $out/bin/kibana \
|
||||||
--prefix PATH : "${nodejs}/bin:${coreutils}/bin:${which}/bin"
|
--prefix PATH : "${nodejs}/bin:${coreutils}/bin:${which}/bin"
|
||||||
|
sed -i 's@NODE=.*@NODE=${nodejs}/bin/node@' $out/libexec/kibana/bin/kibana
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user