Help IIS Automation

Automate Start/Stop of IIS Sites & Application Pools

Automate the start/stop of an application pool or site to ensure continued performance of your IIS servers.

Use Case: Automate Start of IIS Site

Consider an online trading company functioning their business using IIS server's sites. Unexpectedly, one particular site, AgentLog gets crashed due to an exception or error.

Problem Statement:

Customers are not able to access the site when it is down. This might lead to losing customers and affect the company's reputation.

Solution:

Under IIS Automation, choose to automate start of the site. Once the automation is added, map the automation with AgentLog. Either use the Threshold Configuration button to associate the automation to all the sites or use the pencil icon under Action listed across AgentLog to associate it only to that particular site.

Add Automation

Supported from Windows agent 18.4.0 version and above. 

  1. Log in to Site24x7 and go to Admin > IT Automation Templates (+). You can also navigate via Server > IT Automation Templates (+).
  2. Select the Type of Automation as IIS.
  3. Provide a Display Name for identification purposes.
    Eg., Automate Start of IIS Site 
  4. Choose the Action to be Automated: Start or Stop a Site | Start or Stop an Application Pool.
    For eg, in the above use case, select Start Site
  5. Select the IIS monitors and the IIS sites on which you want the automation to be executed.
    Eg: For sites, you can select AgentLog for the above use case.
    You can select $FAILED_SITES/$FAILED_POOLS to execute automation for multiple failed sites/pools in one go.
  6. Enter a Time-out period (in seconds) representing the maximum time period the agent has to wait for the command execution to complete. Post that, there will be a time-out error. This will be captured in the email report, if configured as Yes.
    The time-out is set at 15 seconds, by default. You can define a time-out between 1-90 seconds.
  7. You can choose to Send an Email of the Automation Result to the user group(s) configured in the notification profile. By default, it is set to No. This email will contain parameters including the automation name, type of automation, incident reason, destination hosts, and more.
    If you've multiple automations executed in one data collection, a consolidated email will be sent.
  8. Save the changes.
Tip: Once an automation is added, schedule these automations to be executed one after the other.

Notification Profile Settings:

Configure the following settings in the notification profile:

  • Notify Down/Trouble status after executing IT automations associated to the monitor: When set to Yes, if your monitor still faces an outage even after executing the specified action, you'll be immediately alerted about the Down/Trouble status. 
  • Suppress IT Automation of dependent monitors: When the status of the dependent resource is Down, execution of the IT automation is not performed. 

Test Automation

Once you add an automation, go to the IT Automation Summary page (Server> IT Automation Templates) and use the  icon for a test run. Read more.

The test run would be applied to all the hosts selected for command execution. An exception to this would be selection of $LOCALHOST as the only host.

Click on IT Automation Logs to view the list of automations executed by date.

Map Automation

For an automation to be executed, map it with a monitor(s) or an attribute(s). This can be done in two ways:

Related Articles

Was this document helpful?
Thanks for taking the time to share your feedback. We’ll use your feedback to improve our online help resources.

Help IIS Automation