Jump to content


Sign in to follow this  
K11PER

Start/Stop Maintenance Mode from a Collection, help required

Recommended Posts

Hello,

 

I am very new to all system center services, so bare with me... I also googled this task, but the two guides I've found don't quite configure the task the way I need it to run. If there is a better method please feel free to share.

 

 

I have a collection of terminal servers that get restarted weekly early Sunday morning, so I created the group in SCCM (for the purpose of testing I just have one in it right now). I need to put this collection into Maintenance mode. I have configured the following run book, but I'm struggling with trying to figure out the correct syntax for the monitor field in the start maintenance mode tool.

 

 

 

Picture 1 is the runbook, and in the start maintenance mode properties monitor field I have this,

 

{Pure Output from "Get FQDN"} : Microsoft.Windows.Computer

 

 

I was trying to use the Get collection as well instead of the get FQDN but it was not working for me.

 

Appreciate any help,

 

Thanks

post-25619-0-13084500-1408389004_thumb.png

Share this post


Link to post
Share on other sites


Hi, welcome to the site/forum.

 

I first have a question for you. Are you trying to place the system(s) into Maintenance Mode so that they do not generate Alerts when they are rebooted?

 

If that is your ultimate goal, and thus you are using SCCM and SCOM in your environment, you don't have to use a Runbook necessarily. What you could do is create a script that will restart the system, and create a Package Deployment in SCCM to deploy the script (and run it) on the systems you want restarted. I mention this method because in SCCM, there will be 2 checkboxes, one to suppress Alerts and another to generate Alerts on failed actions.

 

This will allow you to reboot the Collection of servers, without generating a false-positive Alert in SCOM.

 

Is that your primary goal?

 

I get why you plan to use a Runbook though, since you mentioned it occurs every week. I will have to look into the Runbook side of things, to help you figure out the answer to that part.

 

To get you started, take a look at the following links, as they might point you in the right direction.

 

http://systemcentertipps.wordpress.com/2013/01/31/orchestrator-2012-sp1-scom-2012-sp1-integration-pack-start-maintenance-mode-activity-changed/

http://www.systemcentercentral.com/using-orchestrator-2012-to-schedule-mmode-for-opsmgr-groups/

http://social.technet.microsoft.com/Forums/en-US/04b7b700-cd10-4ddc-8d59-65c12b060416/maintenance-mode-using-orchestrator?forum=scoscip

Share this post


Link to post
Share on other sites

Thank you for getting back to me in a timely matter. Yes you are correct that is the goal.The script is a great idea! But I think it defeats the purpose of what I am being asked. I was asked by my manager to try and figure out Orchestrator since we have it installed and configured but not implemented for any scenario right now. I think it is more of a challenge to try and figure it out, and become the go-to guy for this tool.

 

He created a group in SCOM for me with a few servers added to it, so I think I will try the second method since it explains in detail all the steps involved. I thought it would be easier using the SCCM approach with a collection, but without the syntax for the monitor field that works, its making it quite the challenge to get it to work.

 

Thanks

.

Share this post


Link to post
Share on other sites

We figured it out!

 

He was able to find this from the "..." monitor field

Terminal Servers : UINameSpace21db5fa67540458595317914f8266a4f.Group

There is no need for a query or anything, this directly linked the group and we tested it. Thanks for the help.

 

 

EDIT: Also, on our SCORCH server, we did not have the Ops Mgr or Config Mgr consoles installed, which caused errors when then runbooks actually go to run. I guess they are needed when the management packs are added in.

Share this post


Link to post
Share on other sites

That's great to hear!

 

Just to clarify your edited statement for everyone else...

 

If you are using SCORCH, and in particular you have a Runbook that uses an Activity from a System Center Integration Pack, then yes, you need that product's console installed on the Runbook server. For example, performing a backup/restore, you'd need the DPM console; monitoring would be SCOM, etc. The same thing applies to other non-Microsoft products that have Integration Packs (i.e. HP iLO, VMware, etc.).

Share this post


Link to post
Share on other sites

Just when I thought I was good! I was on vacation for the past 10 days, and this runbook did not run on either Sunday from 12am-4am as intended. I did some more testing today, and playing with the schedules trying to figure out what I am missing. I tried adding a Monitor Date/Time linked to a monitor sched. and then point it to the start maintenance mode. But no luck. The runbook runs fine only when I click on Run at the top. The whole automation part seems to be failing with no logs or events indicating that something is configured wrong.

 

First setup - right click on runbook and set schedule to the one I configured with only the start maintenance mode icon in the runbook (works manually). Did not run for past 2 weekends.

 

Second setup - created monitor time/date monitor set to every 15 minutes (modified schedule to be the following hour...twice now) pointed to a check schedule (that had the one I created selected) and then using the Conform to in the included Link (as per online guide below) between the check schedule and start maintenance mode icons. All with no luck and verifying the time was set correct to run today at 3 and 4 pm.

 

(first link explains the process, before showing how to use task scheduler which in our case due to multiple servers we do not want to do...plus isnt that the point of scorch?)

 

http://blogs.technet.com/b/orchestrator/archive/2012/05/18/using-windows-task-scheduler-to-invoke-scheduled-runbooks.aspx

http://social.technet.microsoft.com/Forums/en-US/d69e500d-3817-4446-a335-323972458c9f/how-to-schedule-a-runbook-with-orchestrator-to-run-at-specfic-time?forum=scogeneral

 

 

What am I missing here?

Share this post


Link to post
Share on other sites

One key thing in your statement: "The runbook runs fine only when I click on Run at the top."

 

When you run a Runbook from the Runbook Designer, it does NOT run under the SCORCH credentials configured for the Integration Pack, etc. Instead, it is running under the USER'S credentials that the Runbook Designer is launched under (aka YOUR credentials).

 

Two things to check, aside from ensuring that the product's Console is installed on the Runbook Server (I didn't see you mention/confirm this was done), is:

  1. Launch the Product's Console (in this case SCOM) and connect it to the SCOM Management Server at least once. If you just install the console and never launch/connect it, it might cause some issues.
  2. Double-check your Integration Pack's configuration, especially around security. Ensure that the account you entered when configuring the Integration Pack has the proper rights in the product you are trying to automate with (i.e. in this case SCOM).

Note the following from the SCOM Integration Pack documentation (found here http://technet.microsoft.com/en-us/library/hh830690.aspx):

  • Install the Operations Manager console on each computer where an Orchestrator Runbook server or Runbook Designer is installed, if that server needs to interact with Operations Manager.
  • In the User name and Password boxes, type the credentials that the Orchestrator server will use to connect to the Operations Manager server.

Think of it in the similar context of granting a user access into the SCOM console. Depending on the access/role given, will control what they can see/do. Since with SCORCH you want to be able to automate anything in relation to SCOM, I'd grant it Administrator rights in SCOM itself.

Share this post


Link to post
Share on other sites

I log on and manage scorch with the domain admin account that we configured for it. So the credentials being used to run it are the same.

 

Ah, I was missing SCOM consoles on both our Runbook servers, I only had it installed on the Designer server but did test its connection previously and also ensured the manage pack was configure and tested the connection. Will report back after further testing,

 

Thank you!

Share this post


Link to post
Share on other sites

Something is not right with our orchestrator. I have had an open ticket with MS tier 3 support for a few days now. We tried to simply set up a monitor date/time, check schedule and run a task, but it looks like our Runbooks are not running. No matter which way they tried to configure a schedule, and either setup a single interval, or one to run every 15minutes and check the time, it is not running automatically and detecting the time of day. Not sure what would be causing this? (Even they said they had to get back to me)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...