Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

systemd for grafana #36

Closed
bngsudheer opened this issue Mar 11, 2018 · 6 comments
Closed

systemd for grafana #36

bngsudheer opened this issue Mar 11, 2018 · 6 comments

Comments

@bngsudheer
Copy link
Contributor

I am surprised that systemd unit file is not present for Grafana on CentOS.

Can we have https://github.com/grafana/grafana/blob/master/packaging/rpm/systemd/grafana-server.service?

I would be glad to send a PR.

@paulfantom
Copy link
Member

That is strange. I've just tried to reproduce this error in centos docker container, but I see the service file present when installed from official grafana package (which is used by this role).

Steps I've taken:

  1. docker run -it centos bash
  2. yum install -y epel-release
  3. yum install -y https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.0.1-1.x86_64.rpm (from: http://docs.grafana.org/installation/rpm/#install-stable)
  4. cat /usr/lib/systemd/system/grafana-server.service

Last step produced this output:

[Unit]
Description=Grafana instance
Documentation=http://docs.grafana.org
Wants=network-online.target
After=network-online.target
After=postgresql.service mariadb.service mysql.service

[Service]
EnvironmentFile=/etc/sysconfig/grafana-server
User=grafana
Group=grafana
Type=notify
Restart=on-failure
WorkingDirectory=/usr/share/grafana
RuntimeDirectory=grafana
RuntimeDirectoryMode=0750
ExecStart=/usr/sbin/grafana-server                                                  \
                            --config=${CONF_FILE}                                   \
                            --pidfile=${PID_FILE_DIR}/grafana-server.pid            \
                            cfg:default.paths.logs=${LOG_DIR}                       \
                            cfg:default.paths.data=${DATA_DIR}                      \
                            cfg:default.paths.plugins=${PLUGINS_DIR}                \
                            cfg:default.paths.provisioning=${PROVISIONING_CFG_DIR}  

LimitNOFILE=10000
TimeoutStopSec=20

[Install]
WantedBy=multi-user.target

Which is the same file as https://github.com/grafana/grafana/blob/master/packaging/rpm/systemd/grafana-server.service.

Could you provide more explanaition how you came to conclusion that there is no service file on CentOS so we could start working towards solving this problem?

@bngsudheer
Copy link
Contributor Author

I will investigate and update the ticket. Thanks for the quick response.

@bngsudheer
Copy link
Contributor Author

For some reason it gets stuck at this step:
TASK [cloudalchemy.grafana : Wait for grafana to start]

@bngsudheer
Copy link
Contributor Author

bngsudheer commented Mar 11, 2018

It turns out systemd unit file is present but unit is not started. My bad, I didn't see it. I sent a PR: #37

@paulfantom
Copy link
Member

Thanks for PR 👍

I'm closing this, if you'll need more help just reopen this issue or write another.

@lock
Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants