I want to rename a metric based on the value of its tag.
Reason: A large JSON array is received via http get and parsed in the inputs plug-in. My testing has shown that only the first
measurement_name statement takes effect. In other words, if the code sets
measurement_name="foo", parses out a metric, . . . then sets
measurement_name="bar" and parses a different metric . . . the result is that all the parsed metrics have the same measurement name
The second batch of parsed metrics need to have a different name.
I tried [[processors.regex.metric_rename]] which seems to only search on the measurement name.
How do I start with one JSON array, parse out several metrics based on different criteria (which works now) and assign each result its own unique measurement name.