Grafana As a service Amazon_Linux 2

I am trying to run Grafan as a service, the following is my configuration:
$ cd /etc/systemd/system/
$ touch grafana.service
Then add the following line






Note: I am using Amazon Linux 2 as OS.

In the previous config, I used it to run Prometheus as a service, but it doesn’t work as I don’t have a (config.yml) file.

what linux are you using? Have you considered installing using a package manager like apt or yum? That would automatically add to systemd

I did solve it,
By adding the path of the default file of Grafana.

1 Like