Anonymous_User Absent Member.
Absent Member.

How does the LDAPDirectoryLookup KS work?

Can someone tell me how the Networks-RT_LDAPDirectoryLookup KS works? It
does not have any LDAP specific parameters (service account, Base DN,
attributes). What are the endpoints for? I cannot find any detailed doc
on it except for the KS Reference Guide.

I just want to open an LDAP connection to the LDAP server and do a test
query and create events based on the responses (up/down or response
times). I have a service account to do this.



stevelee's Profile:
View this thread:

2 Replies
Anonymous_User Absent Member.
Absent Member.

Re: How does the LDAPDirectoryLookup KS work?


It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.

Has your issue been resolved? If not, you might try one of the following options:

- Visit and search the knowledgebase and/or check all
the other support options available.
- You could also try posting your message again. Make sure it is posted in the
correct newsgroup. (

Be sure to read the forum FAQ about what to expect in the way of responses:

If this is a reply to a duplicate posting, please ignore and accept our apologies
and rest assured we will issue a stern reprimand to our posting bot.

Good luck!

Your NetIQ Forums Team

Anonymous_User Absent Member.
Absent Member.

Re: How does the LDAPDirectoryLookup KS work?

I talked to one of our pre-sales engineers. This KS only emulates LDAP
traffic since it is part of the Networks-RT category. I was supplied
with an unsupported one, "LDAP_ConnectionTest.qml", but it always
returns an error, "424:Object required", which seems to be a VBS error,
but I'm not sure. I can get the same config to work in NetIQ Operations
Center. Here's the script. We are running AppManager 8.0.3.




<ObjType fullpath="0" dropfolderlist="0" styleversion="3">
<Type name="NT_MachineFolder"></Type>

<Default type="runonce" runmode="sched"></Default>


<Param name="PRM_USER_DN">
<Desc>User DN</Desc>
<Param name="PRM_USER_PASSWORD">
<Desc>User Password</Desc>
<Param name="PRM_LDAP_SERVER">
<Desc>LDAP Server</Desc>
<Param name="PRM_DN_LDAP_SERVER">
<Desc>LDAP Server DN</Desc>
<Param name="PRM_OBJECT">
<Desc>Object class and name in LDAP format</Desc>
<Param name="PRM_OBJ_PROPS">
<Desc>Object Properties To Fetch</Desc>



<Script language="VBScript">
<![CDATA[Function CreateEvent(evtMsg, evtDetail)
NQExt.CreateEvent 15, evtMsg, "AKP_NULL", NT_MachineFolder, 0,
evtDetail, "", 1, 0, 0
End Function

Function CreateEvent2(evtMsg)
CreateEvent evtMsg, ""
End Function

Sub Main

'Option Explicit
On Error Resume Next

'ADO Constants
Const adOpenStatic = 3
Const adLockOptimistic = 3
'The value below required for the connection string to read a text file
Const adCmdText = &H0001
Const objectExists = - 2147019886
Const failToOpenObject = - 2147016646
Const InvalidUseOfNull = 94

Set objConnection = CreateObject("ADODB.Connection")
objConnection.Provider = "ADsDSOObject"
objConnection.Open "Active Directory Provider", PRM_USER_DN,
Set objCommand = CreateObject("ADODB.Command")
objCommand.ActiveConnection = objConnection
objCommand.CommandText = _
"<LDAP://" & PRM_LDAP_SERVER & "/" & PRM_DN_LDAP_SERVER & ">;" & _
"(&(" & PRM_OBJECT & "));" & _
PRM_OBJ_PROPS & ";subtree"

Set objRecordSet = objCommand.Execute

If objRecordset.EOF Then
CreateEvent "We could not get properties, LDAP is dead!!!",
Err.Number & ":" & Err.Description
' cscript.Echo "Users exist:"
'Dim recordset : recordset = objRecordSet.getString

props = split(PRM_OBJ_PROPS, ",")
props_no = ubound(props)

event_detail = ""
prop_index = 0

For Each prop In props
event_detail = event_detail & prop & ","

event_detail = Left(event_detail, len(event_detail) - 1)
event_detail = event_detail & vbNewline

While Not objRecordset.EOF
prop_index = 0
For Each prop In props

If IsNull(objRecordSet.Fields(prop)) = False And
IsEmpty(objRecordSet.Fields(prop)) = False And _
IsNull(objRecordSet.Fields(prop).Value) = False And
IsEmpty(objRecordSet.Fields(prop).Value) = False Then
value = objRecordSet.Fields(prop).Value
If isarray(value) = False then
event_detail = event_detail & cstr(value)
Elseif VarType(value) = 8204 Then
If ubound(value) > 0 Then
For i = 1 To ubound(value)
event_detail = event_detail & cstr(value(i))
Elseif len(value(0)) > 0 Then
event_detail = event_detail & cstr(value(0))
End If
End If
End If
If prop_index < props_no Then
event_detail = event_detail & ","
End If
prop_index = prop_index + 1

event_detail = event_detail & vbNewline

CreateEvent "We could get the properties.. LDAP is alive",
NQExt.QTrace event_detail

End If

End Sub

stevelee's Profile:
View this thread:

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.