Working with match in topic-handlers



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

var trigger = data
|deadman(threshold, period)

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”]}


I think you may be seeing the same error mentioned in this issue. You may need to set a default value.


Thank you for your reply. I’ll give that try :slight_smile: