# Custom Check Macros

Custom Check Macros are placeholders replaced with values specific to the particular System the Custom Check is executed on. Using these Macros provides greater flexibility in Custom Check definition for multiple Systems.

| Please, check the list of Macros available for every Custom Check you select, for each Macro can be used on a specific Custom Check only.

%%BAS_REL%%
  Description

    The Basis release of an SAP System.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    SAP Instance, SAP System

%%BASE_DIR%%
  Description

    The installation directory of {avantra-agent}, i.e. `C:\Program Files (x86)\syslink\agent` on Microsoft Windows operating systems and `/syslink/agent/` on Unix-like operating systems. Also referred to as `[agent`basedir] in this section.

  You most likely need to set quotes while referencing this Macro.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Server, SAP Instance, SAP System, Database

%%BIN_DIR%%
  Description

    The bin directory of {avantra-agent}, i.e. `[agent`basedir]/bin.

  You most likely need to set quotes while referencing this Macro.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Server, SAP Instance, SAP System, Database

%%CFG_DIR%%
  Description

    The cfg directory of {avantra-agent}, i.e.`[agent`basedir]/cfg.

  You most likely need to set quotes while referencing this Macro.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Server, SAP Instance, SAP System, Database

%%CI_ID%%
  Description

    The internal ID of the Central SAP Instance.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    SAP System

%%CI_NAME%%
  Description

    The Central SAP Instance's name of an SAP System.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    SAP System

%%CI_SYSNO%%
  Description

    The system number of the Central SAP Instance.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    SAP System

%%DB_HOST%%
  Description

    The name of the Server monitoring the Database.

  If the Custom Check is executed for an SAP System this macro is only available if the Run Custom Check on DB Host of SAP System (instead of Central Instance Host) flag is set.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Database, SAP System

%%DB_ID%%
  Description

    The internal ID of a stand-alone Database.

  If the Custom Check is executed for an SAP System this macro is only available if the Run Custom Check on DB Host of SAP System (instead of Central Instance Host) flag is set.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Database, SAP System

%%DB_NAME%%
  Description

    The name of a Database.

  If the Custom Check is executed for an SAP System this macro is only available if the Run Custom Check on DB Host of SAP System (instead of Central Instance Host) flag is set.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Database, SAP System

%%DB_PASSWD%%
  Description

    The password corresponding to %%DB_USER%%.

  If the Custom Check is executed for an SAP System this macro is only available if the Run Custom Check on DB Host of SAP System (instead of Central Instance Host) flag is set.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Database, SAP System

%%DB_PASSWD2%%
  Description

    The password corresponding to %%DB_USER2%%.

  If the Custom Check is executed for an SAP System this macro is only available if the Run Custom Check on DB Host of SAP System (instead of Central Instance Host) flag is set.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Database, SAP System

%%DB_PASSWD_JAVA%%
  Description

    The password corresponding to %%DB_USER_JAVA%%.

  If the Custom Check is executed for an SAP System this macro is only available if the Run Custom Check on DB Host of SAP System (instead of Central Instance Host) flag is set.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Database, SAP System

%%DB_PORT%%
  Description

    The listening port of the Database.

  If the Custom Check is executed for an SAP System this macro is only available if the Run Custom Check on DB Host of SAP System (instead of Central Instance Host) flag is set.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Database, SAP System

%%DB_UNIFIED_NAME%%
  Description

    The unified Database name of a stand-alone Database.

  If the Custom Check is executed for an SAP System this macro is only available if the Run Custom Check on DB Host of SAP System (instead of Central Instance Host) flag is set.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Database, SAP System

%%DB_USER%%
  Description

    The user name used by the Avantra Agent to access the Database. For the Database instance of an SAP System it corresponds to the ABAP schema user.

  If the Custom Check is executed for an SAP System this macro is only available if the Run Custom Check on DB Host of SAP System (instead of Central Instance Host) flag is set.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Database, SAP System

%%DB_USER2%%
  Description

    The name of the administrative user of a MaxDB Database.

  If the Custom Check is executed for an SAP System this macro is only available if the Run Custom Check on DB Host of SAP System (instead of Central Instance Host) flag is set.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Database, SAP System

%%DB_USER_JAVA%%
  Description

    The user name used by the Avantra Agent to access the Java schema of a Database instance of an SAP System.

  If the Custom Check is executed for an SAP System this macro is only available if the Run Custom Check on DB Host of SAP System (instead of Central Instance Host) flag is set.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Database, SAP System

%%DBT%%
  Description

    The Database type of an SAP System.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    SAP Instance, SAP System

@@[env_var]@@
  Description

    Replaced by the environment variable `[env_var]`, if available. The environment variable `[env_var]` must be defined in the environment of the user running the Avantra Agent.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Server, SAP Instance, SAP System, Database

