# List users from Active Directory through LDAP
# Note: Anonymous LDAP binding must be allowed, and the Anonymous user
# must have read access to CN=Users and CN=theusername
# Run the agent in verbose mode to see the data

bundle agent ldap
{
classes:
   "gotdata" expression => ldaparray(
                                    "myarray",
                                    "ldap://cf-win2003",
                                    "CN=Test Pilot,CN=Users,DC=domain,DC=cf-win2003",
                                    "(name=*)",
                                    "subtree",
                                    "none");
reports:
gotdata::
  "Got user data";
!gotdata::
  "Did not get user data";
}
