

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Can you guys point me to an example of a regex that is used in the labeling of a new Node CI?
I have 2000+ Node CI's that are named b y their FQDN. I would like to use a regex to remove the domain name, and simply name the Node CI by the short name of the node. Unfortunately, these nodes come from NNMi, and they only have FQDN attributes.
Running uCMDB 9.05 CUP 17. Yes, I know it's not supported any more. Upgrade is just around the corner. I don't expect that to change the way a Node CI is built.
Thanks for the help.
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
To create a regex for a label, go to CI Type Manager, select your CI Type (node), click on the 'default label' and then make sure your expression is first in the list. The regular expression is in a structure of:
RegExp( <FIELD>, <pattern>, <group>)
So, FIELD is which field (in my example, mycomputer.hp.com)
<pattern> is the regex pattern to match: (\w+)\.(.*) (match a word and put it into group 1, then a dot, then everything else in group 2)
<group> is which group to match, in my case, group 1.
RegExp(name,(\w+)\.(.*),1)|name|snmp_sys_name|primary_dns_name|host_key|root_class
My node name: mycomputer.hp.com
My display label: mycomputer
Keith Paschal
UCMDB Worldwide Support Lead
Micro Focus Support
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution."
Click the KUDOS star on the left to say 'Thanks'

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
To create a regex for a label, go to CI Type Manager, select your CI Type (node), click on the 'default label' and then make sure your expression is first in the list. The regular expression is in a structure of:
RegExp( <FIELD>, <pattern>, <group>)
So, FIELD is which field (in my example, mycomputer.hp.com)
<pattern> is the regex pattern to match: (\w+)\.(.*) (match a word and put it into group 1, then a dot, then everything else in group 2)
<group> is which group to match, in my case, group 1.
RegExp(name,(\w+)\.(.*),1)|name|snmp_sys_name|primary_dns_name|host_key|root_class
My node name: mycomputer.hp.com
My display label: mycomputer
Keith Paschal
UCMDB Worldwide Support Lead
Micro Focus Support
If you find this or any post resolves your issue, please be sure to mark it as an accepted solution."
Click the KUDOS star on the left to say 'Thanks'


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Thats exacty what I was looking for!
Thanks for your help.