EMC Isilon V8 All Nodes Events Data source

EMC.Isilon.V8.AllNodesEventsDS (DataSourceModuleType)

This data source provider for the EMC Isilon All Nodes Events using V8 isi commands

Element properties:

TypeDataSourceModuleType
IsolationAny
AccessibilityPublic
RunAsDefault
OutputTypeSystem.PropertyBagData

Member Modules:

ID Module Type TypeId RunAs 
Scheduler DataSource System.SimpleScheduler Default
Script ProbeAction Microsoft.Windows.ScriptPropertyBagProbe Default
SSHPA ProbeAction Microsoft.Unix.SSHCommand.ProbeAction Default
Filter ConditionDetection System.ExpressionFilter Default

Overrideable Parameters:

IDParameterTypeSelectorDisplay NameDescription
TimeoutSecondsint$Config/TimeoutSeconds$Timeout SecondsThis is the amount of seconds to wait before terminating the execution of the module

Source Code:

<DataSourceModuleType ID="EMC.Isilon.V8.AllNodesEventsDS" Accessibility="Public" Batching="false">
<Configuration>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="IntervalSeconds" type="xsd:integer"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="SyncTime" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="SNMPAddress" type="xsd:string"/>
<xsd:element xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TimeoutSeconds" type="xsd:integer"/>
</Configuration>
<OverrideableParameters>
<OverrideableParameter ID="TimeoutSeconds" Selector="$Config/TimeoutSeconds$" ParameterType="int"/>
</OverrideableParameters>
<ModuleImplementation Isolation="Any">
<Composite>
<MemberModules>
<DataSource ID="Scheduler" TypeID="System!System.SimpleScheduler">
<IntervalSeconds>$Config/IntervalSeconds$</IntervalSeconds>
<SyncTime>$Config/SyncTime$</SyncTime>
</DataSource>
<ProbeAction ID="SSHPA" TypeID="MUL!Microsoft.Unix.SSHCommand.ProbeAction">
<Host>$Config/SNMPAddress$</Host>
<Port>22</Port>
<UserName>$RunAs[Name="EMC.Isilon.RunAsProfile"]/UserName$</UserName>
<Password>$RunAs[Name="EMC.Isilon.RunAsProfile"]/Password$</Password>
<Command>isi event groups list --resolved=false --no-header --format=csv | sed 's/\"//g'</Command>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
</ProbeAction>
<ProbeAction ID="Script" TypeID="Windows!Microsoft.Windows.ScriptPropertyBagProbe">
<ScriptName>EMC.Isilon.AllNodesEventsDS.ScriptedFilter.vbs</ScriptName>
<Arguments>"$Data///*[local-name()="stdout"]$"</Arguments>
<ScriptBody><Script>' $ScriptName: "EMC.Isilon.AllNodesEventsDS.ScriptedFilter.vbs" $
'
' Purpose: This script parse all events
'
' $File: EMC.Isilon.AllNodesEventsDS.ScriptedFilter.vbs $
'*************************************************************************

Option Explicit
SetLocale("en-us")

const EvID = 2810
const strScriptName = "EMC.Isilon.AllNodesEventsDS.ScriptedFilter.vbs"

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


Call oAPI.LogScriptEvent(strScriptName, EvID, 4, "Script started")

Dim oArgs, strOutput, strLin, strArg, Line
Set oArgs = WScript.Arguments

strOutput = ""

For Each strArg in oArgs
strOutput = strOutput &amp; strArg
Next

If strOutput &lt;&gt; "" Then

Call oAPI.LogScriptEvent(strScriptName, EvID, 4, "Script argument: " &amp; strOutput)

For Each Line in Split(strOutput, "\n")
strLin = Split(Line, ",")

If Ubound(strLin) &gt; 0 Then
Call oAPI.LogScriptEvent(strScriptName, EvID, 4, "Adding Event to Property Bag ")

'ID
If Trim(strLin(0)) &lt;&gt; "" Then
Call oAPI.LogScriptEvent(strScriptName, EvID, 4, "Property Added ID " &amp; Trim(strLin(0)) )
Set oBag = oAPI.CreatePropertyBag()
Call oBag.AddValue("ID", Trim(strLin(0)))
End if

'Causes Short
If Trim(strLin(3)) &lt;&gt; "" Then
Call oAPI.LogScriptEvent(strScriptName, EvID, 4, "Property Added Causes Short " &amp; Trim(strLin(3)) )
Call oBag.AddValue("CausesShort", Trim(strLin(3)))
End if

'Events
If Trim(strLin(4)) &lt;&gt; "" Then
Call oAPI.LogScriptEvent(strScriptName, EvID, 4, "Property Added Events " &amp; Trim(strLin(4)) )
Call oBag.AddValue("Events", Trim(strLin(4)))
End if

'Severity
If Trim(strLin(5)) &lt;&gt; "" Then
Call oAPI.LogScriptEvent(strScriptName, EvID, 4, "Property Added Severity " &amp; Trim(strLin(5)) )
Call oBag.AddValue("Severity", Trim(strLin(5)))
oAPI.AddItem(oBag)
End if
End If
Next

oAPI.ReturnItems()

Else
Set oBag = oAPI.CreatePropertyBag()
Call oBag.AddValue("ID", "0")
Call oBag.AddValue("CausesShort", "No Events")
Call oBag.AddValue("Severity", "Information")
oAPI.Return(oBag)
Call oAPI.LogScriptEvent(strScriptName, EvID, 4, "Output is empty")
End If

Call oAPI.LogScriptEvent(strScriptName, EvID, 4, "Script completed")

</Script></ScriptBody>
<SecureInput/>
<TimeoutSeconds>$Config/TimeoutSeconds$</TimeoutSeconds>
<EventPolicy/>
</ProbeAction>
<ConditionDetection ID="Filter" TypeID="System!System.ExpressionFilter">
<Expression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">//*[local-name()="returnCode"]</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">0</Value>
</ValueExpression>
</SimpleExpression>
</Expression>
</ConditionDetection>
</MemberModules>
<Composition>
<Node ID="Script">
<Node ID="Filter">
<Node ID="SSHPA">
<Node ID="Scheduler"/>
</Node>
</Node>
</Node>
</Composition>
</Composite>
</ModuleImplementation>
<OutputType>System!System.PropertyBagData</OutputType>
</DataSourceModuleType>