Forum Discussion

yoganandamj's avatar
yoganandamj
New Contributor
7 years ago

Decrease the monitor run interval when failure occurs

I have a requirement, i'm running monitor for every 60 mins, if any api/monitor is failing (giving 500 response) means i need to decrease the run interval of the monitor to every 15 mins to get the updates.

 

If there any way to accomplish it in alertSite ??

 

  • You can do this with the REST API and Notifications. It takes a little programming knowledge to accomplish, but it's possible. You need to create and have your own internal application handle this in conjunction with AlertSite tools. Here's an example of how:

     

    1. Have an AlertSite notification fire off to your internal application on error. You can use a simple email, Server POST or whatever your system can handle and work with. Your application will use the first error notification sent to it as the trigger to change the interval.

     

    2. When an error triggers your application, have your application make a call to the REST API to modify the interval for the monitor from 60 minutes to 15 minutes.

     

    3. When the 'Clear' is sent to your application you can even have another trigger send an update back to the REST API to change the interval back to 60 minutes.

     

    Here are the HELP links for REST APIs

    https://support.smartbear.com/alertsite/docs/api/json-api/index.html

    https://support.smartbear.com/alertsite/docs/api/rest-api/index.html

     

    Here's a Help link to the Notification methods available

    https://support.smartbear.com/alertsite/docs/alerts/delivery/index.html