Script Function: It checks whether a particular hostComputer, target system. is active.
SYS_HOST_ALIVE(Host, [Connection])
Return codes |
---|
A host has been specified: "Y" - The agent is active. A host plus a Connection object have been specified: "Y" - The agent is active and the SAP system or the database is available.
|
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.
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 |
---|---|
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 |