This rule collects information about all monitored SnapMirror relationship lag times, over a specified period of time.
This rule collects information about all monitored SnapMirror relationship lag times, over a specified period of time.
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.
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.
Target | DataONTAP.ManagementServer |
Category | PerformanceCollection |
Enabled | True |
Alert Generate | False |
Remotable | True |
ID | Module Type | TypeId | RunAs |
---|---|---|---|
SnapMirrorLagCounterDS | DataSource | System.SimpleScheduler | Default |
ExecuteScript | WriteAction | Microsoft.Windows.ScriptWriteAction | DataONTAP.SecureReference.RunAsProfile |
<Rule ID="DataONTAP.Monitoring.Rule.SnapMirror.LagTime" Enabled="true" Target="DataONTAP.ManagementServer" ConfirmDelivery="false" Remotable="true" Priority="Normal" DiscardLevel="100">
<Category>PerformanceCollection</Category>
<DataSources>
<DataSource ID="SnapMirrorLagCounterDS" TypeID="System!System.SimpleScheduler">
<IntervalSeconds>21600</IntervalSeconds>
<SyncTime>22:40</SyncTime>
</DataSource>
</DataSources>
<WriteActions>
<WriteAction ID="ExecuteScript" TypeID="Windows!Microsoft.Windows.ScriptWriteAction" RunAs="DS!DataONTAP.SecureReference.RunAsProfile">
<ScriptName>CollectSnapMirrorLagTimeCounters.vbs</ScriptName>
<Arguments>$Target/Property[Type="DataONTAP.ManagementServer"]/Fqdn$</Arguments>
<ScriptBody>
'**********************************************************************************
' Script Name - NetApp SnapMirror Lag Time Counter
'
' Description:
' Collect SnapMirror Lag Time counters
'
' (c) Copyright NetApp Inc. 2010 - 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 < 1 Then
errorMessage = "CollectSnapMirrorLagTimeCounters.vbs was called with the incorrect # of parameters (param count = " & oArgs.Count & ")."
WScript.Echo(errorMessage)
Call oAPI.LogScriptEvent("CollectSnapMirrorLagTimeCounters.vbs",1101,0,errorMessage)
Wscript.Quit -1
End If
Dim ManagementServer
ManagementServer = oArgs(0)
' Echo the parameters so we can see what has been passed in
WScript.Echo("ManagementServer = " & ManagementServer)
Dim oNetAppSCOMAPI
Set oNetAppSCOMAPI = CreateObject("NetApp.OM.Server.SnapMirror.SnapMirror")
If Err Then
errorMessage = "Failed to create NetAppSCOM SnapMirror object" & vbNewLine & _
"Err.description = """ & Err.description & """" & vbNewLine & _
"Err.helpcontext = """ & Err.helpcontext & """" & vbNewLine & _
"Err.helpfile = """ & Err.helpfile & """" & vbNewLine & _
"Err.number = """ & Err & """ (&H" & hex(Err) & ")" & vbNewLine & _
"Err.source = """ & Err.source & """" & vbNewLine
WScript.Echo(errorMessage)
Call oAPI.LogScriptEvent("CollectSnapMirrorLagTimeCounters.vbs",1102,0,errorMessage)
WScript.Quit -1
End If
oNetAppSCOMAPI.pushSnapMirrorLagTimeForReportToDB(ManagementServer)
If Err Then
errorMessage = "Failed to get SnapMirror lag time counter" & vbNewLine & _
"Err.description = """ & Err.description & """" & vbNewLine & _
"Err.helpcontext = """ & Err.helpcontext & """" & vbNewLine & _
"Err.helpfile = """ & Err.helpfile & """" & vbNewLine & _
"Err.number = """ & Err & """ (&H" & hex(Err) & ")" & vbNewLine & _
"Err.source = """ & Err.source & """" & vbNewLine & _
"Server = """ & ManagementServer
WScript.Echo(errorMessage)
Call oAPI.LogScriptEvent("CollectSnapMirrorLagTimeCounters.vbs",1103,0,errorMessage)
WScript.Quit -1
End If
Call oAPI.LogScriptEvent("CollectSnapMirrorLagTimeCounters.vbs",1104,0,"Get SnapMirror Lag time counnter succeeded for " & ManagementServer & ".")
Set oNetAppSCOMAPI = Nothing
Set oAPI = Nothing
</ScriptBody>
<TimeoutSeconds>3600</TimeoutSeconds>
</WriteAction>
</WriteActions>
</Rule>