version: Kapacitor 1.4.1
I’m having trouble using the Match clause in a simple Kapacitor Topic-Handlers. When trying a simple match clause with a weekday(“time”) clause, kapacitor reports the error:
err=“no tag exists for time”
My match clause is: Match: weekday(“time”) >= 1
My expectation is that I can publish deadman nodes to a topic, and use a topic-handler to only alert during Working Hours. For my example, I’ve trimmed the match clause to match Monday-Saturday
Task file:
var threshold = 1.0
var period = 30s
var data = stream
|from()
.database(‘telegraf’)
.retentionPolicy(‘autogen’)
.measurement(measurement)
var trigger = data
|deadman(threshold, period)
.topic(‘plat-test’)
topics:
kapacitor show-topic plat-test
ID: plat-test
Level: OK
Collected: 5
Handlers: [publish-to-plat-test-pd]
Events: …
kapacitor show-topic-handler plat-test publish-to-plat-test-pd
ID: publish-to-plat-test-pd
Topic: plat-test
Kind: publish
Match: weekday(“time”) >= 1
Options: {“topics”:[“plat-test-pd”]}