How to stop grafana gracefully on windows?

it’s started from command line like

grafana.exe server

CTRL-C doesn’t work
So how do I stop it ?

Hi @oleksandrlapchuk

I have never installed Grafana on Windows, but if I had to guess…

  1. Open the Services app.
  2. Right-click on the Grafana service.
  3. In the context menu, click Stop.

There is no grafana service, since it’s started as a regular program from the command line (as I stated in the original post)

do you see grafana when you go to localhost:3000

sure I do see it, why?

is the cmd line that you used to run grafana still open?

of course it is open, the grafana is running there

close the command line window, top right click on the X

:melting_face:
What’s why I have started this topic exactly: to figure out how to stop it correctly

I suppose just terminating the process, or pull off power cable, or hit your pc with a hammer - are not correct ways to stop it

there is no one correct way the other options can work too :laughing: reboot is my fav

but why do you need to stop it anyways that in itself is uncommon. Ctrl C should work but obviously it aint so bring on the :hammer_and_pick:

I could use some unusual method, if it was confirmed by official documentation

1 Like

there is no official docu on how to stop it.

that’s sad :expressionless:
next step would be asking community ( ← we are here now )

why do need to start and stop it

try to stop it from services.msc
find grafana and stop the service

Send the right signal to grafana. Grafana watching for sigterm signal. Of course windows doesn’t have sigterm, but ctrl close event is “sigterm” equivalent on windows: signal package - os/signal - Go Packages

1 Like

Further investigation showed that it was some problem with my terminal
After restarting everything: CTRL-C works :+1:
closing the terminal window also works fine (according to the log-file), but not suitable for me

1 Like