Reputation: 12429
How can I install Elastic Kibana (which is just a batch file) as a windows service?
It probably needs to depend on the ElasticSearch process as well (this assumes I'm running it on the same server)
Upvotes: 57
Views: 54187
Reputation: 14061
The kibana.bat file delivered with Kibana 4.6.1 was not suited to use with sc create directly for me (Service start failed). I used nssm like this
nssm install kibana461
kibana.bat
as Application Pathelasticsearch241
(or whatever you called it)sc start kibana461
Upvotes: 52
Reputation: 1143
I found this video very helpful.
Use NSSM (Non-sucking Service Manager) to install Kibana as a Service.
https://www.youtube.com/watch?v=L-0A2cqTn-w
Upvotes: 9
Reputation: 24610
Rather than creating a dependency, I made a delayed start.
First use the sc
command (from jhilden).
sc create "Elasticsearch Kibana 4.4.2" binPath= "C:\kibana-4.4.2-windows\bin\kibana.bat"
Open services.msc
and find your new service.
Properties
.Automatic (Delayed Start)
.Automatic
.This will ensure elasticsearch will start when the machine starts, and kibana will start sometime soon after (approx 2 minutes from this question).
Upvotes: 14
Reputation: 12429
The following command will create the service with a name of "ElasticSearch Kibana 4.0.1" and make it depend on ElasticSearch so it doesn't try to start too soon.
sc create "ElasticSearch Kibana 4.0.1" binPath= "{path to batch file}" depend= "elasticsearch-service-x64"
Upvotes: 74