Glenn Davy
2017-05-29 23:29:03 UTC
Hi
In the capacitor alert node, to construct a meaningful message. If I don't
use an aggregate or selector like mean, for example like this:
stream
|from()
.measurement(measurement)
.groupBy(groups)
|window()
.period(period)
.every(frequency)
|alert()
.id('{{ .TaskName }}/{{ .Name }}/{{index .Tags "role"}}/instance:
{{index .Tags "instance_id"}}')
.message('{{ .ID }} is at {{ .Level }} has {{ index .Fields
"available_percent" }}% of memory available on role: {{ index .Tags "role"
}}, on instance {{ index .Tags "instance_id" }}. There is {{ index .Fields
"available" }}Mb out of {{ index .Fields "total" }}Mb')
.crit(lambda: "available_percent" > 1.0)
.victorOps()
I can get access to the other values. However, If I want say the mean over
my window, I can't see how to get this.
I hoped I could ask for the mean of the stat that I want and then the mean
of the other fields, and reference those, for e.g.
|mean('available')
as('mean_available)
|mean('total')
as('mean_total')
|mean('available_percent')
as('available_percent')
but, chaining 'mean' doesn't really make sense, and using 'show' I can see
errors on the 2nd node, which might be expected.
Any hints?
In the capacitor alert node, to construct a meaningful message. If I don't
use an aggregate or selector like mean, for example like this:
stream
|from()
.measurement(measurement)
.groupBy(groups)
|window()
.period(period)
.every(frequency)
|alert()
.id('{{ .TaskName }}/{{ .Name }}/{{index .Tags "role"}}/instance:
{{index .Tags "instance_id"}}')
.message('{{ .ID }} is at {{ .Level }} has {{ index .Fields
"available_percent" }}% of memory available on role: {{ index .Tags "role"
}}, on instance {{ index .Tags "instance_id" }}. There is {{ index .Fields
"available" }}Mb out of {{ index .Fields "total" }}Mb')
.crit(lambda: "available_percent" > 1.0)
.victorOps()
I can get access to the other values. However, If I want say the mean over
my window, I can't see how to get this.
I hoped I could ask for the mean of the stat that I want and then the mean
of the other fields, and reference those, for e.g.
|mean('available')
as('mean_available)
|mean('total')
as('mean_total')
|mean('available_percent')
as('available_percent')
but, chaining 'mean' doesn't really make sense, and using 'show' I can see
errors on the 2nd node, which might be expected.
Any hints?
--
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 influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/2ace6278-67f3-4cb7-9609-f1363442e236%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
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 influxdb+***@googlegroups.com.
To post to this group, send email to ***@googlegroups.com.
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/2ace6278-67f3-4cb7-9609-f1363442e236%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.