From 7470265949c02824e83ce5d3a0847c4c6b6e65cf Mon Sep 17 00:00:00 2001 From: achatterjee-grafana <70489351+achatterjee-grafana@users.noreply.github.com> Date: Wed, 3 Feb 2021 17:15:58 -0500 Subject: [PATCH] Added "Restart Grafana" topic. (#30844) * Created new topic. * Updated retart topic with windows, macos, Linux and Docker sections. Also, updated enterprise topic "sctivate license". * Added some relrefs to the install introduction page. * Adding changes from reviews. * More changes from review. * Corrected some syntax issues. --- docs/sources/enterprise/activate-license.md | 5 +- docs/sources/installation/_index.md | 2 + docs/sources/installation/restart-grafana.md | 128 +++++++++++++++++++ 3 files changed, 132 insertions(+), 3 deletions(-) create mode 100644 docs/sources/installation/restart-grafana.md diff --git a/docs/sources/enterprise/activate-license.md b/docs/sources/enterprise/activate-license.md index 904cfc67529..0a41986f548 100644 --- a/docs/sources/enterprise/activate-license.md +++ b/docs/sources/enterprise/activate-license.md @@ -80,7 +80,6 @@ GF_SERVER_ROOT_URL=https://grafana.blah.com/ ## Step 4. Restart Grafana To finalize the installation of Grafana Enterprise, restart Grafana to -enable all Grafana Enterprise features. +enable all Grafana Enterprise features. Refer to [restart Grafana]({{< relref "../installation/restart-grafana.md" >}}) +topic for more information. -On Linux, when installed as a Systemd service you can restart Grafana -by running `sudo systemctl restart grafana-server.service`. diff --git a/docs/sources/installation/_index.md b/docs/sources/installation/_index.md index d76962e31a7..7862dbd4771 100644 --- a/docs/sources/installation/_index.md +++ b/docs/sources/installation/_index.md @@ -17,3 +17,5 @@ This section discusses the hardware and software requirements as well as the pro - [Install on Windows]({{< relref "windows" >}}) - [Run Docker image]({{< relref "docker" >}}) +Refer to [Upgrade Grafana]({{< relref "upgrading.md" >}}) topic. If you need to restart Grafana, refer to the [Restart Grafana]({{< relref "Restart-grafana.md" >}}) +topic for detailed information. diff --git a/docs/sources/installation/restart-grafana.md b/docs/sources/installation/restart-grafana.md new file mode 100644 index 00000000000..017799a5168 --- /dev/null +++ b/docs/sources/installation/restart-grafana.md @@ -0,0 +1,128 @@ ++++ +title = "Restart Grafana" +description = "Instructions for restarting Grafana" +keywords = ["grafana", "restart", "documentation"] +weight = 750 ++++ + +# Restart Grafana + +Users often need to restart Grafana after they have made configuration changes. This topic provides detailed instructions on how to restart Grafana supported operating systems. + +- [Windows](#windows) +- [MacOS](#macos) +- [Linux](#linux) +- [Docker](#docker) + +## Windows + +To restart Grafana: + +1. Open the Services app. +1. Right-click on the **Grafana** service. +1. In the context menu, click **Restart**. + +## macOS + +Restart methods differ depending on whether you installed Grafana using Homebrew or as standalone macOS binaries. + +### Restart Grafana using Homebrew + +Use the [Homebrew](http://brew.sh/) restart command: + +```bash +brew services restart grafana +``` +### Restart standalone macOS binaries + +To restart Grafana: + +1. Open a terminal and go to the directory where you copied the install setup files. +1. Run the command: + +```bash +./bin/grafana-server web +``` +## Linux + +Restart methods differ depending on whether your Linux system uses `systemd` or `init.d`. + +### Restart the server with systemd + +To restart the service and verify that the service has started, run the following commands: + +```bash +sudo systemctl restart grafana-server +sudo systemctl status grafana-server +``` + +Alternately, you can configure the Grafana server to restart at boot: + +```bash +sudo systemctl enable grafana-server.service +``` + +> **Note:** SUSE or OpenSUSE users may need to start the server with the systemd method, then use the init.d method to configure Grafana to start at boot. + +### Restart the server with init.d + +To restart the service, run the following command: + +```bash +sudo service grafana-server restart +``` + +or + +```bash +sudo /etc/init.d/grafana-server restart +``` + +Verify the status: + +```bash +sudo service grafana-server status +``` + +or + +```bash +sudo /etc/init.d/grafana-server status +``` + +Alternately, you can configure the Grafana server to restart at boot: + +```bash +sudo update-rc.d grafana-server defaults +``` +## Docker + +To restart the Grafana service, use the `docker restart` command. + +`docker restart grafana` + +Alternately, you can use the `docker compose restart` command to restart Grafana. For more information, refer to [docker compose documentation](https://docs.docker.com/compose/). + +### Docker compose example + +Configure your `docker-compose.yml` file. For example: + +```bash +grafana: + image: grafana/grafana:latest + ports: + - "3000:3000" + environment: + - TERM=linux + - GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-piechart-panel,grafana-polystat-panel +``` + +Start the Grafana server: + +`docker-compose up` + +This starts the Grafana server along with the three plugins specified in the YAML file. + +To restart the running container, use this command: + +`docker-compose restart grafana`