Apache SSL 憑證到期

Microsoft.ApacheHTTPServer.Certificate.Unix.DaysUntilExpiration.Monitor (UnitMonitor)

Apache SSL 憑證到期監視

Knowledge Base article:

摘要

Apache 虛擬主機的 SSL 憑證即將到期。可能會對 Apache HTTP Server SSL 健全狀況造成負面影響。

原因

Apache HTTP Server SSL 憑證即將到期。

解決方式

更新憑證,並更新虛擬主機以使用更新的憑證。

設定

預設設定

參數

預設值

ErrorThreshold

7

WarningThreshold

21

您可以使用覆寫,針對所有執行個體或特定執行個體或群組來變更上述定義的參數值

Element properties:

TargetMicrosoft.ApacheHTTPServer.Certificate.Unix
Parent MonitorSystem.Health.AvailabilityState
CategoryAvailabilityHealth
EnabledTrue
Alert GenerateTrue
Alert SeverityMatchMonitorHealth
Alert PriorityNormal
Alert Auto ResolveTrue
Monitor TypeMicrosoft.Oss.WSManEnumeration.LessThanThreshold.ThreeState.MonitorType
RemotableTrue
AccessibilityPublic
Alert Message
Apache 虛擬主機 SSL 憑證即將到期
SSL 憑證將在 {0} 天後到期
RunAsDefault

Source Code:

<UnitMonitor ID="Microsoft.ApacheHTTPServer.Certificate.Unix.DaysUntilExpiration.Monitor" Accessibility="Public" Target="Microsoft.ApacheHTTPServer.Certificate.Unix" TypeID="Oss!Microsoft.Oss.WSManEnumeration.LessThanThreshold.ThreeState.MonitorType" ParentMonitorID="Health!System.Health.AvailabilityState" Enabled="onStandardMonitoring">
<Category>AvailabilityHealth</Category>
<AlertSettings AlertMessage="Microsoft.ApacheHTTPServer.Certificate.Unix.DaysUntilExpiration.AlertMessage">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>Normal</AlertPriority>
<AlertSeverity>MatchMonitorHealth</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Data/Context/Value$</AlertParameter1>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="StatusOK" MonitorTypeStateID="StatusOK" HealthState="Success"/>
<OperationalState ID="StatusWarning" MonitorTypeStateID="StatusWarning" HealthState="Warning"/>
<OperationalState ID="StatusError" MonitorTypeStateID="StatusError" HealthState="Error"/>
</OperationalStates>
<Configuration>
<Interval>28800</Interval>
<TargetSystem>$Target/Host/Host/Host/Property[Type="Unix!Microsoft.Unix.Computer"]/NetworkName$</TargetSystem>
<Uri>http://schemas.microsoft.com/wbem/wscim/1/cim-schema/2/Apache_HTTPDVirtualHostCertificate?__cimnamespace=root/apache</Uri>
<WSManFilter/>
<ObjectName>Apache Virtual Host</ObjectName>
<CounterName>Certificate days until expiration</CounterName>
<InstanceXPath>/DataItem/WsManData/*[local-name(.)='Apache_HTTPDVirtualHostCertificate']/*[local-name(.)='Name']</InstanceXPath>
<InstanceName>$Target/Property[Type="Microsoft.ApacheHTTPServer.Certificate"]/Name$</InstanceName>
<Value>$Data/WsManData/*[local-name(.)='Apache_HTTPDVirtualHostCertificate']/*[local-name(.)='DaysUntilExpiration']$</Value>
<WarningThreshold>21</WarningThreshold>
<ErrorThreshold>7</ErrorThreshold>
<NumSamples>1</NumSamples>
</Configuration>
</UnitMonitor>