IRST (Intel Rapid Storage Technology) 在 Server Core 模式下不能安裝 Management Tools
只有 CLI 模式的程式可以用
只好用 PowerShell 透過這支程式來取得 RAID 狀態並判斷 State, 若異常則發出告警 Email
我另外有寫一篇 HP / HPE Smart Storage Administrator 的 RAID 監控 與這篇類似
程式如下:
$EmailFrom = "RAIDNotifier <RAIDNotifier@contoso.com>"
$EmailTo = @()
$EmailTo += "Admin <Admin@contoso.com>"
$EmailSubject = "$ENV:ComputerName RAID Warning"
$SMTPServer = "10.10.10.10"
$RAIDStateInfo = .\rstcli64.exe -I | findstr State;
$RAIDStateR = $RAIDStateInfo.Replace(" ","");
$RAIDError = 0
foreach ($RAIDStateEach in $RAIDStateR) {
$RAIDStateS = $RAIDStateEach.Split(":");
$RAIDStateS[1]
if ($RAIDStateS[1] -ne "Normal") {
$RAIDError += 1;
};
}
if ($RAIDError -ne 0) {
Foreach ($Receiver in $EmailTo) {
$EmailBody = "$($RAIDStateR | Out-String) $(.\rstcli64.exe -I | Out-String)"
Send-MailMessage -From $EmailFrom -To $EmailTo -Subject $EmailSubject -Body $EmailBody -Encoding Unicode -Priority High -SmtpServer $SMTPServer
};
};
沒有留言:
張貼留言