GoogleCloudPlatform / GoogleCloudPlatform/k8s-stackdriver

[prometheus-to-sd] Error while sending request to Stackdriver googleapi: Error 400: One or more TimeSeries could not be written: Unrecognized region or location.: timeSeries[0-199], badRequest

Open
#421 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
409
Forks
236
Avg merge
2h 34m
Merged PRs (30d)
9

Description

When I add the flag `--monitored-resource-type-prefix=k8s_` to `prometheus-to-sd`, I get the following error in the logs and no longer can see metrics in Stackdriver:

```
Error while sending request to Stackdriver googleapi: Error 400: One or more TimeSeries could not be written: Unrecognized region or location.: timeSeries[0-199], badRequest
```

prometheus-to-sd config:
```
name = "prometheus-to-sd"
image = "gcr.io/google-containers/prometheus-to-sd:v0.9.2"
port {
name = "profiler"
container_port = 6060
}
command = [
"/monitor",
"--stackdriver-prefix=custom.googleapis.com",
"--source=kube-state-metrics:http://localhost:8080",
"--monitored-resource-type-prefix=k8s_",
"--pod-id=$(POD_NAME)",
"--namespace-id=$(POD_NAMESPACE)"
]
```

kube-state-metrics config:
```
name = "kube-state-metrics"
image = "k8s.gcr.io/kube-state-metrics/kube-state-metrics:v2.0.0"
image_pull_policy = "Always"
args = []
command = []

port {
name = "http-metrics"
container_port = 8080
host_port = 0
}
```

It works if I drop the image down to `v0.9.0` or remove the `monitored-resource-type-prefix` flag.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.