Terminating Maintenance mode from Agent
Hi All, We have a requirement that, Maintenance mode has to be initiated and terminated from the agent computer. For Initiating the Maintenance mode I have created a rule to read the event log and created appropriate notification subscription to execute the maintenance mode commands and it works well. The problem is not sure how to terminate the maintenance mode from the Agent computer. Any thoughts on terminating the maintenance window form the agent computer would be much appreciated. Thanks, Sarav Thanks, Sarav
April 27th, 2011 7:09pm

Hi Sarav, so if I understand you right you are creating an eventlog entry on the box you want to place into maintenance mode. Two times. One to start MM and another one to stop MM. And your problem is that the first step does work and the second does not, right? Would be because of that MM that it doesnt do much while being in MM. SO if you want to use this you would either use a specific time to go into MM and let it clear by itself... or you could specify the agent server name that you want to go in or out of MM in the event and pick that up with your MM script and use it. Only you would insert those events into a central machine probably and through the name specification in the event you can have the MM script point to the correct agent. Or perhaps you could use one of the other MM solutions out there. I could point you to a few of them: Remote maintenance mode mp http://www.systemcentercentral.com/tabid/145/indexId/11577/Default.aspx by running a script on the agent, makes event log entry that gets picked up. MCS maintenance mode mp http://www.systemcentercentral.com/tabid/145/indexId/11546/Default.aspx MM script http://blogs.technet.com/b/mgoedtel/archive/2009/10/29/updated-powershell-script-maintenance-mode.aspx Remote MM gui tool http://www.scom2k7.com/scom-remote-maintenance-mode-scheduler-20/ Hope it helpsBob Cornelissen - BICTT (My BICTT Blog)
Free Windows Admin Tool Kit Click here and download it now
April 28th, 2011 2:31am

Hi Sarav! Your problem is that the agent puts itself into maintenance mode when you put the server into the same. IF you can live with that the Agent (not the Health Service Watcher for the agent) is running (when you have maintenance) then try the following. Target your rules (one for enabling MM, one for disabling MM) at the agent (Microsoft.SystemCenter.Agent). Modify your back-end script to: Put the server into maintenance mode Remove the agent (not the Health Service Watcher) from maintenance mode (putting the server into MM also puts the agent into MM). Then, naturally, you will have to have a new subscription, and script, that reacts to the disable MM Alert. /Roger ps I first thought of creating a special watcher ClassType to target the event rules at. Turned out though, that when the Agent is in MM, Alerts (even from rules targeted at objects NOT in MM) do not get forwarded. This posting is provided "AS IS" with no warranties, and confers no rights.
April 28th, 2011 5:08am

Yes, I have tried in another way that the agent computer which is in maintenance mode will execute the EventCreate command, EventCreate /s <management server name> /ID 100 /d "agent computer name". I could see the event generated in the management server event log. but SCOM server is not reading the event and acting on it. Fyi... I also tried this with another agent which is not in maintenance mode. Eventhough the Event get generated in the event log of the management server scom is not reading the log.(Note: The target group for the rule is set to computer group for the rule to read the events) Any help on this is much appreciated. Thanks, SaravanaThanks, Sarav
Free Windows Admin Tool Kit Click here and download it now
April 28th, 2011 8:58am

MM requires SDK interacdtion, and SDK lives on the RMS. With no agent workflows running, the approach you took (rube-goldberg the event doorbell) won't work in reverse because the agent won't see any more events. DCOM or remote powershell are probably better all around solutions. Microsoft Corporation
April 28th, 2011 11:49am

Hi Sarav, Regarding how to terminating maintenance mode, I would like to share the following with you for your reference: Stopping maintenance mode http://blogs.msdn.com/b/boris_yanushpolsky/archive/2007/08/30/stoping-maintenance-mode.aspx SCOM Maintenance Mode Tool http://scommaintenancemode.codeplex.com/ Hope this helps. Thanks. Nicholas Li - MSFT Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
April 29th, 2011 4:02am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics