Open gaos1 opened 9 years ago
Hi Gaos,
I was watching this thread hoping somebody more able than I would respond. I haven't found a way to do that with the stable version, however with 2.2 it is quite easy using filters, e.g. : [CODE]
"start": 1389953499,
"end": 1418811099,
"queries": [
{
"aggregator": "avg",
"metric": "env.indoor.temperature",
"downsample": "1d-avg",
"rate": "false",
"filters": [
{
"type": "literal_or",
"tagk": "srcid",
"filter":"38|39",
"groupBy": false
}
]
}
]
}
[/CODE]
If you change groupBy to true, you will get two separate series instead of one.
Regards,
Alex
@gaos1, @aleyandre is right, if that's all you're looking to do then use the new Filters method and you'll get the aggregate. We just can't do cross-metric aggregations yet.
Thank you. It seems groupBy can meet our requirements. We are using 2.1. and we will upgrade it to 2.2 for testing.
On Thu, Aug 27, 2015 at 12:41 PM, Chris Larsen notifications@github.com wrote:
@gaos1 https://github.com/gaos1, @aleyandre https://github.com/aleyandre is right, if that's all you're looking to do then use the new Filters method and you'll get the aggregate. We just can't do cross-metric aggregations yet.
— Reply to this email directly or view it on GitHub https://github.com/OpenTSDB/opentsdb/issues/546#issuecomment-135288846.
per your estimation, when will 2.2 be released?
On Thu, Aug 27, 2015 at 2:11 PM, Simon Gao sgao@pivotal.io wrote:
Thank you. It seems groupBy can meet our requirements. We are using 2.1. and we will upgrade it to 2.2 for testing.
On Thu, Aug 27, 2015 at 12:41 PM, Chris Larsen notifications@github.com wrote:
@gaos1 https://github.com/gaos1, @aleyandre https://github.com/aleyandre is right, if that's all you're looking to do then use the new Filters method and you'll get the aggregate. We just can't do cross-metric aggregations yet.
— Reply to this email directly or view it on GitHub https://github.com/OpenTSDB/opentsdb/issues/546#issuecomment-135288846.
I'm spending all weekend on it so as soon as I fix the last query bug I'll cut an RC.
2.2 is out, as most people know obviously. 2.3 has expressions like sum() and will be an RC soonish.
http://opentsdb.net/docs/build/html/api_http/query/exp.html
We can probably close this @manolama
@manolama You can close this as said @johann8384
for the following query, i want the result to be sum of two matched series. can opentsdb support this?
/api/query?start=1h-ago&m=sum:system.healthy{job=etcd_z1|etcd_z2}
opentsdb response:
I want to see a response like this: