Automation Engine Script Guide > Ordered by Function > System Conditions and Settings > SYS_HOST_ALIVE

SYS_HOST_ALIVE

Script Function: It checks whether a particular hostComputer, target system. is active.

Syntax

SYS_HOST_ALIVE(Host, [Connection])

Syntax

Description/Format

Host

The name of the agentA program that enables the de-centralized execution of processes (such as deployments) on target systems (computers or business solutions) or a service that provides connectivity to a target system (such as for databases or middleware). An agent is also an object type in the Automation Engine. [Formerly called "Executor."] See also: host whose activityAn activity (or task) is an entity that can be planned, assigned to a user or a team and tracked with respect to their plan and state (started, cancelled, suspended, completed). should be checked.
Format: AE name or script variable

Connection

The name of an R3 or DB-type Connection objectAutomation Engine controlled activities and processes are structured in the form of objects. See also: Task that should be used to verify the availability of the SAP system or the databaseA database is an organized collection of data including relevant data structures..
Format: AE name or script variableA placeholder for a value within a script. 

In SAP, you must enter the Connection object that you have defined in the Agent object's Agent tab.

The parameter Host is optional when you specify a DB-type Connection object.

To use this parameter, you must specify either an SAP agent or a database agent in Host. The system will not check whether the database agent has started in order to resolve SQL variables.


Return codes

A host has been specified:

"Y" - The agent is active.
"N" - The agent is inactive.

A host plus a Connection object have been specified:

"Y" - The agent is active and the SAP system or the database is available.
"N" - The agent is active but it cannot establish a connection to the SAP system or to the database.
"?" - The agent is not active. It cannot be identified whether or not the SAP system or the database is available.

Comments

OS Agents 

The scriptA particular Automation Engine object type. functionPre-defined run book template in the Automation Engine. One single step only, e.g. Start Windows Service, Copy file,… checks whether the agent is active. You cannot specify the parameter Connection.

ERP Agents

ERP agent Peoplesoft, OracleApplications and Siebel: The value "N" is supplied when the agent is active but the Enterprise Business Solution is not available.

SAP agents: There are two options. You can only specify the parameter Host in order to check whether the SAP agent is active. To check whether the SAP system is available, you can additionally specify the corresponding SAP Connection object. 

Note that the SAP agent will open some connections only if they are required (HTTP) or terminate them automatically if they have not been used for a certain time (ABAP). A new connection will be established if there is no connection to the SAP system when you use SYS_HOST_ALIVE in order to check whether the SAP system is available. In this context, the following notes are important: 

Database Agent 

As in SAP, you can either specify only the agent, or a Connection object (type DB) in addition. If you specify a Connection object, you can also check the availability of the particular database.

Examples

The following example checks whether the Windows agent WIN21 is active. A message is sent to the administrator when it is inactive.

:IF SYS_HOST_ALIVE("WIN21") = "N"
:   
SEND_MSG "ADMIN","AE","Agent WIN21 is not active!"
:
ENDIF

The second example checks whether the SAP system is available for the agent SAP01.

:SET &STATUS# = SYS_HOST_ALIVE("SAP01", "CONN.R3.ECCAbbreviation for the Enterprise Control Center.ABAP")

 

See also:

Script element Description

SYS_ACT_HOST

Returns the name of the host.

Script Elements - System Conditions and Settings

Sample Collection:
Display with Cockpit

About Scripts
Script Elements - Alphabetical Listing

Script Elements - Ordered by Function

 


Automic Documentation - Tutorials - Automic Blog - Resources - Training & Services - Automic YouTube Channel - Download Center - Support

Copyright © 2016 Automic Software GmbH