%%I_ID%%
  Description

    The (internal) ID of SAP Instances the Custom Check is executed for.

    - For a Custom Check defined for a Server, it is a list of values for all SAP Instances hosted on this Server. The list has no particular order, and it may be even empty if the Server is hosting no SAP Instance at all.

    - For a Custom Check defined for a SAP Instance, it is the value for that particular instance.

    - For a Custom Check defined for a SAP System, it is a list of values for all SAP Instances comprising the SAP System.

      This macro is only available if the Run Custom Check on DB Host of SAP System (instead of Central Instance Host) flag is not set.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Server, SAP Instance, SAP System

%%I_NAME%%
  Description

    The name of SAP Instances the Custom Check is executed for.

    - For a Custom Check defined for a Server, it is a list of values for all SAP Instances hosted on this Server. The list has no particular order, and it may be even empty if the Server is hosting no SAP Instance at all.

    - For a Custom Check defined for a SAP Instance, it is the value for that particular instance.

    - For a Custom Check defined for a SAP System, it is a list of values for all SAP Instances comprising the SAP System.

      This macro is only available if the Run Custom Check on DB Host of SAP System (instead of Central Instance Host) flag is not set.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Server, SAP Instance, SAP System

%%I_PATH%%
  Description

    Resolves to the instance path, e.g. `/usr/sap/C11/DVEBMGS00`.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    SAP Instance

%%I_SYSNR%%
  Description

    The system numbers of SAP Instances the Custom Check is executed for.

    - For a Custom Check defined for a Server, it is a list of values for all SAP Instances hosted on this Server. The list has no particular order, and it may be even empty if the Server is hosting no SAP Instance at all.

    - For a Custom Check defined for a SAP Instance, it is the value for that particular instance.

    - For a Custom Check defined for a SAP System, it is a list of values for all SAP Instances comprising the SAP System.

      This macro is only available if the Run Custom Check on DB Host of SAP System (instead of Central Instance Host) flag is not set.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Server, SAP Instance, SAP System

%%I_TYPE%%
  Description

    The type of SAP Instances the Custom Check is executed for.

    - For a Custom Check defined for a Server, it is a list of values for all SAP Instances hosted on this Server. The list has no particular order, and it may be even empty if the Server is hosting no SAP Instance at all.

    - For a Custom Check defined for a SAP Instance, it is the value for that particular instance.

    - For a Custom Check defined for a SAP System, it is a list of values for all SAP Instances comprising the SAP System.

      This macro is only available if the Run Custom Check on DB Host of SAP System (instead of Central Instance Host) flag is not set.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Server, SAP Instance, SAP System

%%J2EE_PWD%%
  Description

    The J2EE user password corresponding to the Macro to `%%J2EE_USR%%`.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    SAP Instance, SAP System

%%J2EE_USR%%
  Description

    The J2EE user name used by the Avantra Agent to access the SAP System.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    SAP Instance, SAP System

%%LOG_DIR%%
  Description

    The log directory of {avantra-agent}, i.e. `[agent`basedir]/log.

  You most likely need to set quotes while referencing this Macro.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Server, SAP Instance, SAP System, Database

%%NEWLINE%%
  Description

    The newline character. Newlines entered into the Command Line Call field are provided for better readability only, they are stripped once the call is executed. If you need to define a newline in your command line call, you may use this macro.

  Available for Custom Checks

    RUN_PROG Custom Check

  Available for System Type

    Server, SAP Instance, SAP System, Database

%%ORACLE_HOME%%
  Description

    Oracle Home directory, as detected by the Agent or set by ORAHomeDir.

  If the Custom Check is executed for an SAP System this macro is only available if the Run Custom Check on DB Host of SAP System (instead of Central Instance Host) flag is set.

  Available for System Type

    Oracle <<database, SAP System with Oracle

%%PROG_DIR%%
  Description

    Probably the most important macro at all. Contains the absolute name of the directory containing the script/program to be executed in a RUN_PROG Custom Check.

  Is only set if Avantra is in charge of deploying the program, and it is only available in the fields Program Executable Name and Command Line Call.

  It corresponds to the value defined in the Program Directory field, which is by default `[agent`basedir]/libexec/[custom_check_name]_.

  You most likely need quotes while you reference this Macro.

  Available for Custom Checks

    RUN_PROG Custom Check

  Available for System Type

    Server, SAP Instance, SAP System, Database

%%PROG_NAME%%
  Description

    Contains the name of the script/program to be executed in a RUN_PROG Custom Check.

  Is only set if Avantra is in charge of deploying the program, and it is only available in the fields Program Executable Name and Command Line Call.

  Available for Custom Checks

    RUN_PROG Custom Check

  Available for System Type

    Server, SAP Instance, SAP System, Database

