Microsoft Operations Manager & Scripting Theo Kostelijk Consultant Microsoft Services
Agenda Operations Management WMI MOM Architectural overview Scripting en Monitoring MOM & Scripting
Wat is Operations Management? Observeren Verzamelen Waarschuwen Voorspellen Rapporteren
Windows Management Instrumentation Web Based Enterprise Management Opvragen en Wijzigen van Informatie Computers Programma’s Netwerken Componenten
WMI Architecture Any application that understands automation i.e. C/C++, VB, VBScript, Jscript, VBA, Perl Consumers Application Application CIM COM CIM.REP Windows Management Service %SystemRoot%\System32\WBEM\WinMgmt.exe MOF Providers .NET MSI SNMP Win32 API WDM Active Directory PerfMon NT event Exchange SQL Server Registry
Microsoft Operations Manager Architectuur MOM Central Server Database Data Access Consolidator/ Agent Manager Agents
Architectural Overview Web Console Database MMC Interface Data Sources SNMP Traps Performance Counters Application Logs . Event Logs Agent Manager Consolidator DAS Reporting Agents Microsoft Operations Manager is opgebouwd uit: MTS/COM+ DCOM MMC IIS/Internet Explorer SQL Server 2000/msde
Microsoft Operations Manager
Agents
Processing Rulegroups
Providers
Scripts
Scripting en Monitoring Windows Scripting Host Tonen van boodschap op het scherm Verbinden met netwerk drives Verbinden met printers Ophalen en wijzigen van omgevings-variabelen Ophalen en wijzigen van registry keys Functies CreateObject en GetObject
Functies CreateObject en GetObject WMI ADSI OleDB CDO …
Scripting en Monitoring Set objService = GetObject("winmgmts:").ExecQuery("select * from Win32_Service") For Each Service in objService WScript.Echo Service.State & " : " & Service.Name & " : " & Service.Caption Next
Scripting en Management Set objService = GetObject("winmgmts:").ExecQuery("select * from Win32_Service where_ Name='Messenger'") For Each Service in objService RetVal = Service.StartService() If RetVal = 0 Then WScript.Echo "Service Started" If RetVal = 10 Then WScript.Echo "Service already running" Next
Windows Scripting Host
MOM Script Omgeving Product Objecten Script Context Agent Objext Event Object
Product Objecten
Helper Objecten
Gebruik van Scripts in MOM Timed Gebruik alleen als laatste mogelijkheid Response Automatiseert alert afhandeling Verandert alert status
MOM Script
Referentie http://msdn.microsoft.com/library/en-us/netdir/adsi/listing_users.asp?frame=true