Data ONTAP: Trigger vFiler Discovery Rule

DataONTAP.TriggeredvFilerDeepDiscovery.Rule (Rule)

Knowledge Base article:

Summary

This is the discovery rule for vFilers that are hosted by Data ONTAP storage systems. After valid credentials are provided, this rule contacts each vFiler and discovers all of its logical storage elements.

You must have entered credentials using the System Center Operations Manager console action "Manage Data ONTAP Controller Credentials" before this rule can successfully query the vFilers. The credentials should be those that were setup for this vFiler, not credentials from the hosting storage system.

Configuration

You must setup the proper credentials for the vFiler. Go to "Manage Data ONTAP Controller Credentials” to enter the valid vFiler credentials to the System Center Operations Manager.

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.

Element properties:

TargetDataONTAP.ManagementServer
CategoryDiscovery
EnabledTrue
Alert GenerateFalse
RemotableTrue

Member Modules:

ID Module Type TypeId RunAs 
TriggerdvFilerDiscoveryDS DataSource Microsoft.Windows.EventCollector Default
vFilerDiscoveryWA WriteAction Microsoft.Windows.ScriptWriteAction Default

Source Code:

<Rule ID="DataONTAP.TriggeredvFilerDeepDiscovery.Rule" Enabled="true" Target="DataONTAP.ManagementServer" ConfirmDelivery="true" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>Discovery</Category>
<DataSources>
<DataSource ID="TriggerdvFilerDiscoveryDS" TypeID="Windows!Microsoft.Windows.EventCollector">
<ComputerName/>
<LogName>OnCommand</LogName>
<AllowProxying>false</AllowProxying>
<Expression>
<And>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="UnsignedInteger">EventDisplayNumber</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="UnsignedInteger">1070</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">PublisherName</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">Data ONTAP MP</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</And>
</Expression>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="vFilerDiscoveryWA" TypeID="Windows!Microsoft.Windows.ScriptWriteAction">
<ScriptName>vFilerDeepDiscovery.vbs</ScriptName>
<Arguments>$Target/Property[Type="DataONTAP.ManagementServer"]/Fqdn$</Arguments>
<ScriptBody><Script>
'**********************************************************************************
' Script Name - vFilerDeepDiscovery.vbs
'
' Description:
' vFilers deep discovery
'
' (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 = "vFilerDeepDiscovery.vbs was called with the incorrect # of parameters (param count = " &amp; oArgs.Count &amp; ")."
'WScript.Echo(errorMessage)
Call oAPI.LogScriptEvent("vFilerDeepDiscovery.vbs",1201,0,errorMessage)
Wscript.Quit -1
End If

Dim ManagementServer

ManagementServer = oArgs(0)

Dim oNetAppSCOMAPI
Set oNetAppSCOMAPI = CreateObject("NetApp.OM.Server.Discovery.VFilerDiscovery")

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("vFilerDeepDiscovery.vbs",1202,0,errorMessage)
WScript.Quit -1
End If

Dim result
result = oNetAppSCOMAPI.DeepDiscovery(ManagementServer)

If Err Then
errorMessage = "Failed to call vFiler DeepDiscovery" &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("vFilerDeepDiscovery.vbs",1203,0,errorMessage)
WScript.Quit -1
End If

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

Set oNetAppSCOMAPI = Nothing
Set oAPI = Nothing



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