The Operations Manager Product Team recently released an Administration Resource Kit for System Center Operations Manager 2007 R2. One of the tools in the kit is a Maintenance Mode Scheduler….I finally got around to trying this out today…below are my notes.
On the computer that you will do the scheduling from, run "ScheduleMaintenanceMode.exe”. The first time, you will get a pop-up:
Just click on OK to get to the “Connect” UI
Enter the name of the Management Group and RMS, then click Test to verify we can connect:
Click on “Save” to save your configuration (note that the “Connect” button won’t light up until you do this), then click on “Connect”…this should bring up the Jobs/Schedule UI:
If you get any errors running the tool, make sure:
Using the tool is pretty simple….you create Jobs (which objects to put into MM) and Schedules (when to run the Jobs).
On the Jobs tab, click on “Create” to create a new Maintenance Mode job. Here, you will specify which objects will be put into MM. Select the object type, then select the specific objects and click “Add”. You’ll also need to give the job a Name, Category, and Comment. Here, I will put my SQL1 and SQL2 servers into MM. Since I want to take the servers offline, I will need to put all objects into MM, so I select “Windows Computer” as the Object Type and select “Selected objects and all their contained objects”.
Next I’ll need to create a schedule to determine when the servers will go into MM and for how long. Click on the “New” button to create a new schedule (if you’ve already created other schedules, they will be seen in the drop down list.
Give the schedule a name, and select “Run Once” or “Recurrence”. For this job, I’ll just select “Run Once”, we’ll look at the Recurrence options later. NOTE: The scheduler will use the local time on the RMS.
A look in the console verifies that the servers are in Maintenance Mode:
What if I don’t want to put all objects for a Computer into MM, and just want it for a specific object, like a SQL Database? Simple, create a new job, select the object type and the object:
What if I want to put a group into MM? This one isn’t quite as obvious. If you select the group from the drop down list, the object list will show everything in the group and you’ll have to add each individually.
If you have over 20 objects in the group, this is not a good idea, and you’ll want to put the group object into MM. To do this, select the “Group | System.Group” item in the Object Type drop-down, then select the group from the Object list:
Canceling Maintenance Mode
If you need to cancel a job before its end time, just open the scheduler tool, find the job, and click on “Cancel Job”
For scheduling the MM jobs, we have options for “Run Once” (you just give the start and end date/time) and “Recurrence” (daily, weekly, or monthly). For each of these, you supply the start date/time and duration (how long to be in MM)
For the “Daily” recurrence, you just specify number of days between jobs
For the “Weekly” option, you specify how many weeks between jobs and which days of the weeks to run it
For the “Monthly” option, you select which months to run the job in, and which day(s) of the month….you can select day 1-31, “Last day”, or the First/Second/Third/Fourth/Fifth Sun-Sat
The Management Pack for the Maintenance Mode Scheduler contains classes for the Jobs, Schedules, and “Schedule Maintenance Mode Service” (this is just the RMS). The MP contains three Rules:
Collect Scheduled Maintenance Mode Events Target: Job component This Rule collects Event ID 700, which is logged on the RMS when a MM job runs
Execute Maintenance Mode Workflow Target: Job component This rule runs every 60 seconds and manages the jobs and schedules (starts/stops MM)…here is some more info on this workflow (copied/pasted directly from the guide):
You can set an override on this rule to enable logging for troubleshooting purposes….set the “TraceLevel” parameter to 4 for the job that you need to troubleshoot, then review the log file on the RMS…details on this from the guide:
If HealthService is running under local system it is found under “C:\Windows\System32\config\systemprofile\AppData\Local” If Health Service is running under some other account “\Users\<AccountName>\AppData\Local” The name of the files begins with “Enablemmode” and ends with the “ME.ID .log” For example: Enablemmode_2372ef81-5c64-75e3-5fe0-c297884004b2.log
Place back into Maintenance Mode Target: Schedule Maintenance Mode Service This Rule watches for event 623 on the RMS and generates an Alert. Event 623 indicates that an object was taken out of Maintenance Mode before its end time (according to the defined jobs/schedules). When this happens, the object will be placed back into MM (by the Execute Maintenance Mode Workflow Rule). The purpose of this Rule is to generate an alert when this happens.
The Management Pack also contains views to show the Jobs, Schedules and Events. In the Monitoring section of the Console, navigate to the “Schedule Maintenance Mode” folder:
The Jobs view shows all of the Jobs that have been created, and their current status. Note that jobs that are scheduled to run only once are deleted after they have finished.
The Schedules view shows all of the schedules that have been created
The “Job History Events” view shows all of the Event ID 700 events that have been collected….these events tell use when the jobs start and finish
Here are some best practices and known issues (copied directly from Rob Kuehfus’ blog here:
<p>This guide is great, however the tool isn't. Far too many bugs to release to the general public.</p>
<p>Excellent blog post,</p>
<p>I especially liked the point about adding via "Group | System.Group" ... I missed that :o)</p>
<p>I'm wondering if the author tested this. Specifically, the recurrence feature. After the job runs the first time the Start Date is ont updated to the next week's date. It stay at the last start date. And when you look in the schedule in the utility, there is a red exclamation that states "Invalid Data Entry, Date cannot start in the past or before the End Date".</p>
<p>So the recurrence feature will only work the first time.</p>
<p>Hound.com having different options and different sector for job seeker it has portal it means it connected to anther site also. It contain all types of jobs for different job seeker. Hound.comis recruitment site they having so many advertisement for job-seeker.</p>
<p>Hound.com is job portal site, it contain so many job for job seeker it has many option for job seeker.</p>
<p><a href="<a rel="nofollow" target="_new" href="http://www.hound.com/jobvideo/11102/Operations_Manager/Operations"">www.hound.com/.../Operations"</a> rel="dofollow">operations manager jobs</a></p>
<p>I have a couple of problems with the scheduled maintenance mode tool</p>
<p>1: If I put for example the Agent into MM, then half way through I cancel the job (under jobs > cancel job). I receive a message to say the jobs has been canceled by user then another message to say cancel is complete, the job then disappears from the jobs view. However the Agent in question does not come out of MM, if you cancel half way through like this.</p>
<p>is this a bug? is there a way to resolve this please?</p>
<p>2: which object should I put into MM to have the spanner appear next to the Monitored object in the SCOM console. For example if I chose Agent then the whole entity goes into Unmonitored state (i.e. green circle with no tick). Which achieves the result, but lock like a problem to other scom ops staff. </p>
<p>Does this also work with System Center Essentials 2010?</p>
<p>update for scom 2012?</p>
<p>I've tested this on the SCOM 2012 sp1 and it doesnt work, the job does not run and just sits on scheduled</p>