Operations Manager maintenance mode

This article describes frequently asked questions (FAQs) of maintenance mode in Microsoft System Center Operations Manager.

Original product version:   Microsoft System Center 2012 Operations Manager
Original KB number:   2704170

What is Operations Manager maintenance mode?

Maintenance mode is a feature in System Center Operations Manager that suspends the monitoring of an object during regular software or hardware maintenance activities like software update installations, hardware replacements, and so on.

What happens when an object is put into maintenance mode?

When an object is put into maintenance mode, all workflows that are targeted against that object are suspended during that specific interval. This prevents alerts and notifications from being generated by the workflows that are targeted against the object in maintenance mode and helps reduce alerting noise during a planned maintenance activity on the server. In maintenance mode, alerts, notifications, rules, monitors, automatic responses, state changes, and new alerts are suppressed at the agent.

During starting and ending of maintenance mode for a monitored object, the following event is logged on the Operations Manager event log:

Log Name: Operations Manager
Source: HealthService
Date:
Event ID: 1216
Task Category: Health Service
Level: Information
Keywords: Classic
User: N/A
Computer: <ServerName>
Description:
Resuming monitoring for instance "<Database>" with id:"{GUID}" as the instance maintenance mode is OFF. Management group "<ManagementGroupName>".

Important

We don't recommend that you put management servers into maintenance mode. Configuration distribution, the heartbeat feature, and other features for the system might become unreliable. If you put a management server into maintenance mode, alerts, notifications, rules, monitors, automatic responses, state changes, and new alerts that are generated on the management server will be suppressed. The health service on the management server continues to run. Alerts, notifications, rules, monitors, automatic responses, state changes, and new alerts from other agent-managed computers will be processed and displayed as appropriate.

How to put an object into maintenance mode

In Operations Manager, monitoring is based on specific classes. A specific monitored object on an agent can be put into maintenance mode instead of putting the whole computer into maintenance mode.

In the following example, the SQL Server Database Engine that's running on Server A will be updated to the current version. This software update maintenance is expected to take 30 minutes to be completed. During this time, the default instance of the SQL Server Database Engine that's running on this server will not be available.

In this case, we can put the SQL Server Database Engine and its contained object into maintenance mode instead of putting the whole server into maintenance mode. This helps in monitoring the operating system and other applications that are running on the server while SQL Server maintenance is performed.

The default instance of SQL Server that's running on Server A can be put into maintenance mode as follows.

Note

This article assumes that we have a working Operations Manager management group and that the SQL Server management pack is already installed and working.

  1. Open the Operations Manager console. Under the Monitoring pane, expand the Microsoft SQL Server folder, expand Server Roles, and then select the Database Engines state view.
  2. All monitored instances of SQL Server Database Engine in this management group will be listed.
  3. Select and then right-click the default instance (MSSQLSERVER) whose Path value is Server A.
  4. On the Displayed menu, select Maintenance Mode.

If you select Selected objects only, only the database engine is put into maintenance mode.

If you select Selected Objects and all their contained objects, the database engine and all the databases that are hosted by this instance of SQL Server Database Engine are put into maintenance mode.

An easier way to find the contained objects is to open the Diagram view for the specific object and then drill down in the view.

You can select the time interval for the maintenance mode by using the options that are listed under Duration.

How to schedule maintenance mode

Operations Manager doesn't let you schedule maintenance mode for monitored objects from the console.

The following blog from the Operations Manager community has a tool for scheduling maintenance mode for monitored objects:

SCOM 2012 Maintenance Mode Scheduler

Additionally, you can use Orchestrator to put objects into maintenance mode on a schedule, and third-party tools and scripts are also available.

Third-party information disclaimer

The third-party products that this article discusses are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, about the performance or reliability of these products.

How to automate starting and ending maintenance mode by using Operations Manager SDK

For information about how to automate starting and ending maintenance mode of specific objects, see How to Configure Maintenance Mode for Monitoring Objects.

How to view the objects that are in maintenance mode

To view all objects of a specific class that are in maintenance mode by using the Operations console, follow these steps:

  1. Open the Operations Manager console.
  2. Under the Monitoring pane, create a state view that is named Maintenance Mode under the specific unsealed Management Pack folder or under the Monitoring folder at the root of the view tree. Creating the view under the Monitoring folder at the root of the view tree saves the view in the Default Management Pack.
  3. Under the Name option, type Maintenance Mode.
  4. Change the value under Show data related to from Entity to the class of objects that you want to view.
  5. Under Select conditions, select the is in Maintenance Mode check box.
  6. Select OK to create the view.

This view will display all objects of that specific class that are currently in maintenance mode.

Maintenance mode cmdlets

The following cmdlets are available for managing maintenance mode by using the Operations Manager command shell:

  • New-MaintenanceWindow - This cmdlet puts the specified monitoring object into maintenance mode. For more information about this cmdlet, see New-MaintenanceWindow.

  • Set-MaintenanceWindow - This cmdlet sets properties of a maintenance window. It can be used to update end time, reason, and comments on the current maintenance mode for the monitoring object that is specified by the Monitoringobject parameter. For more information about this cmdlet, see Set-MaintenanceWindow.

  • Get-MaintenanceWindow - This cmdlet retrieves maintenance window information for a monitoring object that is currently in maintenance mode. The cmdlet can retrieve maintenance windows for top-level items, items at the current location, or specified monitoring objects. For more information about this cmdlet, see Get-MaintenanceWindow.

How maintenance mode helps reporting

Starting and ending maintenance mode for a specific object for a planned maintenance helps the Operations Manager administrator report accurately on the planned and unplanned downtime of an application or a service. This helps report the availability of a specific service, application, or server accurately during a specific time.

Known issues

The known issues with maintenance mode are as follows:

  • A computer agent unexpectedly generates heartbeat alerts after you put it into maintenance mode.

  • Alerts are generated by an agent while in maintenance mode.

    This issue occurs for one of the following reasons:

    • The object that was put into maintenance mode is not generating the alerts. To verify this, right-click the Active Alerts view on the Operations Manager console, select Personalize view on the menu, and then select the check box next to Class under the Columns to display option.

      You will see a new column Class, under the Active Alerts view. Make sure that the instance of this class for that agent is in maintenance mode.

    • The alerts were generated before monitoring was suspended on the agent. This can be verified by checking whether event ID 1215 is suspended. This event confirms the monitoring of the specific instance.