%%PROG_PATH%%
  Description

    Contains the absolute path of the script/program to be executed in a RUN_PROG Custom Check.

  Is only set if Avantra is in charge of deploying the program, and it is only available in the fields Program Executable Name and Command Line Call.

  You most likely need quotes while you reference this Macro.

  Available for Custom Checks

    RUN_PROG Custom Check

  Available for System Type

    Server, SAP Instance, SAP System, Database

%%RFC_PWD%%
  Description

    The RFC user password corresponding to the Macro to `%%RFC_USR%%`.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    SAP Instance, SAP System

%%RFC_USR%%
  Description

    The RFC user name used by the Avantra Agent to access the SAP System.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    SAP Instance, SAP System

%%RSID%%
  Description

    The Real SAP SID of SAP Systems the Custom Check is executed for.

    - For a Custom Check defined for a Server, it is a list of values for all SAP Instances hosted on this Server. The list has no particular order, and it may be even empty if the Server is hosting no SAP Instance at all.

    - For a Custom Check defined for a SAP Instance, it is the value for that particular instance.

    - For a Custom Check defined for a SAP System, it is a list of values for all SAP Instances comprising the SAP System.

      This macro is only available if the Run Custom Check on DB Host of SAP System (instead of Central Instance Host) flag is not set.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Server, SAP Instance, SAP System

%%SAPCONTROL_PWD%%
  Description

    The SAPControl user password corresponding to the Macro to `%%SAPCONTROL_USR%%`.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    SAP Instance, SAP System

%%SAPCONTROL_USR%%
  Description

    The SAPControl user name used by the Avantra Agent to access the SAP System.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    SAP Instance, SAP System

%%SRV_DNSDOMAIN%%
  Description

    The macro contains the contents of the Server’s DNS Domain field.

    - For a Custom Check defined for a Server, the value is the one of this particular Server.

    - For a Custom Check defined for a SAP Instance, it is the value of the Server hosting the SAP Instance.

    - For a Custom Check defined for a SAP System, it is the value for the Server hosting either the Central or the Database instance, depending on the Custom Check’s definition.

    - For a Custom Check defined for a Database, it is the value of the server hosting the Database.

  Available for System Type

    Server, SAP Instance, SAP System, Database

%%SRV_FQDN%%
  Description

    The macro contains the contents of the Server's FQDN or Ip Address field.

    - For a Custom Check defined for a Server, the value is the one of this particular Server.

    - For a Custom Check defined for a SAP Instance, it is the value of the Server hosting the SAP Instance.

    - For a Custom Check defined for a SAP System, it is the value for the Server hosting either the Central or the Database instance, depending on the Custom Check’s definition.

    - For a Custom Check defined for a Database, it is the value of the server hosting the Database.

  Available for System Type

    Server, SAP Instance, SAP System, Database

%%SRV_ID%%
  Description

    The internal ID referencing the Server the Custom Check is executed on.

    - For a Custom Check defined for a Server, the value is the one of this particular Server.

    - For a Custom Check defined for a SAP Instance, it is the value of the Server hosting the SAP Instance.

    - For a Custom Check defined for a SAP System, it is the value for the Server hosting either the Central or the Database instance, depending on the Custom Check’s definition.

    - For a Custom Check defined for a Database, it is the value of the server hosting the Database.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Server, SAP Instance, SAP System, Database

%%SRV_NAME%%
  Description

    The name referencing the Server the Custom Check is executed on.

    - For a Custom Check defined for a Server, the value is the one of this particular Server.

    - For a Custom Check defined for a SAP Instance, it is the value of the Server hosting the SAP Instance.

    - For a Custom Check defined for a SAP System, it is the value for the Server hosting either the Central or the Database instance, depending on the Custom Check’s definition.

    - For a Custom Check defined for a Database, it is the value of the server hosting the Database.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Server, SAP Instance, SAP System, Database

%%TMP_DIR%%
  Description

    The tmp directory of {avantra-agent}, i.e. `[agent`basedir]/tmp.

  You most likely need to set quotes while referencing this Macro.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Server, SAP Instance, SAP System, Database

%%USID%%
  Description

    The Unified SAP SID of SAP Systems the Custom Check is executed for.

    - For a Custom Check defined for a Server, it is a list of values for all SAP Instances hosted on this Server. The list has no particular order, and it may be even empty if the Server is hosting no SAP Instance at all.

    - For a Custom Check defined for a SAP Instance, it is the value for that particular instance.

    - For a Custom Check defined for a SAP System, it is a list of values for all SAP Instances comprising the SAP System.

      This macro is only available if the Run Custom Check on DB Host of SAP System (instead of Central Instance Host) flag is not set.

  Available for Custom Checks

    FILE_EXISTS, FILE_UPTODATE, FILE_CONTENT, NW_RESPONSE, PROCESS, RUN_PROG, HTTP_RESPONSE LOG_ADAPTER, WIN_SERVICE

  Available for System Type

    Server, SAP Instance, SAP System