You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
flag.StringVar(&StartParams.ListenAddress, "web.listen-address", StartParams.ListenAddress, "Address on which to expose metrics and web interface.")
77
-
flag.StringVar(&StartParams.Path, "web.telemetry-path", StartParams.Path, "Path under which to expose metrics.")
78
-
flag.StringVar(&StartParams.HealthPath, "web.health-path", StartParams.HealthPath, "Path under which to expose healthcheck. Disabled unless configured.")
26
+
flag.StringVar(&varnishexporter.StartParams.ListenAddress, "web.listen-address", varnishexporter.StartParams.ListenAddress, "Address on which to expose metrics and web interface.")
27
+
flag.StringVar(&varnishexporter.StartParams.Path, "web.telemetry-path", varnishexporter.StartParams.Path, "Path under which to expose metrics.")
28
+
flag.StringVar(&varnishexporter.StartParams.HealthPath, "web.health-path", varnishexporter.StartParams.HealthPath, "Path under which to expose healthcheck. Disabled unless configured.")
79
29
80
30
// varnish
81
-
flag.StringVar(&StartParams.VarnishstatExe, "varnishstat-path", StartParams.VarnishstatExe, "Path to varnishstat.")
flag.StringVar(&StartParams.VarnishDockerContainer, "docker-container-name", StartParams.VarnishDockerContainer, "Docker container name to exec varnishstat in.")
36
+
flag.StringVar(&varnishexporter.StartParams.VarnishDockerContainer, "docker-container-name", varnishexporter.StartParams.VarnishDockerContainer, "Docker container name to exec varnishstat in.")
87
37
88
38
// modes
89
39
version:=false
90
40
flag.BoolVar(&version, "version", version, "Print version and exit")
91
-
flag.BoolVar(&StartParams.ExitOnErrors, "exit-on-errors", StartParams.ExitOnErrors, "Exit process on scrape errors.")
flag.BoolVar(&varnishexporter.StartParams.Test, "test", varnishexporter.StartParams.Test, "Test varnishstat availability, prints available metrics and exits.")
44
+
flag.BoolVar(&varnishexporter.StartParams.Raw, "raw", varnishexporter.StartParams.Test, "Raw stdout varnishexporter.Logging without timestamps.")
45
+
flag.BoolVar(&varnishexporter.StartParams.WithGoMetrics, "with-go-metrics", varnishexporter.StartParams.WithGoMetrics, "Export go runtime and http handler metrics")
96
46
97
47
// deprecated
98
-
flag.BoolVar(&StartParams.noExit, "no-exit", StartParams.noExit, "Deprecated: see -exit-on-errors")
48
+
flag.BoolVar(&varnishexporter.StartParams.NoExit, "no-exit", varnishexporter.StartParams.NoExit, "Deprecated: see -exit-on-errors")
varnishexporter.LogFatal("-web.telemetry-path and -web.health-path cannot have same value")
117
65
}
118
66
119
-
// Don't log warning on !noExit as that would spam for the formed default value.
120
-
ifStartParams.noExit {
121
-
logWarn("-no-exit is deprecated. As of v1.5 it is the default behavior not to exit process on scrape errors. You can remove this parameter.")
67
+
// Don't varnishexporter.Log warning on !noExit as that would spam for the formed default value.
68
+
ifvarnishexporter.StartParams.NoExit {
69
+
varnishexporter.LogWarn("-no-exit is deprecated. As of v1.5 it is the default behavior not to exit process on scrape errors. You can remove this parameter.")
122
70
}
123
71
124
72
// Test run or user explicitly wants to exit on any scrape errors during runtime.
0 commit comments