host search witch wildcards

Hi,I am looking for a hostsearch with wildcards, for example list all hosts with domain test.I tried a search with hdb.h.la grep domain, but it must be possible to search with *test* ?thanks in advance
[236 byte] By [michPa] at [2008-3-7]
# 1

hi,

please use ...

./cr_cli -cmd hdb.h.lq -query "sys.hostName-contains-*gbl*" -u admin -p admin

or

./cr_cli -cmd hdb.h.lq -query "sys.hostName-contains-*gbl*" -phys "PHYS" -u admin -p admin

und please look at page 140 in the cli sps 5.2 dokumentation ...

Chris

ChRa at 2007-7-12 > top of java,Administration Tools,N1 Service Provisioning System...
# 2
Hi Chris,thanksthis worksmichael
michPa at 2007-7-12 > top of java,Administration Tools,N1 Service Provisioning System...
# 3

Try creating the search in the GUI and saving it.

Then try:

cr_cli -cmd hdb.hr.lo -ID "NM:<yourQueryName> -u userID -p password

It should dump out a field like:

ID: 010046023173-1181088209052-31722-0251754824

Name: test_search

Description:

Hidden: false

Query:

sys.hostName-contains-test

Host Filter:

EMPTY

Physical Criteria:

VIRT

So now you can create a cli command like:

${crCmd} hdb.h.lq $auth -query sys.hostName-contains-test

Or if you wanted to gneralize it for any string in perl you could make it:

${crCmd} hdb.h.lq $auth -query sys.parent-equals-${inputString}

John

seiberlinga at 2007-7-12 > top of java,Administration Tools,N1 Service Provisioning System...