Building an IoT App with InfluxDB Cloud, Python and Flask (Part 3)
To create a notification rule task in InfluxDB Cloud, follow these steps: 1. Create an endpoint variable in Flux that points to a publicly accessible URL (I punched a hole through my firewall so that my development server is accessible from InfluxDB Cloud). 2. Use the monitoring library to search for any matching statuses that you want to notify users about (specifically if the _level is crit). 3. Call the endpoint for every record that matches that condition, sending along the message created by the check. 4. Store and use the secret in InfluxDB Cloud. 5. Set up the Notification Rule task. 6. Finally, register the notification rule as a task with InfluxDB.
Company
InfluxData
Date published
July 2, 2021
Author(s)
Rick Spencer
Word count
6870
Language
English
Hacker News points
None found.