Data ONTAP: vFiler Status Rule

DataONTAP.Monitoring.vFilerStatus (Rule)

Knowledge Base article:

Summary

This rule checks the status of all monitored vFilers by querying the hosting storage system.

Configuration

Several overrides are available for this rule. Sync Time and Interval Seconds determine when and how often the rule runs. Timeout Seconds determines how long System Center Operations Manager waits for this rule to complete.

Resolutions

If you suspect a problem with this rule, check the OnCommand and System Center Operations Manager event logs on the management server running the rule.

Additional

Event ID

Severity

Description

1080

INFO

Status OK (Running)

1082

ERROR

Status ERROR (Stopped, Defunct, Inconsistent)

Element properties:

TargetDataONTAP.ManagementServer
CategoryStateCollection
EnabledTrue
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
DS DataSource System.SimpleScheduler Default
GetvFilerStatusWA WriteAction Microsoft.Windows.ScriptWriteAction DataONTAP.SecureReference.RunAsProfile

Source Code:

<Rule ID="DataONTAP.Monitoring.vFilerStatus" Enabled="true" Target="DataONTAP.ManagementServer" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>StateCollection</Category>
<DataSources>
<DataSource ID="DS" TypeID="System!System.SimpleScheduler">
<IntervalSeconds>900</IntervalSeconds>
<SyncTime>00:41</SyncTime>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="GetvFilerStatusWA" TypeID="Windows!Microsoft.Windows.ScriptWriteAction" RunAs="DS!DataONTAP.SecureReference.RunAsProfile">
<ScriptName>GetvFilerStatus.vbs</ScriptName>
<Arguments>$Target/Property[Type="DataONTAP.ManagementServer"]/Fqdn$</Arguments>
<ScriptBody><Script>
'**********************************************************************************
' Script Name - GetvFilerStatus.vbs
'
' Description:
' Gets vFiler status
'
' (c) Copyright NetApp Inc. 2011 - All rights reserved
'**********************************************************************************

Option Explicit
SetLocale("en-us")

Dim oAPI
Set oAPI = CreateObject("MOM.ScriptAPI")

Dim oArgs
Set oArgs = WScript.Arguments

Dim errorMessage
if oArgs.Count &lt; 1 Then
errorMessage = "GetvFilerStatus.vbs was called with the incorrect # of parameters (param count = " &amp; oArgs.Count &amp; ")."
'WScript.Echo(errorMessage)
Call oAPI.LogScriptEvent("GetvFilerStatus.vbs",1201,0,errorMessage)
Wscript.Quit -1
End If

Dim ManagementServer

ManagementServer = oArgs(0)

Dim oNetAppSCOMAPI
Set oNetAppSCOMAPI = CreateObject("NetApp.OM.Server.Monitoring.StorageMonitoring")

If Err Then
errorMessage = "Failed to create NetAppSCOM object" &amp; vbNewLine &amp; _
"Err.description = """ &amp; Err.description &amp; """" &amp; vbNewLine &amp; _
"Err.helpcontext = """ &amp; Err.helpcontext &amp; """" &amp; vbNewLine &amp; _
"Err.helpfile = """ &amp; Err.helpfile &amp; """" &amp; vbNewLine &amp; _
"Err.number = """ &amp; Err &amp; """ (&amp;H" &amp; hex(Err) &amp; ")" &amp; vbNewLine &amp; _
"Err.source = """ &amp; Err.source &amp; """" &amp; vbNewLine
'WScript.Echo(errorMessage)
Call oAPI.LogScriptEvent("GetvFilerStatus.vbs",1202,0,errorMessage)
WScript.Quit -1
End If

Dim result
result = oNetAppSCOMAPI.GetVFilerStatus(ManagementServer)

If Err Then
errorMessage = "Failed to call GetVFilerStatus" &amp; vbNewLine &amp; _
"Err.description = """ &amp; Err.description &amp; """" &amp; vbNewLine &amp; _
"Err.helpcontext = """ &amp; Err.helpcontext &amp; """" &amp; vbNewLine &amp; _
"Err.helpfile = """ &amp; Err.helpfile &amp; """" &amp; vbNewLine &amp; _
"Err.number = """ &amp; Err &amp; """ (&amp;H" &amp; hex(Err) &amp; ")" &amp; vbNewLine &amp; _
"Err.source = """ &amp; Err.source &amp; """" &amp; vbNewLine
'WScript.Echo(errorMessage)
Call oAPI.LogScriptEvent("GetvFilerStatus.vbs",1203,0,errorMessage)
WScript.Quit -1
End If

Call oAPI.LogScriptEvent("GetvFilerStatus.vbs",1204,0,"Event collection succeeded for " &amp; ManagementServer &amp; ".")

Set oNetAppSCOMAPI = Nothing
Set oAPI = Nothing



</Script></ScriptBody>
<TimeoutSeconds>300</TimeoutSeconds>
</WriteAction>
</WriteActions>
</Rule>