web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Using Flows
Unanswered

Post alert in teams channel using Kapacitor

(1) ShareShare
ReportReport
Posted on by

Hello! I am newbie to Power Automate and MS flows. I'm using  Kapacitor from TICK stack to send alerts to a flow to post the alert in teams channel.

Please guide me how can i send notification using kapacitor

My Older Tickscript Working fine with Webhook O365 Connector 

 

 

 

var db = 'telegraf'

var rp = 'autogen'

var measurement = 'ethtool'

var groupBy = []

var period = 5s

var whereFilter = lambda: ("host" == '213_shaktimaan') AND ("interface" == 'enp3s0') AND isPresent("interface_up")

var name = 'Manshu_Interface_Check'

var idVar = name

var message = 'Interface is down! Host: {{ .Tags.host }}, Value: {{ index .Fields "value" }}'

var idTag = 'alertID'

var levelTag = 'level'

var messageField = 'message'

var durationField = 'duration'

var outputDB = 'chronograf'

var outputRP = 'autogen'

var outputMeasurement = 'alerts'

var triggerType = 'threshold'

var crit = 'true'

var data = stream
 |from()
 .database(db)
 .retentionPolicy(rp)
 .measurement(measurement)
 .where(whereFilter)
 |eval(lambda: "interface_up")
 .as('value')
 |httpOut('debug')

var trigger = data
 |alert()
 .crit(lambda: "value" == FALSE)
 .stateChangesOnly(30s)
 .message(message)
 .id(idVar)
 .idTag(idTag)
 .levelTag(levelTag)
 .messageField(messageField)
 .durationField(durationField)
 .teams()
 .channelURL('https://kivicapitalin.webhook.office.com/webhookb2/5a07d11e-f255-46b5-8d87-e4186973aec9@b5b1a78b-9721-421b-a3e5-b56d1f6ea9e2/IncomingWebhook/28df37ff07fb421c81d4d3bfd2f45c91/58b643a3-6618-4077-a3d5-8c9481042714')

trigger
 |eval(lambda: float("value"))
 .as('value')
 .keep()
 |influxDBOut()
 .create()
 .database(outputDB)
 .retentionPolicy(outputRP)
 .measurement(outputMeasurement)
 .tag('alertName', name)
 .tag('triggerType', triggerType)

trigger
 |httpOut('output')

 

 

 

 

Please share a sample example !

 

 

 

 

 

 

 

 

I have the same question (0)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 666 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 382 Moderator

#3
developerAJ Profile Picture

developerAJ 254

Last 30 days Overall leaderboard

Featured topics

Restore a deleted flow