mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-02-08 05:56:37 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05091643c6 | ||
|
|
76e73487e4 | ||
|
|
9a2ec21278 | ||
|
|
44b435e7d4 |
@@ -52,7 +52,7 @@
|
||||
<fw:RemoteAddress>[REMOTE_ADDR]</fw:RemoteAddress>
|
||||
</fw:FirewallException>
|
||||
</File>
|
||||
<ServiceInstall Id="InstallExporterService" Name="windows_exporter" DisplayName="windows_exporter" Description="Exports Prometheus metrics about the system" ErrorControl="normal" Start="auto" Type="ownProcess" Arguments="--log.format eventlog [CollectorsFlag] [ListenFlagBoth] [ListenFlagAddr] [ListenFlagPort] [MetricsPathFlag] [TextfileDirFlag] [ExtraFlags]">
|
||||
<ServiceInstall Id="InstallExporterService" Name="windows_exporter" DisplayName="windows_exporter" Description="Exports Prometheus metrics about the system" ErrorControl="normal" Start="auto" Type="ownProcess" Arguments="--log.file eventlog [CollectorsFlag] [ListenFlagBoth] [ListenFlagAddr] [ListenFlagPort] [MetricsPathFlag] [TextfileDirFlag] [ExtraFlags]">
|
||||
<util:ServiceConfig FirstFailureActionType="restart" SecondFailureActionType="restart" ThirdFailureActionType="restart" RestartServiceDelayInSeconds="60" />
|
||||
<ServiceDependency Id="wmiApSrv" />
|
||||
</ServiceInstall>
|
||||
|
||||
@@ -24,6 +24,7 @@ func (f *AllowedFile) String() string {
|
||||
|
||||
// Set updates the value of the allowed format.
|
||||
func (f *AllowedFile) Set(s string) error {
|
||||
f.s = s
|
||||
switch s {
|
||||
case "stdout":
|
||||
f.w = os.Stdout
|
||||
@@ -77,6 +78,8 @@ func New(config *Config) (log.Logger, error) {
|
||||
return nil, err
|
||||
}
|
||||
l = eventlog.NewEventLogLogger(w, loggerFunc)
|
||||
} else if config.File.w == nil {
|
||||
panic("logger: file writer is nil")
|
||||
} else {
|
||||
l = loggerFunc(log.NewSyncWriter(config.File.w))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user