Measurement as part of the group id of a deadman switch

I’m trying to get a deadman switch running in a generic way over all the measurements. To do so I’m trying to use the groupBy(*) and groupByMeasurement() parameters of a stream FromNode. The deadman switch node seems to divide all the time series correctly and processes each series grouped by measurement and tags. Unfortunately the .Name and .Group variables used in the TICKScript only contain the value “stats” and “stats SomeTag=SomeValue” respectively. I’d expect .Name to be the name of the measurement though as well as the “stats…” part of the .Group variable. What is going on here?

Hello @w4tsn,
.name should be the name of the rule you’re making to handle the deadman alert. How are you creating the deadman TICK script? Have you tried using Chronograph to do so? If not, I recommend checking it out. It will generate it for you automatically and allow you to specify any groupby’s.

Hello @Anaisdg,
there is a misunderstanding. Let me explain it in more detail:

I’ve created a TICKScript in Chronograf over the deadman functionality. I then edited the resulting script and changed some of the contents for a use-case, which the UI is not able to handle. I also tried it with a default TICKScript in Chronograf.

The .name property in the scope of the script / node-graph itself is correctly assigned the name of the script and set by myself at the top of the script. So this variable works perfectly fine.

My use-case though, requires to get the measurement name as part of the .Group variable in the scope of the alert ID and Message, in order to group the deadman alerts by measurement. This should be the case as of [2]. What is actually happening, like mentioned above, is that the .Name var of an ID-Property Template and the .Group var of a Message or GroupBy scope [1] is not populated with the Measurement name as stated here [2].

When using just an alert node in another scenario this is working. When using the deadman switch, it’s populated like stated above with the name of the stats node. I suspect this to be a bug. If this is correct I’ll file an issue on github, if not I’m happy if you enlighten me :wink:

[1] AlertNode | Kapacitor 1.5 Documentation
[2] FromNode | Kapacitor 1.5 Documentation

@w4tsn,
Thank you for clarifying. I was indeed confused. I’ll look into it and see what I can find. Again, thanks for your question.