json_exporter
json_exporter copied to clipboard
Jsonpath in name:
trafficstars
Hi!
How can i use Jsonpath to generate name: ???
example:
path: '{ .components }'
i have same components and use labels: status: '{.status}'
if i have 10 components i must write to config 10 metrics.
But i whount use path to write name of metric
may be:
name: anycomponenname-'{ .components }'
and have generate metrics:
anycomponenname-name1 anycomponenname-name2 anycomponenname-name3 ...
help PLS
I don't understand your use case clearly, but it seems like you should use labels to differentiate between your metrics. Keep the metric name constant (because it is the information of same type/source) and attach labels for providing additional information.