# Kibana logging and daemon process

**URL:** <https://discuss.elastic.co/t/kibana-logging-and-daemon-process/44767>\
**Category:** Kibana\
**Created:** [March 17, 2016, 8:02pm UTC](https://discuss.elastic.co/t/kibana-logging-and-daemon-process/44767 "2016-03-17T20:02:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pierrejnelson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierrejnelson/32/8627_2.png) [@pierrejnelson](https://discuss.elastic.co/u/pierrejnelson)\
**Post date:** [March 17, 2016, 8:02pm UTC](https://discuss.elastic.co/t/kibana-logging-and-daemon-process/44767/1 "2016-03-17T20:02:59Z")

</div>

I've been trying to get Kibana up and running through a daemon but I don't seem to be very smart when it comes to this and hoping to get some help.

Currently trying to get this to run on SLES 11.3 SP6. Right now everything goes to stdout and I have to break out if I want my shell back.

---

<div class="post-metadata">

**Author:** ![Court](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/court/32/6640_2.png) [@Court](https://discuss.elastic.co/u/Court)\
**Post date:** [March 17, 2016, 8:18pm UTC](https://discuss.elastic.co/t/kibana-logging-and-daemon-process/44767/2 "2016-03-17T20:18:17Z")

</div>

I'm not very familiar with SUSE, but you'll probably want to set up the SUSE equivalent of a startup script to manage starting Kibana. With apt-get/yum, you get that for free, but for other systems you'll need to wire it up according to the individual operating system.

---

<div class="post-metadata">

**Author:** ![pierrejnelson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierrejnelson/32/8627_2.png) [@pierrejnelson](https://discuss.elastic.co/u/pierrejnelson)\
**Post date:** [March 18, 2016, 1:06pm UTC](https://discuss.elastic.co/t/kibana-logging-and-daemon-process/44767/3 "2016-03-18T13:06:10Z")

</div>

You are more than right, I being new to SLES as well was hoping someone would be willing to share what they have gotten configured so I can get it up and running.

---

<div class="post-metadata">

**Author:** ![Court](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/court/32/6640_2.png) [@Court](https://discuss.elastic.co/u/Court)\
**Post date:** [March 18, 2016, 1:26pm UTC](https://discuss.elastic.co/t/kibana-logging-and-daemon-process/44767/4 "2016-03-18T13:26:57Z")

</div>

Ah, I understand. Sorry I'm not more help on that, but maybe someone else with SUSE experience can weigh in. Stack overflow may be a good place to ask questions about this as well.

---

<div class="post-metadata">

**Author:** ![pierrejnelson](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pierrejnelson/32/8627_2.png) [@pierrejnelson](https://discuss.elastic.co/u/pierrejnelson)\
**Post date:** [March 21, 2016, 7:16pm UTC](https://discuss.elastic.co/t/kibana-logging-and-daemon-process/44767/5 "2016-03-21T19:16:17Z")

</div>

Here is how we got it to work on our version of SLES. We pretty much took a script that was out there and re did it a little bit.

* * *

#!/bin/sh

# 

# /etc/init.d/kibana -- startup script for Kibana

# 

# Written by Jason Stirnaman

# 

### BEGIN INIT INFO

# Provides: kibana

# Description: Starts kibana as a daemon.

### END INIT INFO

. /lib/lsb/init-functions

PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/kibana/bin  
KIBANA\_PATH=/data/kibana-4.4.2-linux-x64/bin  
NAME=kibana  
DESC="Kibana Dashboard"  
PID\_FILE=/var/run/$NAME.pid  
KIBANA\_LOG\_FILE=/var/log/$NAME.log  
DAEMON=

if [`id -u` -ne 0]; then  
echo "You need root privileges to run this script"  
exit 1  
fi

# Load the rc.status script for this service.

. /etc/rc.status

# Reset status of this service

rc\_reset

start\_command="$KIBANA\_PATH/$NAME"

# Start command wraps node and node executable is what ps observes.

chk\_command=/data/kibana-4.4.2-linux-x64/bin/../node/bin/node

case $1 in  
start)  
echo "Starting $DESC"  
/data/kibana-4.4.2-linux-x64/bin/kibana&  
;;  
stop)  
echo -n "Stopping $DESC: "  
## Stop daemon with killproc(8) and if this fails  
## killproc sets the return value according to LSB.  
killproc -p $PID\_FILE $chk\_command

```
      # Remember status and be verbose
      rc_status -v

      ;;
    status)
            echo -n "Status for $DESC:"
            ## Check status with checkproc(8), if process is running
            ## checkproc will return with exit status 0.

            # Status has a slightly different for the status command:
            # 0 - service running
            # 1 - service dead, but /var/run/ pid file exists
            # 2 - service dead, but /var/lock/ lock file exists
            # 3 - service not running

            # NOTE: checkproc returns LSB compliant status values.
            checkproc -p $PID_FILE $chk_command
             # NOTE: rc_status knows that we called this init script with
            # "status" option and adapts its messages accordingly.
            rc_status -v
            ;;
    *)
            echo "Usage: $0 {start|stop|restart|status}"
            exit 1
            ;;

```

esac

exit 0

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:58pm UTC](https://discuss.elastic.co/t/kibana-logging-and-daemon-process/44767/6 "2017-07-06T13:58:24Z")

</div>


