Create a monitoring rule programmatically
3min
Kensu also lets you create rules with code.
For the third run of the pipeline, we add a new function, add_variability_constraint_data_source, to reporting_v2.py.
This function creates a rule that will create a ticket when Adj Close.mean value deviates by more than 30% from the previous value.
Here is the code:
Python
|
1️⃣ Run the following commands, selecting either Docker or Local scripts:
Docker Pandas
Docker PySpark
Local Pandas
Local PySpark
|
2️⃣ In Kensu, you will see a new ticket. Click on the Tickets item on the Kensu homepage.

3️⃣ The new ticket violates a variability rule.



Updated 03 Mar 2023
Did this page help you?
Yes
No