Benoit Crestey
ServiceNow Employee
ServiceNow Employee

Use case

Some customers own non-English Windows Servers, like Windows localized in French language. In this case, ServiceNow Discovery can have troubles to discover servers, because the output responded by some commands could be localized.

Sadly, ServiceNow doesn’t support non-English Servers.

This article contains guidelines to support French. It is possibly not complete, but you can use it as a first step adapt it to support other languages: Same issues happens on German and Japanese Operating systems.

Note: if MID Server Operating System is not in English, it will also have an impact on all UNIX servers discoveries, because of the resolution of DNS name using “nslookup” command, So it is recommanded to apply the first modification "Modification 1".

 

Problem

Example: in Windows Pattern, DNS library first step uses the command nslookup.

Example of nslookup command on a French Windows version

C:\>nslookup 216.58.213.174
Serveur :   livebox.home
Address:  192.168.1.1

Nom :    par21s04-in-f14.1e100.ne
Address:  216.58.213.174

Example of nslookup command on a english Windows version

C:\>nslookup 216.58.213.174
Server:   livebox.home
Address:  192.168.1.1

Name:    par21s04-in-f14.1e100.ne
Address:  216.58.213.174

Pattern step that fails:

find_real_file.png

As you can see, only the lines containing “Name:” are included. On a French server, “Nom :” will be returned, so the value won’t be parsed, result will be null.

There is no option or parameter in Windows to force a command to be answered in English. Windows Binaries are compiled with the OS language.

 

Solution

It is possible to customize the patterns to modify or add steps to parse non-English responses. I advise to do it as additional steps, to keep English and non-English compatibility. Indeed, most customer will have Operating system in different languages.

 

List of identified modifications:

Modification

Library

 Command

Modification 1

DNS library

nslookup command

Modification 2

Get Data Set By Windows – Classify library

nbstat command

Modification 3

Get Data Set By Windows – Classify library

Extraction of domain name

Modification 4

Windows – Network library

Status of interfaces

 

Please find attached an update set tested on Paris release (Patch 1).

 

Modification 1: DNS library: nslookup command

  • Addition of step 1.2 to parse french result, only if previous step failed
    • Copy of step 1.1, with modifications

 

find_real_file.png

 

 

Modification 2: Get Data Set By Windows – Classify library: nbstat command

  • Modification of step 2.43 to exclude lines containing noeud
  • Addition of step 2.44 to parse french nbstat result in previous step failed
    • Copy of step 2.43, with modifications

 

 find_real_file.png

 

find_real_file.png

 

 

Modification 3: Get Data Set By Windows – Classify library: extraction of domain name

  • Addition of step 2.48 to parse french results if previous step failed
    • Copy of step 2.7, with modifications

 

var rtrn = '';var matches = /\s+(.*?)\s+(?:<.*>)\s+Groupe/.exec(${nbt_data[1].nbt_adapter_data});rtrn = matches?matches[1]:'';

 

find_real_file.png

 

Modification 4: Windows – Network library: Status of network interfaces

  • Addition of step 21.4 to parse values Vrai/Faux instead of True/false
    • Copy of step 21.3, with script modifications

 

EVAL(javascript: rtrn = "";var data = ${Win32_NetworkAdapterConfiguration[].DHCPEnabled};rtrn = data;if (data == "Vrai"){  rtrn = "true";}if (data == "Faux"){  rtrn = "false";})

 

EVAL(javascript: rtrn = "";var data = ${Win32_NetworkAdapterConfiguration[].IPEnabled};rtrn = data;if (data == "Vrai"){  rtrn = "true";}if (data == "Faux"){  rtrn = "false";})

 find_real_file.png

 

 Good luck !

Comments
Stef R
Tera Contributor

Thanks for this precise documentation.

Version history
Last update:
‎12-07-2020 06:07 AM
Updated by: