16.01.2013 Views

Ipswitch WhatsUp Gold User Guide - Ipswitch Documentation Server

Ipswitch WhatsUp Gold User Guide - Ipswitch Documentation Server

Ipswitch WhatsUp Gold User Guide - Ipswitch Documentation Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Ipswitch</strong> <strong>WhatsUp</strong> <strong>Gold</strong> <strong>User</strong> <strong>Guide</strong><br />

End If<br />

If Not IsNull(sLogin<strong>User</strong>) Then<br />

End If<br />

If instr(1,sLogin<strong>User</strong>, sExpected<strong>User</strong>,1) > 0 Then<br />

Context.SetResult 0,"Current login user is " & sLogin<strong>User</strong><br />

ElseIf sLogin<strong>User</strong> = " " Then<br />

Else<br />

End If<br />

Context.SetResult 0,"No one is currently logged in."<br />

'Check if Ping monitor on the device specified by nDeviceID is up.<br />

Context.SetResult 1,"an unexpected user " & sLogin<strong>User</strong> & " has logged in " & sComputer<br />

'If nDeviceID is not available as it's in the case during discovery, then assume<br />

'ping is up.<br />

'If ping monitor is not on the device, then assume it's up so the real check will be<br />

'performed.<br />

Function IsPingUp(nDeviceID)<br />

If nDeviceID > -1 Then<br />

'get the Ping monitor up state.<br />

sSqlGetUpState = "SELECT sStateName from PivotActiveMonitorTypeToDevice as P join " & _<br />

"ActiveMonitorType as A on P.nActiveMonitorTypeID=A.nActiveMonitorTypeID " & _<br />

"join MonitorState as M on P.nMonitorStateID = M.nMonitorStateID " & _<br />

"where nDeviceID=" & nDeviceID & " and A.sMonitorTypeName='Ping' and " & _<br />

" P.bRemoved=0"<br />

Set oDBconn = Context.GetDB<br />

917

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!