Using environment variables
- Last Updated: October 19, 2015
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
Using environment variables
Environment variables define the context in which a job or job action runs. OpenEdge Management sets up an environment variable context to associate jobs with resources and alerts and provides a set of predefined environment variables that are common to all jobs you can run.
There are additional, specific environment variables that will vary from one job to another, depending on the job to be executed. For example, jobs run in response to an alert have an alert context and jobs for which associated database resources have been defined have a resource context. OpenEdge Management provides a unique context definition for a job run against the OpenEdge Management Trend Database.
The following table identifies environment variables that are common to all jobs.
| Environment variable | Description |
|---|---|
| FM_HTTPPORT | OpenEdge Management's Web server port |
| ADMSRVRPORT | The AdminServer's listening port |
| JOBNAME | The name of the job as defined in OpenEdge Management |
| FATHOMINSTALLDIR | OpenEdge Management's installation directory as defined in fathom.init.params |
| FM_CONTAINERNAME | The resources's AdminServer name and the resource name (for example, Dev01.sports2004) |
| FATHOMCONFIGDIF | OpenEdge Management's directory for configuration data as defined in fathom.init.params |
| FATHOMLOGSDIR | OpenEdge Management's log directory as defined in fathom.init.params |
| FATHOMWORKDIR | OpenEdge Management's work directory as defined in fathom.init.params |
| FATHOMREPORTDIR | OpenEdge Management's directory for report data as defined in fathom.init.params |
| PROGRESSINSTALLDIR | Installation directory that OpenEdge Management is associated with as defined in fathom.init.params |
| PERL5BIN | Perl v5 interpreter bin directory as defined in fathom.init.params |
| PERL5LIB | Perl v5 library directory as defined in fathom.init.params |
The following table identifies environment variables for jobs associated with database resources. If a job is associated with more than one database, the value of each of the variables will be identified in a comma-separated list. For example, if there are three databases associated with a job, and the databases are named db1, db2, and db3, the database names will be defined as follows:
|
| Environment variable | Description |
|---|---|
| RESRC_NAME | The name of the associated resource. This will be a database name because only a database resource can be associated with a job. |
| RESRC_DBNAME | The name of the database. |
| RESRC_DBPATH | The full pathname of the database. For example, /usr1/myapp/sports.db. |
| RESRC_DBCONFIG | The database configuration name. |
| RESRC_DBDISPLAY | The database display name. |
| RESRC_DBPORT | The TCP port number of the database broker. |
| RESRC_DBHOST | The TCP host name of the database DataServer. |
| RESRC_DBADMSRVRPORT | The AdminServer TCP port number on the database server host. |
The Action option that appears at the bottom of the Job page. Select this option to make these environment variables available to the job's alert context.
The following tables identify the environment variables that can also be run in response to alerts. These environment variables are available when you identify jobs as job actions.
| Environment variable | Description |
|---|---|
| ALERTID | The ID of the current alert. |
| ALERTNAME | The name of the current alert. |
| ALERTSEVERITY | The alert severity (Severe,
Error, Warning, or
Informational). |
| HOST | The host name on which OpenEdge Management is running. |
| CONTAINERNAME | The name of the container that is used to transport the resource. |
| RESOURCENAME | The name of the resource that has caused the alert to generate. |
| ALERTLASTOCCURRENCE | The date and time of the previous occurrence of the alert. |
| ALERTREASON | A text description of the alert. |
| ALERTCOUNT | The number of times the alert has occurred. |
| ALERTRIGVALUE | The value that has triggered the alert. |
| HOSTLINK | The HTTP path of the host name. |
| RESOURCELINK | The full path of the resource that has generated the alert causing the e-mail to be sent. |
| ALERTLINK | The link to the description of the alert that has caused the e-mail to be sent. |
| Environment variable | Description |
|---|---|
| TASKTYPE | The type of the current task (Job or
Alert). |
| TASKNAME | The name of the current task. |
| TASKCOMMAND | The command required to complete the task. |
| TASKCOMMANDARGS | The command arguments required to complete the task. |
| TASKSTARTTIME | The start date and time of the current task. |
| TASKENDTIME | The end date and time of the current task. |
| TASKEXITCODE | The exit code defined for task completion. |
| TASKRESOURCES | The database resource that is used for the task to be performed. |
| TASKENVVARS | A list of environment variables set for the task type. |
| TASKCONTAINER | The name of the container that is used to transport the resource. |
| TASKHOSTLINK | The HTTP path of the host name. |
| TASKFAILMSG | If an error occurs while running the task action, an error message is displayed. |
The following table describes the environment variables that you can identify for jobs with database resource associations.
| Variable | Description |
|---|---|
| FM_DBNAME | This variable is set to the full name of the database. In this situation, it is OpenEdge Management Trend Database. |
| FM_DBPATH | This variable is set to the absolute pathname of the OpenEdge Management Trend Database. |
| FM_DBCONFIG | This variable is set to the OpenEdge Management Trend Database defined configuration. |
| FM_DBDISPLAY | This variable is set to the OpenEdge Management Trend Database defined display name. |
| FM_DBPORT | This variable is set to the OpenEdge Management Trend Database TCP port number. |