Hello everyone,
i've downloaded prometheus for windows and can successfully start it whilst i'm logged in via RDS.
To run it in background, i've tried to wrap a service around but starting it as a MS Windows Service failed.
sc.exe create prometheus_server binPath="PATH_TO_EXE\prometheus.exe --config.file=PATH_TO_CONFIG\prometheus.yml"
After starting the service, prometheus runs for a short time, until (i guess) the service manager runs into a timeout because of a missing response of a successful start.
My current environment
Do you have any solution for that? Thanks and kind Regards
Lukas
nssm.exe install _prometheus C:\tools\prometheus\prometheus.exenssm.exe set _prometheus AppParameters "--config.file C:\tools\prometheus\prometheus.yml"nssm.exe set _prometheus AppDirectory C:\tools\prometheusnssm.exe set _prometheus AppExit Default Restartnssm.exe set _prometheus AppRestartDelay 5000nssm.exe set _prometheus AppStdout C:\tools\prometheus\logs\std_out.lognssm.exe set _prometheus AppStdoutCreationDisposition 2nssm.exe set _prometheus AppStderr C:\tools\prometheus\logs\std_err.lognssm.exe set _prometheus AppStderrCreationDisposition 2nssm.exe set _prometheus AppStopMethodSkip 6nssm.exe set _prometheus AppStopMethodConsole 5000nssm.exe set _prometheus AppThrottle 5000nssm.exe set _prometheus AppRotateFiles 1nssm.exe set _prometheus AppRotateOnline 1nssm.exe set _prometheus AppRotateSeconds 86400nssm.exe set _prometheus AppRotateBytes 10485760nssm.exe set _prometheus DisplayName _prometheusnssm.exe set _prometheus ObjectName LocalSystemnssm.exe set _prometheus Start SERVICE_AUTO_STARTnssm.exe set _prometheus Type SERVICE_WIN32_OWN_PROCESS
I have the same problem, tried about 5 different configurations without any luck. Windows 7. I'd like to do without NSSM if possible
nssm install prometheus D:\prometheus\bin\prometheus.exe "--config.file=D:\prometheus\config\prometheus.yml --storage.tsdb.path=D:\prometheus\data --storage.tsdb.retention.time=16w --log.level=info"
nssm set prometheus AppStdout D:\prometheus\logs\std_out.log
nssm set prometheus AppStdoutCreationDisposition 2
nssm set prometheus AppStderr D:\prometheus\logs\std_err.log
nssm set prometheus AppStderrCreationDisposition 2
Yes for me it’s working. I use nssm 2.24. One difference is, I’m logging both fd to same file:
%NSSM% set %SERVICENAME% AppStdout %PROMHOME%\logs\service.log
%NSSM% set %SERVICENAME% AppStderr %PROMHOME%\logs\service.log
--
You received this message because you are subscribed to a topic in the Google Groups "Prometheus Users" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/prometheus-users/NjtTA7vsVJ8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
prometheus-use...@googlegroups.com.
To post to this group, send email to
promethe...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/ff2f33de-9e22-4b89-85a3-ec9efb263772%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and all its topics, send an email to prometh...@googlegroups.com.
To post to this group, send email to prometh...@googlegroups.com.
nssm install prom_exporter_general D:\soft\wmi_exporter.exe
nssm set prom_exporter_general AppParameters "--collectors.enabled """cpu,cs,os,logical_disk,net,system""" --telemetry.addr=""":5015"
nssm set prom_exporter_general AppStdout D:\path\to\prometheus\logs\exporter_std_out.log
nssm set prom_exporter_general AppStdoutCreationDisposition 2
nssm set prom_exporter_general AppStderr D:\path\to\prometheus\logs\exporter_std_error.log
nssm set prom_exporter_general AppStderrCreationDisposition 2
nssm set prom_exporter_general AppRotateFiles 1
nssm set prom_exporter_general AppRotateOnline 1
nssm set prom_exporter_general AppRotateSeconds 86400
nssm set prom_exporter_general AppRotateBytes 10485760
nssm start prom_exporter_general
I think you should set the param for AppStdoutCreationDisposition and AppStderrCreationDisposition to 4, which maps to OPEN_ALWAYS.
To unsubscribe from this group and all its topics, send an email to
prometheus-use...@googlegroups.com.
To post to this group, send email to
promethe...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/91f2999b-5c8a-410e-a82c-5a9b573becff%40googlegroups.com.
Or maybe better use the gui with nssm edit.
Von: promethe...@googlegroups.com <promethe...@googlegroups.com>
Im Auftrag von thebitt...@gmail.com
Gesendet: Dienstag, 21. Mai 2019 11:34
To unsubscribe from this group and all its topics, send an email to
prometheus-use...@googlegroups.com.
To post to this group, send email to
promethe...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/91f2999b-5c8a-410e-a82c-5a9b573becff%40googlegroups.com.