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
This change introduces an option to store the CreateTimeSeriesRequest
protobuf messages in wire format to files under a directory specified,
instead of sending protobuf messages to Stackdriver Monitoring API.
Copy file name to clipboardExpand all lines: cmd/stackdriver-prometheus-sidecar/main.go
+78-32Lines changed: 78 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -180,24 +180,25 @@ func main() {
180
180
}
181
181
182
182
cfg:=struct {
183
-
configFilenamestring
184
-
projectIdResourcestring
185
-
kubernetesLabelskubernetesConfig
186
-
genericLabelsgenericConfig
187
-
stackdriverAddress*url.URL
188
-
metricsPrefixstring
189
-
useGkeResourcebool
190
-
walDirectorystring
191
-
prometheusURL*url.URL
192
-
listenAddressstring
193
-
filters []string
194
-
filtersets []string
195
-
aggregations retrieval.CounterAggregatorConfig
196
-
metricRenamesmap[string]string
197
-
staticMetadata []scrape.MetricMetadata
198
-
useRestrictedIpsbool
199
-
manualResolver*manual.Resolver
200
-
monitoringBackends []string
183
+
configFilenamestring
184
+
projectIdResourcestring
185
+
kubernetesLabelskubernetesConfig
186
+
genericLabelsgenericConfig
187
+
stackdriverAddress*url.URL
188
+
metricsPrefixstring
189
+
useGkeResourcebool
190
+
storeInFilesDirectorystring
191
+
walDirectorystring
192
+
prometheusURL*url.URL
193
+
listenAddressstring
194
+
filters []string
195
+
filtersets []string
196
+
aggregations retrieval.CounterAggregatorConfig
197
+
metricRenamesmap[string]string
198
+
staticMetadata []scrape.MetricMetadata
199
+
useRestrictedIpsbool
200
+
manualResolver*manual.Resolver
201
+
monitoringBackends []string
201
202
202
203
logLevel promlog.AllowedLevel
203
204
}{}
@@ -239,6 +240,9 @@ func main() {
239
240
"Whether to use the legacy gke_container MonitoredResource type instead of k8s_container").
240
241
Default("false").BoolVar(&cfg.useGkeResource)
241
242
243
+
a.Flag("stackdriver.store-in-files-directory", "If specified, store the CreateTimeSeriesRequest protobuf messages to files under this directory, instead of sending protobuf messages to Stackdriver Monitoring API.").
244
+
StringVar(&cfg.storeInFilesDirectory)
245
+
242
246
a.Flag("prometheus.wal-directory", "Directory from where to read the Prometheus TSDB WAL.").
0 commit comments