<ManagementPack ContentReadable="true" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <Manifest>
    <Identity>
      <ID>Custom.HTTPDService.Recovery.Unix.MP</ID>
      <Version>1.0.0.2</Version>
    </Identity>
    <Name>Custom HTTPD Recovery MP</Name>
    <References>
      <Reference Alias="SystemCenter">
        <ID>Microsoft.SystemCenter.Library</ID>
        <Version>6.1.7221.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="Unix">
        <ID>Microsoft.Unix.Library</ID>
        <Version>6.1.7000.256</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="MicrosoftUnixServiceLibrary">
        <ID>Microsoft.Unix.Service.Library</ID>
        <Version>6.1.7000.256</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="Windows">
        <ID>Microsoft.Windows.Library</ID>
        <Version>6.1.7221.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="Health">
        <ID>System.Health.Library</ID>
        <Version>6.1.7221.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
      <Reference Alias="System">
        <ID>System.Library</ID>
        <Version>6.1.7221.0</Version>
        <PublicKeyToken>31bf3856ad364e35</PublicKeyToken>
      </Reference>
    </References>
  </Manifest>
  <TypeDefinitions>
    <EntityTypes>
      <ClassTypes>
        <ClassType ID="ServiceStateProbePage_950102e6363e4cbeb5a0ea2a2b241fc6" Accessibility="Public" Abstract="false" Base="MicrosoftUnixServiceLibrary!Microsoft.SystemCenter.OwnProcessUnixService" Hosted="true" Singleton="false" />
      </ClassTypes>
    </EntityTypes>
  </TypeDefinitions>
  <Monitoring>
    <Discoveries>
      <Discovery ID="ServiceStateProbePage_950102e6363e4cbeb5a0ea2a2b241fc6.DiscoveryRule" Enabled="false" Target="Unix!Microsoft.Unix.Computer" ConfirmDelivery="false" Remotable="true" Priority="Normal">
        <Category>Discovery</Category>
        <DiscoveryTypes>
          <DiscoveryClass TypeID="ServiceStateProbePage_950102e6363e4cbeb5a0ea2a2b241fc6" />
        </DiscoveryTypes>
        <DataSource ID="DS" TypeID="Unix!Microsoft.Unix.ScheduledClassSnapshotDataMapper">
          <Scheduler>
            <SimpleReccuringSchedule>
              <Interval Unit="Seconds">300</Interval>
              <SyncTime />
            </SimpleReccuringSchedule>
            <ExcludeDates />
          </Scheduler>
          <ClassId>$MPElement[Name="ServiceStateProbePage_950102e6363e4cbeb5a0ea2a2b241fc6"]$</ClassId>
          <InstanceSettings>
            <Settings>
              <Setting>
                <Name>$MPElement[Name="Unix!Microsoft.Unix.Computer"]/PrincipalName$</Name>
                <Value>$Target/Property[Type="Unix!Microsoft.Unix.Computer"]/PrincipalName$</Value>
              </Setting>
              <Setting>
                <Name>$MPElement[Name="MicrosoftUnixServiceLibrary!Microsoft.SystemCenter.UnixService"]/ServiceName$</Name>
                <Value>httpd</Value>
              </Setting>
              <Setting>
                <Name>$MPElement[Name="MicrosoftUnixServiceLibrary!Microsoft.SystemCenter.UnixService"]/ModulePath$</Name>
                <Value>/usr/sbin/httpd</Value>
              </Setting>
              <Setting>
                <Name>$MPElement[Name="MicrosoftUnixServiceLibrary!Microsoft.SystemCenter.UnixService"]/Handle$</Name>
                <Value>20268</Value>
              </Setting>
              <Setting>
                <Name>$MPElement[Name="MicrosoftUnixServiceLibrary!Microsoft.SystemCenter.UnixService"]/ComputerName$</Name>
                <Value>LINRHEL4</Value>
              </Setting>
              <Setting>
                <Name>$MPElement[Name="MicrosoftUnixServiceLibrary!Microsoft.SystemCenter.UnixService"]/ComputerGUID$</Name>
                <Value>44cd36ed-f76d-16fc-3aa4-2469ba8914b6</Value>
              </Setting>
              <Setting>
                <Name>$MPElement[Name="MicrosoftUnixServiceLibrary!Microsoft.SystemCenter.UnixService"]/ComputerGroupName$</Name>
                <Value>Red Hat Linux Computer Group</Value>
              </Setting>
              <Setting>
                <Name>$MPElement[Name="MicrosoftUnixServiceLibrary!Microsoft.SystemCenter.UnixService"]/ComputerGroupGUID$</Name>
                <Value>650ddae7-40c2-f5c0-04ec-5b846d4b210b</Value>
              </Setting>
            </Settings>
          </InstanceSettings>
        </DataSource>
      </Discovery>
    </Discoveries>
    <Diagnostics>
      <Diagnostic ID="Custom.HTTPDService.Diagnostic.Unix.MP" Accessibility="Internal" Enabled="true" Target="ServiceStateProbePage_950102e6363e4cbeb5a0ea2a2b241fc6" Monitor="MicrosoftUnixServiceLibrary!Microsoft.Unix.Generic.Service.Monitor" ExecuteOnState="Error" Remotable="true" Timeout="300">
        <Category>Custom</Category>
        <ProbeAction ID="Invoke" TypeID="Unix!Microsoft.Unix.SSHCommand.ProbeAction">
          <Host>$Target/Property[Type="MicrosoftUnixServiceLibrary!Microsoft.SystemCenter.UnixService"]/ComputerName$</Host>
          <UserName>$RunAs[Name="Unix!Microsoft.Unix.PrivilegedAccount"]/UserName$</UserName>
          <Password>$RunAs[Name="Unix!Microsoft.Unix.PrivilegedAccount"]/Password$</Password>
          <Command>/etc/init.d/httpd status</Command>
        </ProbeAction>
      </Diagnostic>
    </Diagnostics>
    <Recoveries>
      <Recovery ID="Custom.SCX.Restart.Recovery" Accessibility="Public" Enabled="true" Target="ServiceStateProbePage_950102e6363e4cbeb5a0ea2a2b241fc6" Monitor="MicrosoftUnixServiceLibrary!Microsoft.Unix.Generic.Service.Monitor" ResetMonitor="true" ExecuteOnDiagnostic="Custom.HTTPDService.Diagnostic.Unix.MP" Remotable="true" Timeout="300">
        <Category>Maintenance</Category>
        <WriteAction ID="SSHCommand" TypeID="Unix!Microsoft.Unix.SSHCommand.WriteAction">
          <Host>$Target/Property[Type="MicrosoftUnixServiceLibrary!Microsoft.SystemCenter.UnixService"]/ComputerName$</Host>
          <Port>22</Port>
          <UserName>$RunAs[Name="Unix!Microsoft.Unix.PrivilegedAccount"]/UserName$</UserName>
          <Password>$RunAs[Name="Unix!Microsoft.Unix.PrivilegedAccount"]/Password$</Password>
          <Command>/etc/init.d/httpd restart</Command>
          <TimeoutSeconds>120</TimeoutSeconds>
        </WriteAction>
      </Recovery>
    </Recoveries>
    <Overrides>
      <DiscoveryPropertyOverride ID="ServiceStateProbePage_950102e6363e4cbeb5a0ea2a2b241fc6.DiscoveryOverride" Context="Unix!Microsoft.Unix.Computer" ContextInstance="650ddae7-40c2-f5c0-04ec-5b846d4b210b" Enforced="false" Discovery="ServiceStateProbePage_950102e6363e4cbeb5a0ea2a2b241fc6.DiscoveryRule" Property="Enabled">
        <Value>true</Value>
      </DiscoveryPropertyOverride>
    </Overrides>
  </Monitoring>
  <Presentation>
    <Folders>
      <Folder ID="Folder_bd0d26111409475fbb84725cfe99f006" Accessibility="Public" ParentFolder="SystemCenter!Microsoft.SystemCenter.Monitoring.ViewFolder.Root" />
      <Folder ID="TemplateoutputMicrosoftUnixServiceTemplate012020121914076e9c267d622846dda307a3a0d059d398" Accessibility="Internal" ParentFolder="MicrosoftUnixServiceLibrary!Microsoft.Unix.Service.Template.Folder" />
    </Folders>
    <FolderItems>
      <FolderItem ElementID="ServiceStateProbePage_950102e6363e4cbeb5a0ea2a2b241fc6" Folder="TemplateoutputMicrosoftUnixServiceTemplate012020121914076e9c267d622846dda307a3a0d059d398" />
      <FolderItem ElementID="ServiceStateProbePage_950102e6363e4cbeb5a0ea2a2b241fc6.DiscoveryOverride" Folder="TemplateoutputMicrosoftUnixServiceTemplate012020121914076e9c267d622846dda307a3a0d059d398" />
      <FolderItem ElementID="ServiceStateProbePage_950102e6363e4cbeb5a0ea2a2b241fc6.DiscoveryRule" Folder="TemplateoutputMicrosoftUnixServiceTemplate012020121914076e9c267d622846dda307a3a0d059d398" />
    </FolderItems>
  </Presentation>
  <LanguagePacks>
    <LanguagePack ID="ENU" IsDefault="false">
      <DisplayStrings>
        <DisplayString ElementID="Custom.HTTPDService.Diagnostic.Unix.MP">
          <Name>HTTPD Diagnostic</Name>
          <Description />
        </DisplayString>
        <DisplayString ElementID="Custom.HTTPDService.Recovery.Unix.MP">
          <Name>Custom HTTPD Recovery MP</Name>
        </DisplayString>
        <DisplayString ElementID="Custom.SCX.Restart.Recovery">
          <Name>HTTPD  Recovery</Name>
          <Description>WARNING: Running this diagnostic is unsecure, do not run this against machines you do not trust as it may expose credentials to an unknown system.</Description>
        </DisplayString>
        <DisplayString ElementID="Folder_bd0d26111409475fbb84725cfe99f006">
          <Name>Unix MP</Name>
        </DisplayString>
        <DisplayString ElementID="ServiceStateProbePage_950102e6363e4cbeb5a0ea2a2b241fc6">
          <Name>HTTPD Service monitor</Name>
        </DisplayString>
        <DisplayString ElementID="TemplateoutputMicrosoftUnixServiceTemplate012020121914076e9c267d622846dda307a3a0d059d398">
          <Name>HTTPD Service monitor</Name>
        </DisplayString>
      </DisplayStrings>
    </LanguagePack>
  </LanguagePacks>
</ManagementPack>