mirror of https://github.com/prometheus/prometheus
Browse Source
If the metrics exported by a process already contain any of a target's base labels (such as "job" or "instance", but also any manually assigned target-group label), don't overwrite that label, but instead add a new label consisting of the original label name prepended with "exporter_". This is to accomodate intermediate exporter jobs, which might indicate e.g. the jobs and instances for which they are exporting data.pull/277/head
Julius Volz
12 years ago
8 changed files with 182 additions and 73 deletions
@ -0,0 +1,79 @@
|
||||
[ |
||||
{ |
||||
"baseLabels": { |
||||
"name": "rpc_calls_total", |
||||
"job": "batch_job" |
||||
}, |
||||
"docstring": "RPC calls.", |
||||
"metric": { |
||||
"type": "counter", |
||||
"value": [ |
||||
{ |
||||
"labels": { |
||||
"service": "zed" |
||||
}, |
||||
"value": 25 |
||||
}, |
||||
{ |
||||
"labels": { |
||||
"service": "bar" |
||||
}, |
||||
"value": 25 |
||||
}, |
||||
{ |
||||
"labels": { |
||||
"service": "foo" |
||||
}, |
||||
"value": 25 |
||||
} |
||||
] |
||||
} |
||||
}, |
||||
{ |
||||
"baseLabels": { |
||||
"name": "rpc_latency_microseconds" |
||||
}, |
||||
"docstring": "RPC latency.", |
||||
"metric": { |
||||
"type": "histogram", |
||||
"value": [ |
||||
{ |
||||
"labels": { |
||||
"service": "foo" |
||||
}, |
||||
"value": { |
||||
"0.010000": 15.890724674774395, |
||||
"0.050000": 15.890724674774395, |
||||
"0.500000": 84.63044031436561, |
||||
"0.900000": 160.21100853053224, |
||||
"0.990000": 172.49828748957728 |
||||
} |
||||
}, |
||||
{ |
||||
"labels": { |
||||
"service": "zed" |
||||
}, |
||||
"value": { |
||||
"0.010000": 0.0459814091918713, |
||||
"0.050000": 0.0459814091918713, |
||||
"0.500000": 0.6120456642749681, |
||||
"0.900000": 1.355915069887731, |
||||
"0.990000": 1.772733213161236 |
||||
} |
||||
}, |
||||
{ |
||||
"labels": { |
||||
"service": "bar" |
||||
}, |
||||
"value": { |
||||
"0.010000": 78.48563317257356, |
||||
"0.050000": 78.48563317257356, |
||||
"0.500000": 97.31798360385088, |
||||
"0.900000": 109.89202084295582, |
||||
"0.990000": 109.99626121011262 |
||||
} |
||||
} |
||||
] |
||||
} |
||||
} |
||||
] |
Loading…
Reference in new issue