docs/Single-server-VictoriaMetrics.md: add a link to the original issue, which describes how to run VictoriaMetrics as Windows service

This is a follow-up for cc7d5b7bab

The original issue https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3781 contains
up-to-date information on how to run VictoriaMetrics components as Windows service,
plus it may contain additional information about this case such as https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3781#issuecomment-1708092680 ,
so it is better to refer this issue from the docs.
This commit is contained in:
Aliaksandr Valialkin 2023-10-15 19:32:52 +02:00
parent d2bf73bd07
commit 8cdf57bfb1
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1
2 changed files with 26 additions and 20 deletions

View File

@ -217,8 +217,8 @@ After changes were made, trigger config re-read with the command `curl 127.0.0.1
### Running as Windows service ### Running as Windows service
In order to run as a windows service it is required to create a service configuration for [WinSW](https://github.com/winsw/winsw) In order to run VictoriaMetrics as a Windows service it is required to create a service configuration for [WinSW](https://github.com/winsw/winsw)
and then install it as a service. and then install it as a service according to the following guide:
1. Create a service configuration: 1. Create a service configuration:
@ -228,23 +228,23 @@ and then install it as a service.
<name>VictoriaMetrics</name> <name>VictoriaMetrics</name>
<description>VictoriaMetrics</description> <description>VictoriaMetrics</description>
<executable>%BASE%\victoria-metrics-windows-amd64-prod.exe"</executable> <executable>%BASE%\victoria-metrics-windows-amd64-prod.exe"</executable>
<onfailure action="restart" delay="10 sec"/> <onfailure action="restart" delay="10 sec"/>
<onfailure action="restart" delay="20 sec"/> <onfailure action="restart" delay="20 sec"/>
<resetfailure>1 hour</resetfailure> <resetfailure>1 hour</resetfailure>
<arguments>-envflag.enable</arguments> <arguments>-envflag.enable</arguments>
<priority>Normal</priority> <priority>Normal</priority>
<stoptimeout>15 sec</stoptimeout> <stoptimeout>15 sec</stoptimeout>
<stopparentprocessfirst>true</stopparentprocessfirst> <stopparentprocessfirst>true</stopparentprocessfirst>
<startmode>Automatic</startmode> <startmode>Automatic</startmode>
<waithint>15 sec</waithint> <waithint>15 sec</waithint>
<sleeptime>1 sec</sleeptime> <sleeptime>1 sec</sleeptime>
<logpath>%BASE%\logs</logpath> <logpath>%BASE%\logs</logpath>
<log mode="roll"> <log mode="roll">
<sizeThreshold>10240</sizeThreshold> <sizeThreshold>10240</sizeThreshold>
@ -254,7 +254,7 @@ and then install it as a service.
<env name="loggerFormat" value="json" /> <env name="loggerFormat" value="json" />
<env name="loggerOutput" value="stderr" /> <env name="loggerOutput" value="stderr" />
<env name="promscrape_config" value="C:\Program Files\victoria-metrics\promscrape.yml" /> <env name="promscrape_config" value="C:\Program Files\victoria-metrics\promscrape.yml" />
</service> </service>
``` ```
@ -267,6 +267,9 @@ and then install it as a service.
Get-Service VictoriaMetrics | Start-Service Get-Service VictoriaMetrics | Start-Service
``` ```
See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3781) for more details.
## Prometheus setup ## Prometheus setup
Add the following lines to Prometheus config file (it is usually located at `/etc/prometheus/prometheus.yml`) in order to send data to VictoriaMetrics: Add the following lines to Prometheus config file (it is usually located at `/etc/prometheus/prometheus.yml`) in order to send data to VictoriaMetrics:

View File

@ -225,8 +225,8 @@ After changes were made, trigger config re-read with the command `curl 127.0.0.1
### Running as Windows service ### Running as Windows service
In order to run as a windows service it is required to create a service configuration for [WinSW](https://github.com/winsw/winsw) In order to run VictoriaMetrics as a Windows service it is required to create a service configuration for [WinSW](https://github.com/winsw/winsw)
and then install it as a service. and then install it as a service according to the following guide:
1. Create a service configuration: 1. Create a service configuration:
@ -236,23 +236,23 @@ and then install it as a service.
<name>VictoriaMetrics</name> <name>VictoriaMetrics</name>
<description>VictoriaMetrics</description> <description>VictoriaMetrics</description>
<executable>%BASE%\victoria-metrics-windows-amd64-prod.exe"</executable> <executable>%BASE%\victoria-metrics-windows-amd64-prod.exe"</executable>
<onfailure action="restart" delay="10 sec"/> <onfailure action="restart" delay="10 sec"/>
<onfailure action="restart" delay="20 sec"/> <onfailure action="restart" delay="20 sec"/>
<resetfailure>1 hour</resetfailure> <resetfailure>1 hour</resetfailure>
<arguments>-envflag.enable</arguments> <arguments>-envflag.enable</arguments>
<priority>Normal</priority> <priority>Normal</priority>
<stoptimeout>15 sec</stoptimeout> <stoptimeout>15 sec</stoptimeout>
<stopparentprocessfirst>true</stopparentprocessfirst> <stopparentprocessfirst>true</stopparentprocessfirst>
<startmode>Automatic</startmode> <startmode>Automatic</startmode>
<waithint>15 sec</waithint> <waithint>15 sec</waithint>
<sleeptime>1 sec</sleeptime> <sleeptime>1 sec</sleeptime>
<logpath>%BASE%\logs</logpath> <logpath>%BASE%\logs</logpath>
<log mode="roll"> <log mode="roll">
<sizeThreshold>10240</sizeThreshold> <sizeThreshold>10240</sizeThreshold>
@ -262,7 +262,7 @@ and then install it as a service.
<env name="loggerFormat" value="json" /> <env name="loggerFormat" value="json" />
<env name="loggerOutput" value="stderr" /> <env name="loggerOutput" value="stderr" />
<env name="promscrape_config" value="C:\Program Files\victoria-metrics\promscrape.yml" /> <env name="promscrape_config" value="C:\Program Files\victoria-metrics\promscrape.yml" />
</service> </service>
``` ```
@ -275,6 +275,9 @@ and then install it as a service.
Get-Service VictoriaMetrics | Start-Service Get-Service VictoriaMetrics | Start-Service
``` ```
See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3781) for more details.
## Prometheus setup ## Prometheus setup
Add the following lines to Prometheus config file (it is usually located at `/etc/prometheus/prometheus.yml`) in order to send data to VictoriaMetrics: Add the following lines to Prometheus config file (it is usually located at `/etc/prometheus/prometheus.yml`) in order to send data to VictoriaMetrics: