Most often this environment variable would be used to remove the domain name added to element names during discovery.
The variable is defined within the eHealth Administration Reference Guide. It is found on page 56 in the Admin Reference guide.
eHealth (all versions)
All supported platforms
Environment Variable NH_NAME_SRVC_PAT
The environment variable NH_NAME_SRVC_PAT specifies a regular expression that indicates the portion of the name to truncate.
Default Value: "\..$" (for UNIX and Windows)
Valid Values: Any regular expression.
Usage Notes: To use this variable, you must also set the NH_USE_NAME_SRVC variable (page 57 in the Admin Reference guide) to DNS. This variable causes the discover process to truncate the name or address at the first period in the name. The following examples use the string smsp1ja1.abc.mwa.com to show various expressions and their results:
"" results in smsp1ja1.abc.mwa.com
"\..$"results in smsp1ja1
"\.com"results in smsp1ja1.abc.mwa
"\.mwa\.com"results in smsp1ja1.abc
"\.abc\.mwa\.com"results in smsp1ja1
Another example of how to utilize this variable is when there is more than one domain name that needs to be truncated. For example, if the need is to:
Removing the foofy.com domain which in this example is our most common domain to be seen during discovery (99%). Say we need them to become:
aa01.wm.foofy.com -> aa01.wm
aa01.eg.foofy.com -> aa01.eg
Meanwhile, there is also a small number of domains that are in the domain of foofytech.com which is seen during discovery but is rare (<1%). Say we need these to become:
nocmgt02.noc.foofytech.com -> nocmgt02.noc
nocmgt.foofytech.com -> nocmgt
This presents a small challenge as you can only set the variable once, with one value. How do you get around this? With the - symbol. In this instance the variable would be set to:
NH_NAME_SRVC_PAT = "(\.foofy\.com)-(\.foofytech\.org)"
CAUTION: Contact Technical Support if you have difficulty setting this variable.
TEC513393 - How to Set or Change eHealth Environment Variables in Windows
TEC513391 - How to Set or Change eHealth Environment Variables in Solaris/Linux