Job Queue

From Hornbill
Jump to navigation Jump to search
Home > Administration > ITOM > Job Queue Index

Introduction

The Job Queue provides a mechanism to create, view, and manage active and completed jobs. The current status and progress of a job can be monitored via the Monitor console. Once a Job has completed, The Console Output provides the sanitized output produced by the package or discover process. It is possible to Cancel a Job if required, and once a job has been cancelled the status will be marked cancelled.

When a Job completes successfully or fails a Debug Log will be available, which provides information that can be of use when troubleshooting issues. The output provided will depend on the package/discovery job that has been executed.

Related Articles

Job Queue List

JobQueueListFade.png
  • Job Id
Job identification number
  • Name
Name provided for the job when created
  • Type
The type of Job, can be either Discovery or IT Automation
  • Status
Shows the current status of the Job
  • Target
Shows the name of the computer on which the job will run
  • Child Jobs
Shows if the Job has spawned any children
  • Created On
Shows the creation date/time for the Job
  • Started On
Displays the date/time the Job started execution
  • Completed On
Displays the date/time the Job completed execution

Job Queue Toolbar

  • Refresh
A refresh of the list may be required to update Job status or any new Jobs that have been executed
  • Type
Filter the list by Job Type
  • All
Lists all jobs
  • Discovery
List all Dicscovery jobs
  • Package
List all Packaged IT Automation jobs
  • Run State
Filter the the list on Status using Status Groups
  • Ready
Defered, Waiting
  • Active
Processing Output, Starting
  • Cancelling
Cancelled, Cancel Request
  • Succeeded
Success
  • Failed
AWOL, Failed
  • Timed Out
Timed Out, Expired
  • Halted
Aborted, Cancelled
  • Filter
Free Text filter to search by Name, Operation or Target
Activate Selected Jobs
Cancel Selected Jobs
Delete Selected Jobs
Creates a new Discover or IT Automation Job

Add an IT Automation Job

In order to run an Operation on a machine in a discovered network, creating a new IT Automation Job.

ITOM Add IT Automation Ad Hoc Job

  • Name - name given to identify this IT Automation Job
  • Package - the package in which the operation is stored
    JobQueueAutoJobPackageList.png
  • Run Operation - which operation to perform using the package
  • Site Target [Group / Server ] - whether the Job needs to run on all the machines in the SIS Group or on a single SIS/Managed CI
  • Target Machine [List / Inventory / Manual] -
  • Credentials
    • Admin Credentials - Keystore entry
    • Run As Credentials - Keystore entry
  • Extra Credentials - one is able to add other credentials which might be used as part of the functionality within the package
  • Package Parameters - INPUT parameters of the selected package; mandatory fields are highlighted; hints might be given in the field box.

Deleting Jobs

JobInfoDeleteButton.png

A Job can only be deleted while its status is not one of the "Active" group, by the use of the delete button, after which the Job will be removed from the Job Queue list and will no longer be accessible.

Canceling Jobs

JobInfoCancelButton.png

Cancelling a Job will gracefully terminate all initial process(es) spawned by the job, on the target machine. Confirmed by noting Job process IDs provided in the Monitor, and listing the process on the target machine.
JobCancelMonitor-a.png JobCancelTaskList.png
Clicking the Cancel button will be acknowledged, and the status set to "Cancelling" and once the processes are terminated the Jobs status will be set to Cancelled.
JobCancelMonitor-b.png

Abort

Aborting the Job changes the status of a job to "Aborted", and sever all links to any processes that were started on the target. All running processes will still be active and can only be managed directly on the target machine.

Technical Details

For technical reasons (a WMI operation cannot be pointed to the local machine), if one wishes to run a package operation on the SIS server itself, one can only do so using the SIS Server's context credentials - and thus no credentials should be given via the interface.

Running with credentials

In order to run an Operation on a machine, the SIS server will use the "Admin Credentials" context to use WMI (DCOM/WinRM) to run the given Operation (Job) as the account set up under "RunAs Credentials".

Hornbill ITOM <---- Site Integration Server (Local System)
				|-- WMI ---> Managed CI
						|----> EspSisExec (Administrator))
								|----> EspSisExec pkg (Run As)
				<----- returning data (http) ----|

If the RunAs Credentials are not given, then the Admin Credentials will be used.

If the Admin Credentials are not given, then the EspSisService Credentials will be used (typically Local System).

Credentials will be transmitted in encrypted form, but will be available to the scripts contained within the package as parameters passed over the command line.

Once the SIS knows there is an operation to be run on a managed CI, the SIS Service checks it has the most recent package (stored locally) and copies EspSisExec and the relevant package to a temporary folder (as determined via a WMI call of the user's settings) on the relevant managed CI. It then uses WMI (DCOM/WinRM) with the Administrator credentials to run that package (using EspSisExec, the pkg and any variables) with RunAs credentials.

There is a continuous output/heartbeat from the Managed CI back through the SIS to Hornbill ITOM.

Hornbill Hint: network packets can be dropped here, so the instant feedback can NOT be relied upon. The log post execution should be complete.

Once the package has run, the results (the console output from the script(s), the standard error and a debug log) are packaged and sent back to Hornbill ITOM (via the SIS) and the temporary files (and folder) are deleted from the Managed CI

The console output from a package can be parsed for variables of the form:

{{SISJobOutputParameterStart:variable_name}}variable_data{{SISJobOutputParameterEnd}}

to be used in a Runbook or Service Manager Business Process (which can be used to progress a Runbook or a package)

The maximum concurrent jobs is 5 (this is configurable via the experimental.itom.concurrentJobs System Setting)

We are working on proxy support for within the executable.