Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Reference


2.10.3 Get Lists of Users from Multiple Servers(SYSTEM)

Function

This service template acquires a list of Windows/UNIX users and, as a batch, a server list from a CSV file.

This service template assumes that the following servers are being used.

• Windows servers

• UNIX servers

The following tasks are performed.

(1) A list of Windows/UNIX servers is acquired from the specified column in the CSV file. State the column name in the first line of the CSV file. State the data in the 2nd through 100th lines. At least one column must state the host name or IP address.

(Example 1)

Host name

hostVM001

hostVM002

(Example 2)

Host name, comment

hostVM001,#Comment1

hostVM002,#Comment2

"172.16.254.7",#Comment3

(2) No more than 99 host names or IP addresses can be stated in a CSV file and the total character string length of host names or IP addresses + the host count cannot exceed 1,017 characters.

(3) The fields read are checked for the following conditions. If any of these conditions are met, the task fails.

(a) Do any fields exceed 1024 in character string length?

(b) Do any fields contain the following special characters?

, < > | ; & * ? ` % or a double quote (") not at an end of a field, or a backslash (\) at the end of a field

(c) Does any field contain a control character (0x00 through 0x1f)?

(4) An OS user list is output in text format to the specified file for each Windows/UNIX server. The name of the file is OS_Users_XXXX. Here, XXXX specifies the host name or IP address as stated in the string specified in the CSV file. For Windows, the output format of the file is the same as the output result of the net user command.

(5) The OS user list file is transferred to the folder specified by the local server. The transfer source file on the Windows/UNIX server is deleted.

If reading an CSV fails, wait for the seconds specified in the OS.fileOpenRetryInterval property, and then repeat the number of times specified in the OS.fileOpenRetryCount property to retry for reading a file. If necessary, modify the property values to adjust your system environment.

Prerequisites

For the latest support information about [Required product for the system]/[Required products for the service template execution system]/[Prerequisite product OS running for the Windows/UNIX server in the system executing the service template], see the release notes.

[Required product in the System]

JP1/Automatic Operation 12-00 or later

[Required products for the service template execution system]

None.

[OS running for the Windows/UNIX server in the system executing the service template]

(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)

(7) Red Hat Enterprise Linux Server 8 (64-bit x86_64)

(8) CentOS 6 (64-bit x86_64)

(9) CentOS 7 (64-bit x86_64)

(10) CentOS 8 (64-bit x86_64)

(11) Oracle Linux 8 (64-bit x86_64)

(12) AIX V6

(13) AIX V7

[Usage conditions for prerequisite products in the system]

None.

[Usage conditions of prerequisite products in the system executing the service template]

None.

Cautions

[Notes on CSV files]

- Notes when the local server is running in a Windows environment

(1) IP addresses in the CSV file must be enclosed in double quotation marks.

(2) Due to ODBC driver restrictions, the following characters cannot be used in CSV file names: [ ] ! `

(3) When counting rows in the file to be read, empty rows after the first non-empty row and before the last non-empty row are counted as ordinary rows. Even if the number of rows containing data is 99 or less, if the total number of rows including empty rows is 100 or more, the task terminates abnormally.

- Notes when the local server is running in a UNIX environment

(1) When counting rows in the file to be read, empty rows after the first non-empty row and before the last non-empty row are counted as ordinary rows. Even if the number of rows containing data is 99 or less, if the total number of rows including empty rows is 100 or more, the task terminates abnormally.

(2) Commas (,) cannot be used in data. If you attempt to use commas in data, columns cannot be separated correctly, making it impossible to acquire data.

(3) Any number of single-byte spaces or tab characters at the beginning or end of a row in the CSV file are ignored.

[Other notes]

(1) In order to execute this service, the local server (loopback address resolved by localhost) and the server acquiring the list of OS users must be set as agentless connection destinations.

(2) If the OS of the server acquiring the list of OS users is UNIX, do not use multibyte characters in properties.

(3) If you specify multibyte characters and the OS of the server acquiring the list of OS users is Windows, specify a value for the Windows output folder (remote) property that is no longer than 248 bytes.

(4) If you specify multibyte characters, specify a value for the output folder name (local) property that is no longer than 256 bytes.

(5) Specify an integer value of 255 or less for the column number of the reading target file. Note that blank columns between data rows are also included in the number of columns.

(6) When the folder names specified as remote and local already exist, the existing folders are overwritten. Also, when there is a file by the same name in the folder, it too is overwritten. For this reason, exercise sufficient caution that folder names are specified correctly.

