<ManagementPack ContentReadable="true" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <Manifest>
    <Identity>
      <ID>MPAuthor.ProcessDataSource.VBScript</ID>
      <Version>1.0.0.1</Version>
    </Identity>
    <Name>MPAuthor.ProcessDataSource.VBScript</Name>
    <References>
      <Reference Alias="SCDW">
        <ID>Microsoft.SystemCenter.DataWarehouse.Library</ID>
        <Version>6.0.6278.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="SC">
        <ID>Microsoft.SystemCenter.Library</ID>
        <Version>6.0.6278.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="Windows">
        <ID>Microsoft.Windows.Library</ID>
        <Version>6.0.6278.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="Health">
        <ID>System.Health.Library</ID>
        <Version>6.0.6278.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="System">
        <ID>System.Library</ID>
        <Version>6.0.6278.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
    </References>
  </Manifest>
  <TypeDefinitions>
    <EntityTypes>
      <ClassTypes>
        <ClassType ID="MPAuthor.ProcessDataSource.VBScript.Target" Accessibility="Internal" Abstract="false" Base="Windows!Microsoft.Windows.ComputerRole" Hosted="true" Singleton="false" />
      </ClassTypes>
    </EntityTypes>
    <ModuleTypes>
      <DataSourceModuleType ID="MPAuthor.ProcessDataSource.VBScript.DataSource.ParsedEvent" Accessibility="Internal" Batching="false">
        <Configuration>
          <xsd:element minOccurs="1" name="EventNumber" type="xsd:string" />
          <xsd:element minOccurs="1" name="EventSource" type="xsd:string" />
        </Configuration>
        <ModuleImplementation Isolation="Any">
          <Composite>
            <MemberModules>
              <DataSource ID="Event" TypeID="Windows!Microsoft.Windows.EventProvider">
                <ComputerName />
                <LogName>Application</LogName>
                <Expression>
                  <And>
                    <Expression>
                      <SimpleExpression>
                        <ValueExpression>
                          <XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
                        </ValueExpression>
                        <Operator>Equal</Operator>
                        <ValueExpression>
                          <Value Type="UnsignedInteger">$Config/EventNumber$</Value>
                        </ValueExpression>
                      </SimpleExpression>
                    </Expression>
                    <Expression>
                      <SimpleExpression>
                        <ValueExpression>
                          <XPathQuery Type="String">PublisherName</XPathQuery>
                        </ValueExpression>
                        <Operator>Equal</Operator>
                        <ValueExpression>
                          <Value Type="String">$Config/EventSource$</Value>
                        </ValueExpression>
                      </SimpleExpression>
                    </Expression>
                  </And>
                </Expression>
              </DataSource>
              <ProbeAction ID="ParseScript" TypeID="Windows!Microsoft.Windows.ScriptPropertyBagProbe">
                <ScriptName>ParseEventDescription.vbs</ScriptName>
                <Arguments>"$Data/EventDescription$"</Arguments>
                <ScriptBody><![CDATA[
sText = replace(WScript.Arguments(0),"\n","")

Set xmlDoc = CreateObject("Microsoft.XMLDOM")
xmlDoc.LoadXML(sText)

Set oAPI = CreateObject("MOM.ScriptAPI")
oAPI.LogScriptEvent "ParseEventDescription.vbs",801,4,"|" & sText & "|"

Set oBag = oAPI.CreatePropertyBag()
set xmlNode = xmlDoc.selectSingleNode("//Event/Date")
oBag.AddValue "Date",xmlNode.Text
set xmlNode = xmlDoc.selectSingleNode("//Event/Time")
oBag.AddValue "Time",xmlNode.Text
set xmlNode = xmlDoc.selectSingleNode("//Event/ErrorNumber")
oBag.AddValue "ErrorNumber",xmlNode.Text
set xmlNode = xmlDoc.selectSingleNode("//Event/ErrorDescription")
oBag.AddValue "ErrorDescription",xmlNode.Text

oAPI.Return(oBag)
  ]]></ScriptBody>
                <TimeoutSeconds>30</TimeoutSeconds>
              </ProbeAction>
            </MemberModules>
            <Composition>
              <Node ID="ParseScript">
                <Node ID="Event" />
              </Node>
            </Composition>
          </Composite>
        </ModuleImplementation>
        <OutputType>System!System.PropertyBagData</OutputType>
      </DataSourceModuleType>
      <DataSourceModuleType ID="MPAuthor.ProcessDataSource.VBScript.DataSource.ParseEvent.Filtered" Accessibility="Internal" Batching="false">
        <Configuration>
          <xsd:element minOccurs="1" name="EventNumber" type="xsd:string" />
          <xsd:element minOccurs="1" name="EventSource" type="xsd:string" />
          <xsd:element minOccurs="1" name="ErrorNumber" type="xsd:string" />
        </Configuration>
        <ModuleImplementation Isolation="Any">
          <Composite>
            <MemberModules>
              <DataSource ID="Script" TypeID="MPAuthor.ProcessDataSource.VBScript.DataSource.ParsedEvent">
                <EventNumber>$Config/EventNumber$</EventNumber>
                <EventSource>$Config/EventSource$</EventSource>
              </DataSource>
              <ConditionDetection ID="FilterOnEventNumber" TypeID="System!System.ExpressionFilter">
                <Expression>
                  <SimpleExpression>
                    <ValueExpression>
                      <XPathQuery Type="String">Property[@Name='ErrorNumber']</XPathQuery>
                    </ValueExpression>
                    <Operator>Equal</Operator>
                    <ValueExpression>
                      <Value Type="String">$Config/ErrorNumber$</Value>
                    </ValueExpression>
                  </SimpleExpression>
                </Expression>
              </ConditionDetection>
            </MemberModules>
            <Composition>
              <Node ID="FilterOnEventNumber">
                <Node ID="Script" />
              </Node>
            </Composition>
          </Composite>
        </ModuleImplementation>
        <OutputType>System!System.BaseData</OutputType>
      </DataSourceModuleType>
    </ModuleTypes>
  </TypeDefinitions>
  <Monitoring>
    <Discoveries>
      <Discovery ID="MPAuthor.ProcessDataSource.VBScript.Discovery.Target" Enabled="true" Target="Windows!Microsoft.Windows.OperatingSystem" ConfirmDelivery="false" Remotable="true" Priority="Normal">
        <Category>Discovery</Category>
        <DiscoveryTypes>
          <DiscoveryClass TypeID="MPAuthor.ProcessDataSource.VBScript.Target" />
        </DiscoveryTypes>
        <DataSource ID="DS" TypeID="Windows!Microsoft.Windows.FilteredRegistryDiscoveryProvider">
          <ComputerName>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/NetworkName$</ComputerName>
          <RegistryAttributeDefinitions>
            <RegistryAttributeDefinition>
              <AttributeName>AppExists</AttributeName>
              <Path>SOFTWARE\MPAuthor\ProcessDataSource</Path>
              <PathType>0</PathType>
              <AttributeType>0</AttributeType>
            </RegistryAttributeDefinition>
          </RegistryAttributeDefinitions>
          <Frequency>3600</Frequency>
          <ClassId>$MPElement[Name="MPAuthor.ProcessDataSource.VBScript.Target"]$</ClassId>
          <InstanceSettings>
            <Settings>
              <Setting>
                <Name>$MPElement[Name="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Name>
                <Value>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>
              </Setting>
              <Setting>
                <Name>$MPElement[Name="System!System.Entity"]/DisplayName$</Name>
                <Value>$Target/Host/Property[Type="Windows!Microsoft.Windows.Computer"]/PrincipalName$</Value>
              </Setting>
            </Settings>
          </InstanceSettings>
          <Expression>
            <SimpleExpression>
              <ValueExpression>
                <XPathQuery Type="String">Values/AppExists</XPathQuery>
              </ValueExpression>
              <Operator>Equal</Operator>
              <ValueExpression>
                <Value Type="String">True</Value>
              </ValueExpression>
            </SimpleExpression>
          </Expression>
        </DataSource>
      </Discovery>
    </Discoveries>
    <Rules>
      <Rule ID="MPAuthor.ProcessDataSource.VBScript.Rule.Error1" Enabled="true" Target="MPAuthor.ProcessDataSource.VBScript.Target" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
        <Category>Alert</Category>
        <DataSources>
          <DataSource ID="DS" TypeID="MPAuthor.ProcessDataSource.VBScript.DataSource.ParseEvent.Filtered">
            <EventNumber>101</EventNumber>
            <EventSource>EventCreate</EventSource>
            <ErrorNumber>1</ErrorNumber>
          </DataSource>
        </DataSources>
        <WriteActions>
          <WriteAction ID="Alert" TypeID="Health!System.Health.GenerateAlert">
            <Priority>1</Priority>
            <Severity>2</Severity>
            <AlertMessageId>$MPElement[Name="AlertMessageID30ec769b4e594258b52596e4c08aecca"]$</AlertMessageId>
            <AlertParameters>
              <AlertParameter1>$Data/Property[@Name='Date']$</AlertParameter1>
              <AlertParameter2>$Data/Property[@Name='Time']$</AlertParameter2>
              <AlertParameter3>$Data/Property[@Name='ErrorDescription']$</AlertParameter3>
            </AlertParameters>
          </WriteAction>
        </WriteActions>
      </Rule>
      <Rule ID="MPAuthor.ProcessDataSource.VBScript.Rule.Error2" Enabled="true" Target="MPAuthor.ProcessDataSource.VBScript.Target" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
        <Category>Alert</Category>
        <DataSources>
          <DataSource ID="DS" TypeID="MPAuthor.ProcessDataSource.VBScript.DataSource.ParseEvent.Filtered">
            <EventNumber>101</EventNumber>
            <EventSource>EventCreate</EventSource>
            <ErrorNumber>2</ErrorNumber>
          </DataSource>
        </DataSources>
        <WriteActions>
          <WriteAction ID="Alert" TypeID="Health!System.Health.GenerateAlert">
            <Priority>1</Priority>
            <Severity>2</Severity>
            <AlertMessageId>$MPElement[Name="AlertMessageIDa7ea8960e5ac429d9e684275bfa1471e"]$</AlertMessageId>
            <AlertParameters>
              <AlertParameter1>$Data/Property[@Name='Date']$</AlertParameter1>
              <AlertParameter2>$Data/Property[@Name='Time']$</AlertParameter2>
              <AlertParameter3>$Data/Property[@Name='ErrorDescription']$</AlertParameter3>
            </AlertParameters>
          </WriteAction>
        </WriteActions>
      </Rule>
    </Rules>
  </Monitoring>
  <Presentation>
    <Views>
      <View ID="MPAuthor.ProcessDataSource.VBScript.View.Alerts" Accessibility="Internal" Enabled="true" Target="MPAuthor.ProcessDataSource.VBScript.Target" TypeID="SC!Microsoft.SystemCenter.AlertViewType" Visible="true">
        <Category>Operations</Category>
        <Criteria>
          <ResolutionState>
            <StateRange Operator="NotEquals">255</StateRange>
          </ResolutionState>
        </Criteria>
        <Presentation>
          <ColumnInfo Index="0" SortIndex="0" Width="22" Grouped="true" Sorted="false" IsSortable="true" Visible="true" SortOrder="Ascending">
            <Name>Severity</Name>
            <Id>Severity</Id>
          </ColumnInfo>
          <ColumnInfo Index="1" SortIndex="-1" Width="54" Grouped="false" Sorted="false" IsSortable="false" Visible="true" SortOrder="Ascending">
            <Name>Icon</Name>
            <Id>Icon</Id>
          </ColumnInfo>
          <ColumnInfo Index="2" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Path</Name>
            <Id>MonitoringObjectPath</Id>
          </ColumnInfo>
          <ColumnInfo Index="3" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="true" SortOrder="Ascending">
            <Name>Source</Name>
            <Id>MonitoringObjectDisplayName</Id>
          </ColumnInfo>
          <ColumnInfo Index="4" SortIndex="-1" Width="22" Grouped="false" Sorted="false" IsSortable="true" Visible="true" SortOrder="Ascending">
            <Name>Maintenance Mode</Name>
            <Id>MonitoringObjectInMaintenanceMode</Id>
          </ColumnInfo>
          <ColumnInfo Index="5" SortIndex="-1" Width="250" Grouped="false" Sorted="false" IsSortable="true" Visible="true" SortOrder="Ascending">
            <Name>Name</Name>
            <Id>Name</Id>
          </ColumnInfo>
          <ColumnInfo Index="6" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="true" SortOrder="Ascending">
            <Name>Resolution State</Name>
            <Id>ResolutionState</Id>
          </ColumnInfo>
          <ColumnInfo Index="7" SortIndex="-1" Width="150" Grouped="false" Sorted="false" IsSortable="true" Visible="true" SortOrder="Ascending">
            <Name>Created</Name>
            <Id>TimeRaised</Id>
          </ColumnInfo>
          <ColumnInfo Index="8" SortIndex="1" Width="100" Grouped="false" Sorted="true" IsSortable="true" Visible="true" SortOrder="Ascending">
            <Name>Age</Name>
            <Id>Age</Id>
          </ColumnInfo>
          <ColumnInfo Index="9" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Type</Name>
            <Id>Category</Id>
          </ColumnInfo>
          <ColumnInfo Index="10" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Owner</Name>
            <Id>Owner</Id>
          </ColumnInfo>
          <ColumnInfo Index="11" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Priority</Name>
            <Id>Priority</Id>
          </ColumnInfo>
          <ColumnInfo Index="12" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Latency</Name>
            <Id>Latency</Id>
          </ColumnInfo>
          <ColumnInfo Index="13" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Description</Name>
            <Id>Description</Id>
          </ColumnInfo>
          <ColumnInfo Index="14" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Connector</Name>
            <Id>ConnectorId</Id>
          </ColumnInfo>
          <ColumnInfo Index="15" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Forwarding Status</Name>
            <Id>ConnectorStatus</Id>
          </ColumnInfo>
          <ColumnInfo Index="16" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Class</Name>
            <Id>Class</Id>
          </ColumnInfo>
          <ColumnInfo Index="17" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Time in State</Name>
            <Id>TimeInState</Id>
          </ColumnInfo>
          <ColumnInfo Index="18" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Custom Field 1</Name>
            <Id>CustomField1</Id>
          </ColumnInfo>
          <ColumnInfo Index="19" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Custom Field 2</Name>
            <Id>CustomField2</Id>
          </ColumnInfo>
          <ColumnInfo Index="20" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Custom Field 3</Name>
            <Id>CustomField3</Id>
          </ColumnInfo>
          <ColumnInfo Index="21" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Custom Field 4</Name>
            <Id>CustomField4</Id>
          </ColumnInfo>
          <ColumnInfo Index="22" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Custom Field 5</Name>
            <Id>CustomField5</Id>
          </ColumnInfo>
          <ColumnInfo Index="23" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Custom Field 6</Name>
            <Id>CustomField6</Id>
          </ColumnInfo>
          <ColumnInfo Index="24" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Custom Field 7</Name>
            <Id>CustomField7</Id>
          </ColumnInfo>
          <ColumnInfo Index="25" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Custom Field 8</Name>
            <Id>CustomField8</Id>
          </ColumnInfo>
          <ColumnInfo Index="26" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Custom Field 9</Name>
            <Id>CustomField9</Id>
          </ColumnInfo>
          <ColumnInfo Index="27" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Custom Field 10</Name>
            <Id>CustomField10</Id>
          </ColumnInfo>
          <ColumnInfo Index="28" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Resolved By</Name>
            <Id>ResolvedBy</Id>
          </ColumnInfo>
          <ColumnInfo Index="29" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Time Resolved</Name>
            <Id>TimeResolved</Id>
          </ColumnInfo>
          <ColumnInfo Index="30" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Last State Change</Name>
            <Id>TimeResolutionStateLastModified</Id>
          </ColumnInfo>
          <ColumnInfo Index="31" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Last Modified</Name>
            <Id>LastModified</Id>
          </ColumnInfo>
          <ColumnInfo Index="32" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Last Modified By</Name>
            <Id>LastModifiedBy</Id>
          </ColumnInfo>
          <ColumnInfo Index="33" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Management Group</Name>
            <Id>ManagementGroup</Id>
          </ColumnInfo>
          <ColumnInfo Index="34" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Site</Name>
            <Id>SiteName</Id>
          </ColumnInfo>
          <ColumnInfo Index="35" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Repeat Count</Name>
            <Id>RepeatCount</Id>
          </ColumnInfo>
          <ColumnInfo Index="36" SortIndex="-1" Width="100" Grouped="false" Sorted="false" IsSortable="true" Visible="false" SortOrder="Ascending">
            <Name>Ticket ID</Name>
            <Id>TicketId</Id>
          </ColumnInfo>
        </Presentation>
        <Target />
      </View>
      <View ID="MPAuthor.ProcessDataSource.VBScript.View.Target" Accessibility="Internal" Enabled="true" Target="MPAuthor.ProcessDataSource.VBScript.Target" TypeID="SC!Microsoft.SystemCenter.StateViewType" Visible="true">
        <Category>StateCollection</Category>
        <Criteria />
      </View>
    </Views>
    <Folders>
      <Folder ID="MPAuthor.ProcessDataSource.VBScript.Folder" Accessibility="Internal" ParentFolder="SC!Microsoft.SystemCenter.Monitoring.ViewFolder.Root" />
    </Folders>
    <FolderItems>
      <FolderItem ElementID="MPAuthor.ProcessDataSource.VBScript.View.Alerts" Folder="MPAuthor.ProcessDataSource.VBScript.Folder" />
      <FolderItem ElementID="MPAuthor.ProcessDataSource.VBScript.View.Target" Folder="MPAuthor.ProcessDataSource.VBScript.Folder" />
    </FolderItems>
    <StringResources>
      <StringResource ID="AlertMessageID30ec769b4e594258b52596e4c08aecca" />
      <StringResource ID="AlertMessageID3aad959107b34f8dbcc40fbe755ae321" />
      <StringResource ID="AlertMessageID3c3f53bd716449f58e793397c3a79f5b" />
      <StringResource ID="AlertMessageIDa7ea8960e5ac429d9e684275bfa1471e" />
      <StringResource ID="AlertMessageIDb42d746535b64f4984208eb5fef20ae7" />
      <StringResource ID="MPAuthor.ProcessDataSource.VBScript.SimpleEventAlert.AlertMessage" />
    </StringResources>
  </Presentation>
  <LanguagePacks>
    <LanguagePack ID="ENU" IsDefault="true">
      <DisplayStrings>
        <DisplayString ElementID="AlertMessageID30ec769b4e594258b52596e4c08aecca">
          <Name>Error 1</Name>
          <Description>{0}
{1}
{2}</Description>
        </DisplayString>
        <DisplayString ElementID="AlertMessageID3aad959107b34f8dbcc40fbe755ae321">
          <Name>Error 1</Name>
          <Description>{0}</Description>
        </DisplayString>
        <DisplayString ElementID="AlertMessageID3c3f53bd716449f58e793397c3a79f5b">
          <Name>parsed event alert</Name>
          <Description>{0}
{1}
{2}
{3}</Description>
        </DisplayString>
        <DisplayString ElementID="AlertMessageIDa7ea8960e5ac429d9e684275bfa1471e">
          <Name>Error 2</Name>
          <Description>{0}
{1}
{2}</Description>
        </DisplayString>
        <DisplayString ElementID="AlertMessageIDb42d746535b64f4984208eb5fef20ae7">
          <Name>Error 2</Name>
          <Description>{0}</Description>
        </DisplayString>
        <DisplayString ElementID="MPAuthor.ProcessDataSource.VBScript">
          <Name>MPAuthor Sample - Process Data Source (VBScript)</Name>
          <Description><![CDATA[This management pack provides an example of a script processing the output of a data source.  The data source is followed by a probe action that changes the output data type to a property bag. Monitors and rules using the data type specify the property bag values that they require. 

The specific example expects XML in the description of an event.  This simulates a condition where all errors in the application create a Windows event with the same name number and source. The XML includes the specific number and description of the error.  The expected XML format is below.  Sample rules expect an event with a number of 101 and a source of EventCreate.  The EventCreate utility can be used to create sample events.

All rules and monitors are targeted at a class called MPAuthor.ProcessDataSource.VBScript.Target.  This is discovered by creating a registry key at HKLM\SOFTWARE\MPAuthor\ProcessDataSource. This registry key must be on the same agent computer that the sample event is created on.

Sample XML:
<Event>
	<Date>4/11/2010</Date>
	<Time>10:45:00</Time>
	<ErrorNumber>1</ErrorNumber>
	<ErrorDescription>This is the description of the error.</ErrorDescription>
</Event>

Sample command to create test event:
EventCreate /L APPLICATION /T ERROR /ID 101 /D "<Event><Date>4/11/2010</Date><Time>10:45:00</Time><ErrorNumber>1</ErrorNumber><ErrorDescription>This is the description of the error.</ErrorDescription></Event>"]]></Description>
        </DisplayString>
        <DisplayString ElementID="MPAuthor.ProcessDataSource.VBScript.DataSource.ParsedEvent">
          <Name>MPAuthor Parsed Event Data Source</Name>
          <Description />
        </DisplayString>
        <DisplayString ElementID="MPAuthor.ProcessDataSource.VBScript.DataSource.ParseEvent.Filtered">
          <Name>MPAuthor Parsed Event Filtered</Name>
        </DisplayString>
        <DisplayString ElementID="MPAuthor.ProcessDataSource.VBScript.Discovery.Target">
          <Name>MPAuthor Discover ProcessData Target</Name>
        </DisplayString>
        <DisplayString ElementID="MPAuthor.ProcessDataSource.VBScript.Folder">
          <Name>MPAuthor Sample ProcessDataSource</Name>
        </DisplayString>
        <DisplayString ElementID="MPAuthor.ProcessDataSource.VBScript.Rule.Error1">
          <Name>Error 1</Name>
        </DisplayString>
        <DisplayString ElementID="MPAuthor.ProcessDataSource.VBScript.Rule.Error2">
          <Name>Error 2</Name>
        </DisplayString>
        <DisplayString ElementID="MPAuthor.ProcessDataSource.VBScript.SimpleEventAlert.AlertMessage">
          <Name>Simple event alert</Name>
          <Description>{0}</Description>
        </DisplayString>
        <DisplayString ElementID="MPAuthor.ProcessDataSource.VBScript.Target">
          <Name>MPAuthor ProcessDataSource Sample Target (VBScript)</Name>
        </DisplayString>
        <DisplayString ElementID="MPAuthor.ProcessDataSource.VBScript.View.Alerts">
          <Name>Alerts</Name>
        </DisplayString>
        <DisplayString ElementID="MPAuthor.ProcessDataSource.VBScript.View.Target">
          <Name>ProcessDataSource Target</Name>
        </DisplayString>
      </DisplayStrings>
    </LanguagePack>
  </LanguagePacks>
</ManagementPack>
