Pages

Thursday 27 October 2011

Custom Monitoring to check Folder exist using VB script for SCOM

Custom Monitoring to check Folder exist using VB script
Steps to create the new Class
1.     Open the Authoring Console
2.     Select  Service Model
3.     Click on Class New - Select Windows Server Role
4.      Provide the ID, Display name and description (Ex: ID: BizTalk.AppServer.Class and Display name: BizTalk Application Server Class and Description


5.     Click on Finish

Steps to create the new Discovery
1.     Select Health Model
2.     Click on Discoveries - Expand the class name  
3.     Enter the Element ID:, Display Name, Description, Target and Category as below
a.     Element ID: BizTalk.AppServer.Discovery
b.    Display Name: BizTalk Application server Discovery
c.     Target:Microsoft.Windows.Computer
d.    Category:Discovery

4.     Configure your schedule screen enter the discovery interval and click on Next

5.     Find the target computer’s name don’t change anything click on Next

6.     On the Registry Probe Configuration click on Add Change the Object Type to Value and enter the Properties as below
a.     Name: ServerRole
b.    Path: SOFTWARE\SCOM\BizTalk\ServerRole
c.     Attribute Type:String

7.     On the Build event Expression  click on Insert and Enter the below Values
a.     Parameter Name: values/ServerRole
b.    Operator:Equals
c.     Value: BiztalkApp

8.     On the Discovery Mapper select the below values
a.     Class ID:Biztalk.AppServer
b.    Key Properties select the Principle name
c.     Click on Finish



Steps to create the monitor
1.     Select Health Model
2.     Click on Monitors - New  -  Scripting  - Two State
3.     Specify the Element ID, Display Name, Description, Target, Parent Monitor and Category as below
a.     Element ID: FolderCheckMonitor
b.    Display Name: FolderCheckMonitor
c.     Target:BizTalk. AppServer
d.    Parent Monitor: System.health.AvailabilityState
e.     Category: AvailabilityHealth


4.     Configure your schedule screen specify the interval

5.     Enter script information page specify the File Name, timeout and script


Dim Fname,FSO,x,Problem,oArgs,oAPI
Dim sfolder, folder, files, sfile, sfilePart1, ScriptExitTime, strMessage,FileModTime,ChkOtherFIle,FinalIDD
On Error Resume Next
Problem=0
Set oAPI = CreateObject("MOM.ScriptAPI")
Set FSO= CreateObject("Scripting.FileSystemObject")
Set oArgs = WScript.Arguments
'Collect data from the arguments
sfolder = oArgs(0)
sfolder = “Location of the Folder"
'Check the folder existence...
If (fso.FolderExists(sFolder)) Then
             Problem = 0
             wscript.quit
Else
                Problem = 1
End If

if Problem = 0 Then
                Set propertyBag = oAPI.CreatePropertyBag ()
                Call propertyBag.AddValue ("Status", "Good")
Else
                Set propertyBag = oAPI.CreatePropertyBag ()
                Call propertyBag.AddValue ("Status", "Error")
End if
Call oAPI.Return(propertyBag)

6.     Unhealthy Expression screen Enter the Parameter Name Operator and Value as below
a.     Parameter Name: Property[@Name='Status']
b.    Operator: Equals
c.     Value: Error

7.     Healthy Expression screen Enter the Parameter Name Operator and Value as below
a.     Parameter Name: Property[@Name='Status']
b.    Operator: Equals
c.     Value: Good

8.     Click on Finish




Wednesday 26 October 2011

My Experience installing SCOM 2012 Beta


My Experience installing SCOM 2012 Beta
Server Details
Server Name
Server Role
Operating System
OMMS1
Management Server and web console Server
Windows 2008 R2 Standard
OMDB
Operations Manager and OperationManagerDW
Windows2008 R2 Enterprise and SQL 2008 R2 Enterprise

Account details
LAB\OMAA
OM Serer Action Account
LAB\OMDAS
OM Config and Data Access service Account
LAB\OMWRITE
OM Reporting Write Account
LAB\OMREAD
OM Reporting Read Account
LAB\SQLSVC
SQL 2008 Service Account
LAB\OMADMIS
OM Administration Security Group
LAB\OMADMIN
OM Administration Account

Installing Management Server Role on OMMS1
·         Logon using OM Administration Account(OMADMIN)
·         Run Setup.exe and click on Install



·         Accept the License Agreement and click Next


·         Select the following and click on Next
o    Management server
o    Management console
o    Web console
                   

·         Accept or change default install path and click on Next
                   

·         On the Configuration screen provide the Management Group name and click on Next


                   

·         On the database configuration screen enter the SQL server name and Instance name


·         On the data warehouse database screen, input the Server name, instance, and if necessary change path locations as on the previous screen. Click Next.
·         On the accounts screen, choose Domain Account for ALL services, and enter in the unique LAB\OMAA, LAB\OMDAS, LAB\OMREAD, and LAB\OMWRITE accounts we created previously. It is a best practice to use separate accounts for distinct roles in OpsMgr, although you can also just use the DOMAIN\OMDAS account for all SQL Database access roles to simplify your installation. Click Next.
         
                  

·         Choose Customer Experience and Error reports depends upon your choice and click on Next.
                    

·         Select Microsoft Update depends upon your choice




·         Review the Installation summary and Click Install.



·         Close when complete.

Installing OM12 Reporting on the SQL Server (OMDB)
·         Logon using OM Administration Account(OMADMIN)
·         Run Setup.exe and click on Install


·         Accept the License Agreement and click Next


·         Select the following, and then click Next:
o    Reporting Server

·         Accept or change the default install path and click Next.

·         Type in the name of a management server, and click Next.



·         Choose the correct SQL instance and click Next.

·         Enter in the LAB\OMREAD account when prompted. It is a best practice to use separate accounts for distinct roles in OpsMgr. Click Next.

·         Click Install.

Monday 24 October 2011

SCOM Gateway Server Issue

Friends

Today I have observed the gateways server pointing to the old RMS server which is decommissioned.

Here is the solution:

1. Check the registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft Operations Manager\3.0\Server Management Groups\<MGName>\Parent Health Services\0
2. Changed the AuthenticationName and NetworkNameto the new RMS Server.
3. Stop the System Management Service
3. Rename the Health Service State folder
4. Start the System Management Service

This solution also useful incase if you are agents pointing to the old RMS server.