TICKscript:
var running = batch
|query('''select count(value) from
"collectd_db"."default".marathon_tasks_value where host =~
/daldevmesoszk01.dev-1/ and instance =~ /amber/''')
.period(20s)
.every(10s)
.groupBy('host')
|httpOut('running')
var expected = batch
|query(''' select first(value) as expected from
"collectd_db"."default".marathon_apps_value where type_instance =
'uptime_5m' and instance =~ /amber/ ''')
.period(20s)
.every(10s)
.groupBy('type_instance')
|httpOut('expected')
I want to compare "Count" and "Expected" in this result. How Can I do that?
Also, how can I extract just the count and expected in a variable like an
int value without accompanying timestamp?
First Query Result:
--------------------
{
- Series:
[
-
{
- name: "marathon_tasks_value",
- tags:
{
- host: "daldevmesoszk01.dev-1"
},
- columns:
[
- "time",
- "count"
],
- values:
[
-
[
- "2016-10-19T22:45:54.991668195Z",
- 2
]
]
}
],
- Err: null
}
Second query Result:
--------------------------
{
- Series:
[
-
{
- name: "marathon_apps_value",
- tags:
{
- type_instance: "uptime_5m"
},
- columns:
[
- "time",
- "expected"
],
- values:
[
-
[
- "2016-10-19T22:45:44.991658798Z",
- 2
]
]
}
],
- Err: null
}
Thanks in Advance.
On Wed, Oct 19, 2016 at 3:24 PM, <[email protected]> wrote:
> A simple `|sum('emiited')` should work, but its hard to tell without the
> context of your TICkscirpt. Can you share your TICKscript that is producing
> that data?
>
>
> On Tuesday, October 18, 2016 at 6:07:12 PM UTC-6, Vinit wrote:
>>
>> I have data like this, I want to sum of the column "emitted" across the
>> series.
>> Also, what's a good way to do such aggregations across the different
>> series?
>>
>> {
>>
>> - Series:
>> [
>> -
>> {
>> - name: "stats",
>> - tags:
>> {
>> - type_instance: "b8c3c249-8f19-11e6-9d75-00505696910d"
>> },
>> - columns:
>> [
>> - "time",
>> - "emitted"
>> ],
>> - values:
>> [
>> -
>> [
>> - "2016-10-18T23:32:27.276094148Z",
>> - 1
>> ]
>> ]
>> },
>> -
>> {
>> - name: "stats",
>> - tags:
>> {
>> - type_instance: "b8c60c41-8f19-11e6-9d75-00505696910d"
>> },
>> - columns:
>> [
>> - "time",
>> - "emitted"
>> ],
>> - values:
>> [
>> -
>> [
>> - "2016-10-18T23:32:27.276094148Z",
>> - 1
>> ]
>> ]
>> }
>> ],
>> - Err: null
>>
>> }
>>
> --
> Remember to include the version number!
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "InfluxData" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/influxdb/ifG7iW4EkL4/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/influxdb.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/influxdb/8b76fc2a-6c69-4593-b96b-2a5e6b7a0b60%40googlegroups.com
> <https://groups.google.com/d/msgid/influxdb/8b76fc2a-6c69-4593-b96b-2a5e6b7a0b60%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
~Vinit
--
Remember to include the version number!
---
You received this message because you are subscribed to the Google Groups
"InfluxData" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/influxdb.
To view this discussion on the web visit
https://groups.google.com/d/msgid/influxdb/CAKSnE9nZzRdcaweghiOS4Us%3D9Fa724TOrOFr2wEgmJbc9Dw0bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.