I need to query graphite for data with a few different targets; currently I do a http query for each target. for instance:
http://graphite.example.com/render/?format=json&until=now&from=-1min&target=servers.srv231.solr.hits
http://graphite.example.com/render/?format=json&until=now&from=-1min&target=servers.srv325.solr.hits
Is there a way to get the two results in one query? I could do as follows:
http://graphite.example.com/render/?format=json&until=now&from=-1min&target=servers.srv*.solr.hits
but I would get a lot of other data that I am not interested in.
i've tried using regular expressions, like this, but it does not work:
http://graphite.example.com/render/?format=json&until=now&from=-1min&target=servers.srv(231|325).solr.hits
In the doc, they do not mention regular expressions nor wildcards, but they use wildcards in the examples. http://graphite.readthedocs.org/en/0.9.10/render_api.html
is there a way to achieve my goal?
Graphite uses globs not regular expressions for matching. So your query would be:
http://graphite.example.com/render/?format=json&until=now&from=-1min&target=servers.srv{231,325}.solr.hits
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With