Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Elastic Kibana - install as windows service

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)

like image 505
jhilden Avatar asked Mar 25 '15 16:03

jhilden


People also ask

How do I install Elasticsearch as a Windows service?

Install and run Elasticsearch as a service on WindowseditThe name of the service and the value of ES_JAVA_HOME will be made available during install: C:\elasticsearch-8.3. 3\bin>elasticsearch-service. bat install Installing service : "elasticsearch-service-x64" Using ES_JAVA_HOME (64-bit): "C:\jvm\jdk1.


2 Answers

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"  
like image 161
jhilden Avatar answered Oct 13 '22 15:10

jhilden


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

  1. nssm install kibana461
  2. UI: choose kibana.bat as Application Path
  3. UI: select a log file to write to on "I/O" tab for stdout and stderr
  4. UI: on the "Dependencies" tab enter elasticsearch241 (or whatever you called it)
  5. UI: "Install Service"
  6. sc start kibana461
like image 35
Christian Avatar answered Oct 13 '22 15:10

Christian