4.13.35 Get host name
Function
Acquires the host name of the server that corresponds to a specified IP address, based on information registered in the target server.
The following types of host names are obtained:
(1) Host name resolved from an IP address
(2) Host name in short name format, which does not include a domain name (if the host name in (1) includes a domain name)
(For a host name that does not include a domain name, a name in the same format as (1) is obtained.)
This plugin assumes the following servers:
• Execution target server
This server executes the plugin, queries the DNS server, and retrieves information in the hosts file.
• Retrieval target server
This is the server whose host name is to be acquired from the IP address
If a DNS server is registered on the execution target server, the plugin queries the DNS server about the host name of the retrieval target server. If the query to the DNS server fails, the plugin acquires the host name of the retrieval target server from the hosts file on the execution target server.
Use situation
This plugin enables you to reduce the number of input properties in a service template that requires the IP address and host name of the target server.
Prerequisites
For the latest support information about [Required product in the System]/[Required products on the execution target server]/[OS running in the execution target server], see the release notes.
[Required product in the System]
(1) JP1/Automatic Operation 11-00 or later
[Required products on the execution target server]
None.
[OS running in the execution target server]
(1) Windows Server 2008 R2 Standard/Enterprise/Datacenter
(2) Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Datacenter
(3) Windows Server 2016 Standard/Datacenter
(4) Windows Server 2019 Standard/Datacenter
(5) Red Hat Enterprise Linux Server 6 (32-bit x86), Red Hat Enterprise Linux Server 6 (64-bit x86_64)
(6) Red Hat Enterprise Linux Server 7 (64-bit x86_64)
The bind-utils package must be installed.
(7) Red Hat Enterprise Linux Server 8 (64-bit x86_64)
The bind-utils package must be installed.
(8) CentOS 6 (64-bit x86_64)
(9) CentOS 7 (64-bit x86_64)
The bind-utils package must be installed.
(10) CentOS 8 (64-bit x86_64)
The bind-utils package must be installed.
(11) Oracle Linux 8 (64-bit x86_64)
The bind-utils package must be installed.
[Usage conditions for required products on the execution target server]
(1) The IP address and host name of the target server must be defined in the execution target system's DNS or target server's hosts file.
Cautions
(1) IPv6 cannot be specified as the IP address for the target server.
Version
02.00.00
Plug-in tags
Gather OS information,Windows,Linux
Plug-in name displayed in the task log
osGetHostName
Return code
0: Normal
27: Error (check task logs for the nature of error)
41: Error (error detected in plugin) Missing property (error detected in plugin script)
Property list
The following table lists the properties:
Property key |
Property name |
Description |
Default value |
I/O type |
Required |
---|---|---|---|---|---|
OS.targetIPAddress |
IP address of the search-target server |
Specify the IP address of the search-target server. IPv6 addresses are not supported. |
-- |
Input |
R |
plugin.destinationHost |
Host name of the execution target server |
Specify the host name or IP address of the server on which this plugin will be executed. IPv6 addresses are not supported. |
-- |
Input |
R |
common.returnValue |
Return value for the plugin |
The return value of this plugin stored. |
-- |
Output |
O |
OS.host2Ipaddr |
Host name of the search-target server |
The host name is set for the IP address of the specified search-target server. |
-- |
Output |
O |
OS.shortHostName |
Host name of the server being searched for (short name format) |
Sets the host name in short name format for the IP address of the specified server being searched for. |
-- |
Output |
O |