(7) If there is no folder at the path specified as remote, the folder is created. The created folder is left undeleted. If it is not used periodically, delete it.

Execution privilege

Users who belong to the Administrator group

Version

03.10.00

Tags

Gather OS information,Linux,Windows,AIX

Property list

The following shows the list of the properties to be displayed in the "Service Definition" window:

(Legend)

R: The property must be specified.

O: The property can be omitted. However, the property might be mandatory depending on what is specified for other properties. See the Description of each property.

Property key

Property name

Description

I/O type

Shared

Required

OS.fileOpenRetryCount

Retry count for reading a file: Windows specific

Specifies the number of times to retry when reading a file fails (only applicable to Windows). This value multiplied by the retry interval gives the maximum waiting time. If "0" is specified, a retry is not performed.

Input

Disabled

R

OS.fileOpenRetryInterval

Retry interval for reading a file: Windows specific

Specifies the retry interval in seconds for when reading a file fails (only applicable to Windows).

Input

Disabled

R

The following shows the list of the properties to be displayed on the "Service Definition" window and the "Submit Service" window:

Property key

Property name

Description

I/O type

Shared

Required

OS.excelFileName

CSV file name (local)

Specifies the full path name of the CSV file where the list of servers is managed.

Input

Disabled

R

OS.Column1

Column number for the server names

Specifies the column number in the CSV file as a number from 1 through 255.

Input

Disabled

R

OS.userType

OS user type

Specify "local" or "domain" as the OS user type. This property only takes effect when the server acquiring the list of OS users is running Windows.

Input

Disabled

O

OS.listOutputFolderNameRemote_Windows

Output folder for Windows (remote)

Specifies the full path of the folder on the Windows server where the list of OS users is output. The remote file is deleted after the transfer. The output folder must be specified if the servers where the user list is acquired include a Windows server.

Input

Disabled

O

OS.listOutputDirectoryNameRemote_Linux

Output directory for UNIX (remote)

Specifies the full path of the folder on the UNIX server where the list of OS users is output. The remote file is deleted after the transfer. The output folder must be specified if the servers where the user list is acquired include a UNIX server.

Input

Disabled

O

OS.listOutputFolderNameLocal

Output folder name (local)

Specifies the full path name of the file where the list of OS users is output.

Input

Disabled

R

The following shows the list of the properties to be displayed in the "Task Details" window only:

Property key

Property name

Description

I/O type

Shared

common.taskResult

Results of repeating tasks

This property contains the results of each task (as "true" or "false"), in a comma-delimited format.

Output

Disabled

The following shows the restrictions on inputs to the properties displayed in the "Service Definition" window:

Property key

Characters that can be input

OS.fileOpenRetryCount

Integer value in the range from 0 to 32767.

OS.fileOpenRetryInterval

Integer value in the range from 1 to 60.

The following shows the restrictions on inputs to the property displayed on the "Service Definition" window and the "Submit Service" window:

Property key

Characters that can be input

OS.excelFileName

A character string of no more than 256 characters can be entered. It cannot include <, >, |, ;, &, *, ?, ", %, or a trailing \.

OS.Column1

Only numbers can be entered.

OS.userType

Select one of the following values:

local,domain

OS.listOutputFolderNameRemote_Windows

A character string of no more than 248 characters can be entered. It cannot include <, >, |, ;, &, *, ?, ", %, or a trailing \.

OS.listOutputDirectoryNameRemote_Linux

A character string of no more than 256 characters can be entered. It cannot include <, >, |, ;, &, *, ?, ", %, `, or a trailing \.

OS.listOutputFolderNameLocal

A character string of no more than 248 characters can be entered. It cannot include <, >, |, ;, &, *, ?, ", %, or a trailing \.

Flow specification details

The following table shows the detailed specification of the flow:

Hierarchy

Display name

Plug-in

Plug-in name

Description

Error recovery method

1

osGetOsInfo

Output OS type

Outputs the OS of the local server.

Eliminate the cause of the error, and then re-execute the service.

2

osReadCSVExcelFileColumn_Syste

Get CSV data(SYSTEM)

Acquires a list of host names or IP addresses of Windows or UNIX servers from a CSV file.

Eliminate the cause of the error, and then re-execute the service.

3

osShowUsersAllLoop

Repeated-execution plug-in

Acquires lists of OS users iteratively from the acquired host names.

Eliminate the cause of the error, and then re-execute the service.