MIDServer - グローバル
MIDServer スクリプトインクルードは、MID サーバーの概念をカプセル化するメソッドを提供します。
Ajax を使用して MID サーバー を管理するには、サーバースクリプトでこれらのメソッドを使用します。
MIDServer - getByName(文字列 name)
指定された MID サーバーを返します。
| 名前 | タイプ | 説明 |
|---|---|---|
| name | 文字列 | MID サーバーの名前 |
| タイプ | 説明 |
|---|---|
| GlideRecord | 要求された MID サーバーのレコード。 |
次の例は、MID サーバーの詳細にアクセスして表示する方法を示します。
// Get a mid server object by name
var ms = MIDServer.getByName("windows_mid");
// Stringify the object for display purposes
gs.info(JSON.stringify(ms, null, 2));
// Show the value of each API property
gs.info('hostmane ' + ms.hostname);
gs.info('hostOS ' + ms.hostOS);
gs.info('ip ' + ms.ip);
gs.info('name ' + ms.name);
gs.info('routerIP ' + ms.routerIP);
gs.info('status ' + ms.status);
gs.info('sysID ' + ms.sysID);
gs.info('url ' + ms.url);
gs.info('version ' + ms.version);
gs.info('windowsDomain ' + ms.windowsDomain);
出力:
*** Script: {
"valid": true,
"sysID": "3cb25f0f874b3410c3a99999cebb35ba",
"name": "windows_mid",
"url": null,
"hostname": "myHostname.service-now.com",
"hostOS": "Windows",
"version": "fixed",
"ip": "10.11.128.184",
"routerIP": "10.11.128.1",
"network": "10.11.128.0/22",
"windowsDomain": null,
"status": "Up",
"validated": "true",
"userName": "MID_Profile"
}
*** Script: hostname myHostname.service-now.com
*** Script: hostOS Windows
*** Script: ip 10.11.128.184
*** Script: name windows_mid
*** Script: routerIP 10.11.128.1
*** Script: status Up
*** Script: sysID 3cb25f0f874b3410c3a99999cebb35ba
*** Script: url null
*** Script: version fixed
*** Script: windowsDomain null
MIDServer - getDefault(DiscoverySchedule schedule)
指定されたスケジュールに関連付けられている MID Server (同じ名前の MID Server) を返します。関連付けられた MID サーバーがない場合は、ecc_agent テーブル内で次にある MID サーバーを取得します。
| 名前 | タイプ | 説明 |
|---|---|---|
| schedule | DiscoverySchedule | 検出スケジュール |
| タイプ | 説明 |
|---|---|
| GlideRecord | MID サーバー |
MIDServer - getForPing(DiscoverySchedule schedule, DiscoveryRange range)
指定されたスケジュールと範囲が設定された MID サーバーを返します。
| 名前 | タイプ | 説明 |
|---|---|---|
| schedule | DiscoverySchedule | 検出スケジュール |
| range | DiscoveryRange | 検出範囲セット |
| タイプ | 説明 |
|---|---|
| GlideRecord | MID サーバー |
MIDServer - hostname
MID サーバーのホストの名前。
| 名前 | タイプ | 説明 |
|---|---|---|
| hostname | 文字列 | MID サーバーのホストの名前。 |
次の例は、使用可能な MID サーバーのすべてのパラメーターを実行して返す方法を示しています。
var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
\nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " + midServerStatus +
"\nMID Server SYS ID - " + midServerSysID + "\nMID Server URL - " + midServerURL + "\nMID Server Version - " + midServerVersion +
"\nMID Server Windows Domain - " + midServerwindowsDomain);
出力:
MID Server Host Name - midSvrName.service-now.com
Mid Server Host OS - Windows
MID Server IP - 10.11.999.999
MID Server Name - Windows MID
MID Server Router IP - 10.11.111.1
MID Server Status - Up
MID Server SYS ID - <mid_sys_id>
MID Server URL - null
MID Server Version - fixed
MID Server Windows Domain - null
MIDServer - hostOS
MID サーバーのホストのオペレーティングシステム。
| 名前 | タイプ | 説明 |
|---|---|---|
| hostOS | 文字列 | MID サーバーのホストのオペレーティングシステム。 |
次の例は、使用可能な MID サーバーのすべてのパラメーターを実行して返す方法を示しています。
var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
\nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " + midServerStatus +
"\nMID Server SYS ID - " + midServerSysID + "\nMID Server URL - " + midServerURL + "\nMID Server Version - " + midServerVersion +
"\nMID Server Windows Domain - " + midServerwindowsDomain);
出力:
MID Server Host Name - midSvrName.service-now.com
Mid Server Host OS - Windows
MID Server IP - 10.11.999.999
MID Server Name - Windows MID
MID Server Router IP - 10.11.111.1
MID Server Status - Up
MID Server SYS ID - <mid_sys_id>
MID Server URL - null
MID Server Version - fixed
MID Server Windows Domain - null
MIDServer - ip
MID サーバーのホストの IP アドレス。
| 名前 | タイプ | 説明 |
|---|---|---|
| ip | 文字列 | MID サーバーのホストの IP アドレス。 |
次の例は、使用可能な MID サーバーのすべてのパラメーターを実行して返す方法を示しています。
var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
\nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " + midServerStatus +
"\nMID Server SYS ID - " + midServerSysID + "\nMID Server URL - " + midServerURL + "\nMID Server Version - " + midServerVersion +
"\nMID Server Windows Domain - " + midServerwindowsDomain);
出力:
MID Server Host Name - midSvrName.service-now.com
Mid Server Host OS - Windows
MID Server IP - 10.11.999.999
MID Server Name - Windows MID
MID Server Router IP - 10.11.111.1
MID Server Status - Up
MID Server SYS ID - <mid_sys_id>
MID Server URL - null
MID Server Version - fixed
MID Server Windows Domain - null
MIDServer - name
MID サーバーの名前。
| 名前 | タイプ | 説明 |
|---|---|---|
| name | 文字列 | MID サーバーの名前 |
次の例は、使用可能な MID サーバーのすべてのパラメーターを実行して返す方法を示しています。
var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
\nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " + midServerStatus +
"\nMID Server SYS ID - " + midServerSysID + "\nMID Server URL - " + midServerURL + "\nMID Server Version - " + midServerVersion +
"\nMID Server Windows Domain - " + midServerwindowsDomain);
出力:
MID Server Host Name - midSvrName.service-now.com
Mid Server Host OS - Windows
MID Server IP - 10.11.999.999
MID Server Name - Windows MID
MID Server Router IP - 10.11.111.1
MID Server Status - Up
MID Server SYS ID - <mid_sys_id>
MID Server URL - null
MID Server Version - fixed
MID Server Windows Domain - null
MIDServer - network
MID サーバーのホストがあるネットワーク。
| 名前 | タイプ | 説明 |
|---|---|---|
| ネットワーク | 文字列 | MID サーバーのホストがあるネットワーク。「10.10.10.0/24」や「10.10.10.0/255.255.255.0」など。 |
次の例は、使用可能な MID サーバーのすべてのパラメーターを実行して返す方法を示しています。
var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
\nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " + midServerStatus +
"\nMID Server SYS ID - " + midServerSysID + "\nMID Server URL - " + midServerURL + "\nMID Server Version - " + midServerVersion +
"\nMID Server Windows Domain - " + midServerwindowsDomain);
出力:
MID Server Host Name - midSvrName.service-now.com
Mid Server Host OS - Windows
MID Server IP - 10.11.999.999
MID Server Name - Windows MID
MID Server Router IP - 10.11.111.1
MID Server Status - Up
MID Server SYS ID - <mid_sys_id>
MID Server URL - null
MID Server Version - fixed
MID Server Windows Domain - null
MIDServer - routerIP
MID Server ホストのデフォルトルーターの IP アドレス。
| 名前 | タイプ | 説明 |
|---|---|---|
| routerIP | 文字列 | MID Server ホストのデフォルトルーターの IP アドレス。 |
次の例は、使用可能な MID サーバーのすべてのパラメーターを実行して返す方法を示しています。
var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
\nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " + midServerStatus +
"\nMID Server SYS ID - " + midServerSysID + "\nMID Server URL - " + midServerURL + "\nMID Server Version - " + midServerVersion +
"\nMID Server Windows Domain - " + midServerwindowsDomain);
出力:
MID Server Host Name - midSvrName.service-now.com
Mid Server Host OS - Windows
MID Server IP - 10.11.999.999
MID Server Name - Windows MID
MID Server Router IP - 10.11.111.1
MID Server Status - Up
MID Server SYS ID - <mid_sys_id>
MID Server URL - null
MID Server Version - fixed
MID Server Windows Domain - null
MIDServer - status
MID サーバーのステータス (「稼働中」か「ダウン」か)。
| 名前 | タイプ | 説明 |
|---|---|---|
| status | 文字列 | MID サーバーのステータス (「稼働中」か「ダウン」か)。 |
次の例は、使用可能な MID サーバーのすべてのパラメーターを実行して返す方法を示しています。
var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
\nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " + midServerStatus +
"\nMID Server SYS ID - " + midServerSysID + "\nMID Server URL - " + midServerURL + "\nMID Server Version - " + midServerVersion +
"\nMID Server Windows Domain - " + midServerwindowsDomain);
出力:
MID Server Host Name - midSvrName.service-now.com
Mid Server Host OS - Windows
MID Server IP - 10.11.999.999
MID Server Name - Windows MID
MID Server Router IP - 10.11.111.1
MID Server Status - Up
MID Server SYS ID - <mid_sys_id>
MID Server URL - null
MID Server Version - fixed
MID Server Windows Domain - null
MIDServer - sysID
MID Server レコードの sys_id。
| 名前 | タイプ | 説明 |
|---|---|---|
| sysID | 文字列 | MID Server レコードの sys_id。 |
次の例は、使用可能な MID サーバーのすべてのパラメーターを実行して返す方法を示しています。
var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
\nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " + midServerStatus +
"\nMID Server SYS ID - " + midServerSysID + "\nMID Server URL - " + midServerURL + "\nMID Server Version - " + midServerVersion +
"\nMID Server Windows Domain - " + midServerwindowsDomain);
出力:
MID Server Host Name - midSvrName.service-now.com
Mid Server Host OS - Windows
MID Server IP - 10.11.999.999
MID Server Name - Windows MID
MID Server Router IP - 10.11.111.1
MID Server Status - Up
MID Server SYS ID - <mid_sys_id>
MID Server URL - null
MID Server Version - fixed
MID Server Windows Domain - null
MIDServer - url
MID サーバーがインスタンスに接続するために使用する URL。
| 名前 | タイプ | 説明 |
|---|---|---|
| url | 文字列 | MID サーバーがインスタンスに接続するために使用する URL。 |
次の例は、使用可能な MID サーバーのすべてのパラメーターを実行して返す方法を示しています。
var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
\nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " + midServerStatus +
"\nMID Server SYS ID - " + midServerSysID + "\nMID Server URL - " + midServerURL + "\nMID Server Version - " + midServerVersion +
"\nMID Server Windows Domain - " + midServerwindowsDomain);
出力:
MID Server Host Name - midSvrName.service-now.com
Mid Server Host OS - Windows
MID Server IP - 10.11.999.999
MID Server Name - Windows MID
MID Server Router IP - 10.11.111.1
MID Server Status - Up
MID Server SYS ID - <mid_sys_id>
MID Server URL - null
MID Server Version - fixed
MID Server Windows Domain - null
MIDServer - version
MID サーバーのバージョン (WAR 名)。
| 名前 | タイプ | 説明 |
|---|---|---|
| version | 文字列 | MID サーバーのバージョン (WAR 名)。 |
次の例は、使用可能な MID サーバーのすべてのパラメーターを実行して返す方法を示しています。
var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
\nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " + midServerStatus +
"\nMID Server SYS ID - " + midServerSysID + "\nMID Server URL - " + midServerURL + "\nMID Server Version - " + midServerVersion +
"\nMID Server Windows Domain - " + midServerwindowsDomain);
出力:
MID Server Host Name - midSvrName.service-now.com
Mid Server Host OS - Windows
MID Server IP - 10.11.999.999
MID Server Name - Windows MID
MID Server Router IP - 10.11.111.1
MID Server Status - Up
MID Server SYS ID - <mid_sys_id>
MID Server URL - null
MID Server Version - fixed
MID Server Windows Domain - null
MIDServer - windowsDomain
MID サーバーのホストの Windows ドメイン (Windows マシンの場合)。
| 名前 | タイプ | 説明 |
|---|---|---|
| windowsDomain | 文字列 | MID サーバーのホストの Windows ドメイン。 |
次の例は、使用可能な MID サーバーのすべてのパラメーターを実行して返す方法を示しています。
var getMIDServerAttributes = new MIDServer(<mid_sys_id>); //Pass the sys id of the MID server record
var midServerHostname = getMIDServerAttributes.hostname; //would return the Host name of the MID Server Record
var midServerHostOS = getMIDServerAttributes.hostOS; // would return the Host OS of the MID Server Record
var midServerIP = getMIDServerAttributes.ip; //would return the IP of the MID Server Record
var midServerName = getMIDServerAttributes.name; //would return the Name of the MID Server Record
var midServerRouterIP = getMIDServerAttributes.routerIP; //would return the router IP of the MID Server Record
var midServerStatus = getMIDServerAttributes.status; //would return the status of the MID Server Record (UP or Down)
var midServerSysID = getMIDServerAttributes.sysID; // Would return the Sys ID of the MID server record
var midServerURL = getMIDServerAttributes.url; // Would return the URL of the MID server record
var midServerVersion = getMIDServerAttributes.version; // Would return ServiceNow release version of the MID server record
var midServerwindowsDomain = getMIDServerAttributes.windowsDomain; // Would return windows domain of the MID server record
gs.info("\nMID Server Host Name - "+ midServerHostname +"\nMid Server Host OS - " + midServerHostOS + "\nMID Server IP - "+ midServerIP + "
\nMID Server Name - " + midServerName + "\nMID Server Router IP - " + midServerRouterIP + "\nMID Server Status - " + midServerStatus +
"\nMID Server SYS ID - " + midServerSysID + "\nMID Server URL - " + midServerURL + "\nMID Server Version - " + midServerVersion +
"\nMID Server Windows Domain - " + midServerwindowsDomain);
出力:
MID Server Host Name - midSvrName.service-now.com
Mid Server Host OS - Windows
MID Server IP - 10.11.999.999
MID Server Name - Windows MID
MID Server Router IP - 10.11.111.1
MID Server Status - Up
MID Server SYS ID - <mid_sys_id>
MID Server URL - null
MID Server Version - fixed
MID Server Windows Domain - null