I'm unable to disable some metrics for stackdriver from prometheus.
I tried to change prometheus yaml in configmap as below.
remote_write:
- url: "https://monitoring.googleapis.com:443/"
queue_config:
# Capacity should be 2*max_samples_per_send.
capacity: 400
max_samples_per_send: 200
max_shards: 10000
write_relabel_configs:
# These labels are generally redundant with the Stackdriver monitored resource labels.
- source_labels: [__name__]
regex: etcd_network(.+)
# "etcd_network*"
# "(etcd_network.+)"
action: drop
I expect will not receive any metrics likes "etcd network..." but it's still appears in StackDriver dashboard.
Finally found it, need to edit job... :
- job_name: 'kubernetes-pods-containers'
metric_relabel_configs:
- source_labels: [__name__]
regex: "etcd_grpc.+"
action: drop