How can I programmatically see notifications in Turbot?

Administrators interested in scripted management and/or setting notifications when Turbot controls go into "Alarm" or "Error" state, can achieve their goal via Turbot's API.

Sending a GET request to the URI:

<turbot url>/api/v3/resources/urn:turbot/controls?filter=state,alarm

returns a JSON response that contains a list of controls in the "Alarm" or "Error" state.

It is possible to search for a specific account or resource by adding the URN into the URI.
For example, if one wanted to find out the controls in alarm a specific Turbot account (for the sake of simplicity, lets assume the hierarchy is Turbot > testCluster > testAccount), the URI would change to:

<turbot url>/api/v3/resources/urn:turbot:testCluster:testAccount/controls?filter=state,alarm

The returned data structure will look like the screenshot below. 


Using this information, a scripting language such as Python can be used to generate emails when new notifications are detected. Some customers have even developed scripted check and apply functionality to analyze only persistent errors. Turbot has no official position on this approach as it eliminates manual analysis that may be beneficial but allows for significant time saving.

Please reach out to if there are any further questions or concerns.

Was this article helpful?
0 out of 0 found this helpful