From ddbe713470bc8b5b944979972682c9836e2be5e5 Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin <valyala@victoriametrics.com> Date: Sun, 15 Oct 2023 19:32:52 +0200 Subject: [PATCH] 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 cc7d5b7bab834173e72aca01c50204839f6f31ec 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. --- README.md | 23 +++++++++++++---------- docs/README.md | 23 +++++++++++++---------- docs/Single-server-VictoriaMetrics.md | 23 +++++++++++++---------- 3 files changed, 39 insertions(+), 30 deletions(-) diff --git a/README.md b/README.md index da410d026b..8610f19ddf 100644 --- a/README.md +++ b/README.md @@ -214,8 +214,8 @@ After changes were made, trigger config re-read with the command `curl 127.0.0.1 ### 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) -and then install it as a service. +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 according to the following guide: 1. Create a service configuration: @@ -225,23 +225,23 @@ and then install it as a service. <name>VictoriaMetrics</name> <description>VictoriaMetrics</description> <executable>%BASE%\victoria-metrics-windows-amd64-prod.exe"</executable> - + <onfailure action="restart" delay="10 sec"/> <onfailure action="restart" delay="20 sec"/> - + <resetfailure>1 hour</resetfailure> - + <arguments>-envflag.enable</arguments> - + <priority>Normal</priority> - + <stoptimeout>15 sec</stoptimeout> - + <stopparentprocessfirst>true</stopparentprocessfirst> <startmode>Automatic</startmode> <waithint>15 sec</waithint> <sleeptime>1 sec</sleeptime> - + <logpath>%BASE%\logs</logpath> <log mode="roll"> <sizeThreshold>10240</sizeThreshold> @@ -251,7 +251,7 @@ and then install it as a service. <env name="loggerFormat" value="json" /> <env name="loggerOutput" value="stderr" /> <env name="promscrape_config" value="C:\Program Files\victoria-metrics\promscrape.yml" /> - + </service> ``` @@ -264,6 +264,9 @@ and then install it as a service. Get-Service VictoriaMetrics | Start-Service ``` +See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3781) for more details. + + ## 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: diff --git a/docs/README.md b/docs/README.md index cf3eac00b3..399d426ac9 100644 --- a/docs/README.md +++ b/docs/README.md @@ -217,8 +217,8 @@ After changes were made, trigger config re-read with the command `curl 127.0.0.1 ### 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) -and then install it as a service. +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 according to the following guide: 1. Create a service configuration: @@ -228,23 +228,23 @@ and then install it as a service. <name>VictoriaMetrics</name> <description>VictoriaMetrics</description> <executable>%BASE%\victoria-metrics-windows-amd64-prod.exe"</executable> - + <onfailure action="restart" delay="10 sec"/> <onfailure action="restart" delay="20 sec"/> - + <resetfailure>1 hour</resetfailure> - + <arguments>-envflag.enable</arguments> - + <priority>Normal</priority> - + <stoptimeout>15 sec</stoptimeout> - + <stopparentprocessfirst>true</stopparentprocessfirst> <startmode>Automatic</startmode> <waithint>15 sec</waithint> <sleeptime>1 sec</sleeptime> - + <logpath>%BASE%\logs</logpath> <log mode="roll"> <sizeThreshold>10240</sizeThreshold> @@ -254,7 +254,7 @@ and then install it as a service. <env name="loggerFormat" value="json" /> <env name="loggerOutput" value="stderr" /> <env name="promscrape_config" value="C:\Program Files\victoria-metrics\promscrape.yml" /> - + </service> ``` @@ -267,6 +267,9 @@ and then install it as a service. Get-Service VictoriaMetrics | Start-Service ``` +See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3781) for more details. + + ## 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: diff --git a/docs/Single-server-VictoriaMetrics.md b/docs/Single-server-VictoriaMetrics.md index 067d940663..d036f0ebc4 100644 --- a/docs/Single-server-VictoriaMetrics.md +++ b/docs/Single-server-VictoriaMetrics.md @@ -225,8 +225,8 @@ After changes were made, trigger config re-read with the command `curl 127.0.0.1 ### 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) -and then install it as a service. +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 according to the following guide: 1. Create a service configuration: @@ -236,23 +236,23 @@ and then install it as a service. <name>VictoriaMetrics</name> <description>VictoriaMetrics</description> <executable>%BASE%\victoria-metrics-windows-amd64-prod.exe"</executable> - + <onfailure action="restart" delay="10 sec"/> <onfailure action="restart" delay="20 sec"/> - + <resetfailure>1 hour</resetfailure> - + <arguments>-envflag.enable</arguments> - + <priority>Normal</priority> - + <stoptimeout>15 sec</stoptimeout> - + <stopparentprocessfirst>true</stopparentprocessfirst> <startmode>Automatic</startmode> <waithint>15 sec</waithint> <sleeptime>1 sec</sleeptime> - + <logpath>%BASE%\logs</logpath> <log mode="roll"> <sizeThreshold>10240</sizeThreshold> @@ -262,7 +262,7 @@ and then install it as a service. <env name="loggerFormat" value="json" /> <env name="loggerOutput" value="stderr" /> <env name="promscrape_config" value="C:\Program Files\victoria-metrics\promscrape.yml" /> - + </service> ``` @@ -275,6 +275,9 @@ and then install it as a service. Get-Service VictoriaMetrics | Start-Service ``` +See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3781) for more details. + + ## 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: