Top
Systemwalker Runbook Automation Reference Guide
Systemwalker

3.7.3 Check that service has started

Description

This operation component confirms whether a service is running.

This operation component can be used to check that the service has started after the server has started.

Options

Basic Options

(1) hostname

Target host name or IP address where the operation component will be executed.

To execute the operation component on the Management Server, specify the following:

  • For IPv4: 'localhost' or '127.0.0.1'

  • For IPv6: 'localhost' or '::1'

An argument error occurs if the host name or IP address is omitted.

The maximum length of the host name or IP address is 1,024 characters. An argument error occurs if this is exceeded.

(2) service

Name of the service whose start status is to be confirmed. Specify the service name of windows.

Multiple service names can be specified.

An argument error occurs if the service name is omitted.

The maximum number of service names that can be specified is 100. An argument error occurs if this is exceeded.

The specification is in CSV format. Refer to "3.17 Notes on Specifying Multiple Input Parameters" for examples of multiple specifications.

Specify service name to confirm the start status as follows:

Example: Dhcp

Example: Dhcp,EventLog

Advanced Options

(1) ostype

Operating system of the host executing the operation component.

Specify Windows. This option is not case sensitive.

If the OS type is omitted, the Configuration Management Database (CMDB) will be searched based on the specified host name or IP address, and Systemwalker Runbook Automation automatically sets the acquired OS type as the value.

The maximum length of the OS type is 1,024 characters. An argument error occurs if this is exceeded.

(2) username

Name of the user connecting with SSH to the host executing the operation component.

If the connected user name and password required for connection are not specified, the Configuration Management Database (CMDB) is searched based on the specified host name or IP address and Systemwalker Runbook Automation automatically sets the acquired connected user name as the value.

If the operation component connects with the file transfer infrastructure, the connected user name will be fixed at either of the following names and cannot be changed. In this case, the user name is ignored even if specified.

  • If the Business Server is running on Windows: SYSTEM user

The maximum length of the connected user name is 1,024 characters. Argument error occurs if this is exceeded.

(3) password

Password of the user connecting with SSH to the host executing the operation component.

If the connected user name and password required for connection are not specified, the Configuration Management Database (CMDB) is searched based on the specified host name or IP address and Systemwalker Runbook Automation automatically sets the acquired connected user name as the value.

If it connects with file transfer infrastructure, the connected user password is invalid.

The maximum length of the connected user password is 1,024 characters. Argument error occurs if this is exceeded.

(4) timeout

This is the completion timeout (seconds) for the execution of operation components.

Values between 300 and 86400 (1 day) can be specified.

For example: When timeout is to occur every 10 minutes: 600

When the execution of the operation components is not completed even if the specified time passes, the processing of the operation components is interrupted in return value 201.

(5) retry

This is the retry count for the execution of operation components.

When the operation components end in return value 161, the retry count is specified. Values between 0 and 5 can be specified.

As a result of retrying, if the operation components ended by the return values other than 161, the execution of the operation components ends even if it doesn't reach the specified retry count. The return values of the operation components become the value executed at the end.

For example: When retries are to be performed twice: 2

(6) retry_interval

This is the retry interval (seconds) for operation components.

When the operation components end in return value 161, the retry interval is specified. Values between 1 and 14400 can be specified.

For example: When retrying in 300 seconds: 300


If the specification of the timeout, retry and retry_interval is omitted, and a value beyond the limits of the above-mentioned is input, the value specified with the operation components definition file becomes effective. Refer to "2.5 Definition File for Operation Components" for details.

Return Values

Icon

Name

Return value

Description

Running

0

The service is running.

Stop

161

The service has stopped. Retried if a retry count has been specified.

Failure

179

Failed to find the service.

187

Authentication failed when an attempt was made to connect to the Business Server over the network (using SSH).

Alternatively, an error occurred during the processing of communications with the Business Server (file transfer infrastructure). In this case, the error code for the file transfer infrastructure is output to the execution results. Refer to "3.21 Detailed Code of File Transfer Infrastructure" for information on error codes

188

When an operation component was performing an operation on a Business Server where an RBA Agent has not been installed, the network communications (SSH) with the Business Server was closed.

189

An attempt to connect to the Business Server over the network (using SSH) failed.

Alternatively, an error occurred during the processing of communications with the Business Server (file transfer infrastructure). In this case, the error code for the file transfer infrastructure is output to the execution results. Refer to "3.21 Detailed Code of File Transfer Infrastructure" for information on error codes.

197

There is an error in the input information.

200

Failed to confirm start status of service.

-

-

201

Execution of operation component timed out.

202

The operation component was not executed. There is a problem in the setting to execute operation components.

203

Failed to execute the operation component. There is a problem in the Operation Automation Server environment.

205

The operation component was not executed. There is a problem with the input information specification of the operation component.

206

The operation component was not executed normally. There is a problem with the output information specification of the operation component.

207

The operation components were not executed. There is a possibility that the operation components are not registered in the Management Server.

208

The Automated Operation Process has been canceled because the Automated Operation Process was recovered while the operation component was executing.

Output information

Variable

Description

message

  • If a single service name has been specified for the "service" option:

    This variable is set to one of the following strings according to the status of the service.

    • If the service is determined to be running: "Run"

    • If the service is determined to be not running: "Stop"

    • If the service does not exist: "None"

    If an attempt to check whether the service is running fails, the content of the error will be output as a string.

  • If multiple service names have been specified for the "service" option:

    If all services have been successfully verified as running, this variable will be set to the string "Run".

    If some or all services could not be verified as running, information for the services that could not be verified as running will be output using the same format as for the "service_start_check_result" variable.

service_start_check_result

This variable is set to the result of executing the check on the specified service.

returnCode

This variable is set to the return value.

The output format for the "service_start_check_result" variable is as follows:

[service],[return value],[output data],[message]

For [output data], nothing will be output.

For [message], one of the following will be output..

<Example>

If "service1, service2, service3" is specified for the "service" option, and service2 and service3 have not been verified as running

[Standard output]

"service",Return_code,"OutputStandard_output","MessageStandard_error"
"service1",0,"","Run"
"service2",161,"","Stop"
"service3",179,"","None"

If all services have been successfully verified as running, the string "Run" will be output to the standard error output.

If some or all services could not be verified as running, information for the services that could not be verified as running will be output using the same format as for the standard output.

In the example above, the following will be output to the "message" variable.

<Example>

"service",Return_code,"Output","Message"
"service2",161,"","Stop"
"service3",179,"","None"

Notes