<

Go Premium for a chance to win a PS4. Enter to Win

x

Orchestrator 2012 and my integrations with SCOM, SCVMM, VMWARE and SCSM

Published on
10,620 Points
4,020 Views
1 Endorsement
Last Modified:
Wow it feels like forever since I have been able to sit down and write an article, I have been away and new exciting projects keeping me busy, but here I am writing another hopefully informative article.

I have written about Orchestrator 2012 integration and my experiences in a previous post so I will try not bore you with the same details on how awesome Orchestrator is :) the product does this all on its own :)

I have been designing and implementing a lot of integration with SCOM, SCSM, SCCM, SCVMM and VMWare, often with a lot of the above all in one Runbook and it has been an informative experience for me.

Now enough of the talking, let's get to the juicy bits :)

SCOM


Now there are many ways you can integrate with SCOM, from monitoring alerts, to creating alerts, monitoring state, installing agents, checking agent health and reacting/repairing unhealthy agents.

I use a few of these to aid the Server Guys and BackOffice team keep their alerting and monitoring healthy and I will give you a few examples.

This first Runbook simply gets the health of the SCOM environment on a daily basis and creates a HTML web page, this HTML report is then mailed out which the guys can use to have a quick accurate view of what's going on and the react accordingly.

I created the below simple Runbook to run daily

SCOM Health
The below would be the output which is mailed out as an attachment

HTML file sent outThe original script and idea was taken from the following post :
SCOM Daily Reports with PowerShell

I just edited my script to include my database states, database alerts, database maintenance tasks and also filtered the alerts to only display error alerts. There are also a few other additions.

As you will notice I have used a Monitoring activity, it isn't really recommended and would be best to use a scheduled task which would fire the Runbook from outside Orchestrator which I often do and the following example will show you how I have accomplished this external execution from SCOM itself.


In the next example I have a windows service that is being monitored and instead of just having the alert or using the "Diagnostic and Recovery" to try remediate the service stopped error for me I use the "Diagnostic and Recovery" section in the monitor to trigger a specific Runbook using "SCOJobRunner"

SCOM Monitor with SCOJobRunner TriggerThis monitor once an alert is raised will trigger the command and fire off my Runbook below.

SCOM Triggered RunbookNow I could go on and on about all the different scenarios but I think the above would give you a view into what can be done and what is being done, but that's really it.


SCVMM, VMWare and SCSM


 
I was recently tasked with adding a VM Request to our Service Manager Portal so that users as well as the server team could request and create new Hyper-V and VMWare servers from the portal with all the logging of changes, approvals, HPSM incidents logged and mails going out.
 
At first glance it looked like a nightmare, firstly we are running VMWare 5.5 and currently as far as I still know there are no integration packs for 5.5. So I opted for the PowerShell route and used the add-on install called PowerCLI which allowed me to fire off PowerShell scripts to create my VM's in VMWare.
 
I took the idea and edited the original script from the following post:
Automated VM Provisioning

My Runbook details for VMWare and Hyper-V requests are the same with the exception of where they are created and what is used to create them but the base is all the same.
 
Main Runbook, fired off after the request in the portal is submitted

Create VMWare VM Main RunbookThis Runbook then fries off the next Runbook which will get the "Service Request" format the date and time of my request because of SCSM saves your time in the UTC format and for Orchestrator to create the correct formats for our local time I had to do some editing and try add a few tricks so that my requestors could select the "Scheduled Start" and "Scheduled End" times so that even if approved the next Runbook which would be the one creating the VM would only be fired off if the Date and time is equal to or greater than the "Scheduled Start Date/Time"

I know, I know, seems like a whole lot of work, but trust me, it was worth it in the end and I almost fell off my chair with excitement when it all went through :)
 
Here are the rest of the Runbooks

Create CR From SRThis is the Runbook that creates the Change Request from the Service Request and then sends the approvers a notification on the required approval.

Monitor CR ApprovalThis Runbook will monitor the approval status get a few other, like comparing the scheduled start date and time as well as if approved, fire off the last Runbook which would be the one creating the actual VM. This Runbook also sends an .RDP attachment to the requestor via mail allowing them to just run the attachment and connecting to their newly created server.

Create VM From TemplateThis last Runbook actually creates the Computer account, Creates the VM, Starts the VM and as you will notice I have incorporated creating alerts in SCOM, for success (Information) and failure (Warning) so that it is also logged in SCOM.


I am currently working on also integrating a Change process into HPSM (HP Service Manager) as this is currently our main helpdesk tool.
 
I got the idea of the alerting and the creating of the VM flow from the following post:
Adding Alerts to Operations Manager for a VM based on a Template in VMM


That’s it everyone, simple as that.
 
I am sure there are a lot of examples out there and I am sure that a lot of you have possibly done many more but these are the things I have found and experienced based on the needs from the business. There are things I have done and worked out that I haven't found anywhere on the net yet.
 
I hope this article has been informative and if there are any questions, I mean any, don’t be shy :)
 
Thank you
1
Comment
2 Comments
 

Expert Comment

by:canwaytech
Hi Leon,

Can you provide the Runbook examples for study?
Thank you.

Thomas Wen
0
 
LVL 8

Author Comment

by:Leon Taljaard
Hi Thomas

Send me your email address and i will mail you the exports, the VMware one we are not using anymore as our guys are creating the VM's manually because of company process requirement, but it should get you started.

Hope it helps, let me know if you need help.

Thanks

Leon
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Join & Write a Comment

Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

Keep in touch with Experts Exchange

Tech news and trends delivered to your inbox every month