A.0 LDAP Expression Syntax for Searching and Matching

Regular expressions or LDAP-style syntax is used in Operations Center in two primary functions:

Operations Center filter and match attributes adheres to the standard LDAP syntax defined in RFC2254, The String Representation of LDAP Search Filters. For a comprehensive description of the search and filter syntax, see the RFC2254 document web page.

The syntax allows entering one or more attr/value pairs, surrounded by parentheses, and logically combined with "and" (&) or "or" (|) operators. The following operators can be used in the search criteria:

=, <, >, <= , >=

For example, to find an object named server1, enter (cn=server1), where cn represents common name, which is a standard way of identifying an object name.

Table A-1 LDAP Expression Examples

To find…

Do this….

All objects starting with the same letters.

Specify wildcards using one or more asterisks (*).For example, to find all objects that begin with server, enter the query as: (cn=server*).

All host objects.

Enter (objectClass=*host*) to find all hostname objects, all ServerHosts, and so on.

All hosts whose names begin with the letters server.

Combine two (attr=value) clauses using the logical "and" operator:

(&(cn=server*)(objectClass=*host*))

Notice how the logical operator appears before the two clauses; this is called prefix notation.

All hosts whose names begin with the letters server and are in a CRITICAL state.

Enter:

(&(&(cn=server*)(objectClass=*host*))(condition=CRITICAL))

All hosts whose names begin with the letters server and are in either a CRITICAL or WARNING state.

Enter:

(&(&(cn=server*)(objectClass=*host*))(|(condition=CRITICAL)(condition=WARNING)))

Hostnames that begin with specific letters and are members of a specific object class.

Enter:

&(objectClass=Router)(hostname>B*)

Elements that are members of a specific class and have a response time greater than or equal to a specified threshold value.

Enter:

&(objectClass=server)(responseTime>=3.4)