Load Monitoring Module

Microsoft.ApacheHTTPServer.LoadModule.Task (Task)

Load the monitoring module (apache-cimprov) in the Apache configuration to enable monitoring. This task will restart the Apache HTTP Server. The default UNIX/Linux Agent Privileged account credentials for the computer will be used to load the module and may require sudo authorization.

Element properties:

TargetMicrosoft.ApacheHTTPServer.Installation.Unix
AccessibilityPublic
CategoryMaintenance
EnabledTrue
RemotableFalse
Timeout300

Member Modules:

ID Module Type TypeId RunAs 
ServiceTask WriteAction Microsoft.Unix.WSMan.Invoke.VarPriv.WriteAction Default

Source Code:

<Task ID="Microsoft.ApacheHTTPServer.LoadModule.Task" Target="Microsoft.ApacheHTTPServer.Installation.Unix" Accessibility="Public" Enabled="true">
<Category>Maintenance</Category>
<WriteAction ID="ServiceTask" TypeID="Unix!Microsoft.Unix.WSMan.Invoke.VarPriv.WriteAction">
<TargetSystem>$Target/Host/Property[Type="Unix!Microsoft.Unix.Computer"]/NetworkName$</TargetSystem>
<UserName>$RunAs[Name="Unix!Microsoft.Unix.PrivilegedAccount"]/UserName$</UserName>
<Password>$RunAs[Name="Unix!Microsoft.Unix.PrivilegedAccount"]/Password$</Password>
<Uri>http://schemas.microsoft.com/wbem/wscim/1/cim-schema/2/SCX_OperatingSystem?__cimnamespace=root/scx</Uri>
<Selector/>
<InvokeAction>ExecuteCommand</InvokeAction>
<Input>&lt;p:ExecuteCommand_INPUT xmlns:p="http://schemas.microsoft.com/wbem/wscim/1/cim-schema/2/SCX_OperatingSystem"&gt;&lt;p:command&gt;/opt/microsoft/apache-cimprov/bin/apache_config.sh -c&lt;/p:command&gt;&lt;p:timeout&gt;60&lt;/p:timeout&gt;&lt;/p:ExecuteCommand_INPUT&gt;</Input>
<TimeOutInMS>6000</TimeOutInMS>
</WriteAction>
</Task>