IT Automation- Restart your web server automatically with Invoke URL option

 

Site24x7 allows you to automate a website restart, initiate an application back up or define a host of other actions via an URL call back action.

That is, you can ask Site24x7 to do the next steps when your website or application is detected down. And you as a website owner or IT admin, can avoid that dreaded alert call or message at mid-night that gets you scrambling towards your computer.

What is Invoke URL feature?

Invoke URL is an 'user defined HTTP call back action' popularly known as a web hook. Invoke URL option lets you specify an URL that will be executed in case of an event, as configured by you.

The most common action you can define in case of a downtime is to restart your servers or to take back up of your server logs. So that the next time Site24x7 detects a downtime, the defined action will be executed first. You can even choose to receive alerts only if your Monitor status is 'Down' or 'Trouble' after executing the action. The URL invocation is normally done on a stand-by-server.

There are three players in this work flow.

  1. Site24x7 Monitoring Server.
  2. Your critical web server.
  3. A stand-by server running a web server with some scripting language, say PHP.

invoke-url-flow-diagram

Typical tasks can be done via Invoke URL are

  • Restart the server when it is down.
  • Automatically add an extra virtual machine instance or an EC2 instance to your application server group to improve performance.

How do I set this up?

Actions can be configured under Advanced Configuration > Actions > Invoke URL. Choose the Action Type as Invoke URL and specify the URL which executes your desired action.

There are a host of options available when you define this action via URL. As the below screen shot explains, you can specify the request methods (POST or GET), specify incident parameters or ask to send the request in JSON format. We even support a SSL enabled URL. You just need to provide the login credentials against the option Website requires Basic/NTLM authentication.

blog-execute-action

The Advantage:

You won't lose sleep over a minor outage and your customers won't get affected during that momentary app server outage that lasted a short time.

Comments (0)