sissonb
sissonb

Reputation: 3780

Create a Seyren alert that's only active on certain days of the month

Is it possible to create a Seyren alert that is enabled only on certain days of the month? I want the alert to be enabled from the 27th to the 3rd of the next month. Otherwise it should be disabled.

I looked up the from/until parameter in the "Render URL API", but it doesn't seem to have what I need. http://graphite.readthedocs.io/en/latest/render_api.html#from-until

Upvotes: 0

Views: 120

Answers (1)

sissonb
sissonb

Reputation: 3780

I was able to find a Seyren API that lets me enable and disable rules. I went to the Seyren webpage to manage my check. The path looks like this, /seyren/#/checks/MY_CHECK_ID

Then I opened the network tab on the Chrome browser and toggled the "Enabled" checkbox. The network tab recorded a PUT API call this path /seyren/api/checks/.

You can create a curl command using that API for both enabling and disabling the rule. Then create a chron job that makes a curl request to disable, and enable the rule when needed.

Upvotes: 0

Related Questions