Job Output Variables

The server creates a JavaScript variable for each return value of selected job types. The return values are available as long as the Application is active. You can use the return values of a job in the subsequent jobs of that Application.
cwad121
HID_job_output_variables
The server creates a JavaScript variable for each return value of selected job types. The return values are available as long as the Application is active. You can use the return values of a job in the subsequent jobs of that Application.
To use a job's return variables in other jobs, the agent administrator must set the agent.manager.variables.allow parameter to True in the agentparm.txt file. However, the agent administrator does not have to set this parameter for CPU Monitoring and Disk Monitoring jobs.
For example, suppose that a payroll processing application comprises three jobs: the first job calculates the employee's gross pay, the second job calculates the tax deduction, and the third job calculates the employee's contribution to charity. The second job uses the employee's gross pay returned by the first job to calculate the tax deduction. The third job uses the tax amount returned by the second job to calculate the employee contribution to charity.
The return value variable names have the following format:
APPL.
job_name_job_qualifier_return_value_name
 
For example, a variable name could be APPL.agent_os_purchase_order_num, where APPL is the context name, agent is the job name, os is the qualifier, and purchase_order_num is the return value variable ID.
  • job_name
     and 
    job_qualifier
     are in lowercase.
  • Periods (.) are replaced with underscores (_) in return variable names.
  • All return variable names start with APPL because variables are resolved in the Application context.
The following table lists the return value names of each job type that creates output variables:
 
Job type
 
 
Return value names
 
CPU Monitoring
counteravail
counterused
loadaverage1m
loadaverage5m
loadaverage15m
Disk Monitoring
counteravail
counterused
return
<stored procedure output parameters>
 SQL 
tablerowcount
<selected column names>
<SNMP variable OIDs>
<updated variable SNMP OID>
JMX-MBean Attribute Get
variable_jmx_mbeanattr
JMX-MBean Attribute Set
variable_jmx_mbeanattr
JMX-MBean Operation
value
Example: Return Variables from a CPU Monitoring Job
 
The following example shows the return variables from a CPU Monitoring job.
To return values from a CPU Monitoring job
 
  1. Enter 
    CPUMonitor0
     in the Name field of the Basic page.
  2. Select the Return immediately option button from the Wait mode section.
  3. Select the Within option button from the Range section.
  4. Select the Available option button from the Monitor when CPU percentage section.
  5. Click OK.
    The CPU Monitoring job return variables are as follows:
    • APPL.cpumonitor0_counteravail
    • APPL.cpumonitor0_counterused
    • APPL.cpumonitor0_loadaverage1m
    • APPL.cpumonitor0_loadaverage5m
    • APPL.cpumonitor0_loadaverage15m
Example: Return Variables from a JMX-MBean Attribute Get Job
 
The following example shows the return variables from a JMX-MBean Attribute Get job.
 
To return values from a JMX-MBean Attribtue Get job
 
  1. Enter the following information in the Basic page:
    • Name—JMXMbeanAttrGet0
    • URL —service:jmx:rmi:///jndi/rmi://localhost:9999/server
    • MBean— config
    • Attribute— cachesize
  2. Click OK.
    The JMX-MBean Attribute Get job return variables are as follows:
    • APPL. jmxmbeanattrget0_variable_jmx_mbeanattr
Special considerations apply to DB Stored Procedure, SQL, SNMP Value Get, and SNMP Value Set jobs because they do not have fixed names for all return values.