Difference between revisions of "Job Queue"

From Hornbill
Jump to navigation Jump to search
 
(19 intermediate revisions by the same user not shown)
Line 5: Line 5:
 
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.
 
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.
 
|
 
|
 +
* [[Discovery Job]]
 +
* [[IT Automation Job]]
 
* [[ITOM Package Library]]
 
* [[ITOM Package Library]]
 
}}
 
}}
  
 
== Job Queue List ==
 
== Job Queue List ==
 +
[[Category:ITOM]]
 
[[Image:JobQueueListFade.png|350px|right|link=https://wiki.hornbill.com/images/9/93/JobQueueList.png]]
 
[[Image:JobQueueListFade.png|350px|right|link=https://wiki.hornbill.com/images/9/93/JobQueueList.png]]
 +
:{|
 +
|- valign="top"
 +
|style="width:500px"|
 
{{Bullet1|Job Id|Job identification number}}
 
{{Bullet1|Job Id|Job identification number}}
 
{{Bullet1|Name|Name provided for the job when created}}
 
{{Bullet1|Name|Name provided for the job when created}}
Line 15: Line 21:
 
{{Bullet1|Status|Shows the current status of the Job}}
 
{{Bullet1|Status|Shows the current status of the Job}}
 
{{Bullet1|Target|Shows the name of the computer on which the job will run}}
 
{{Bullet1|Target|Shows the name of the computer on which the job will run}}
 +
|style="width:500px"|
 
{{Bullet1|Child Jobs|Shows if the Job has spawned any children}}   
 
{{Bullet1|Child Jobs|Shows if the Job has spawned any children}}   
 
{{Bullet1|Created On|Shows the creation date/time for the Job}}  
 
{{Bullet1|Created On|Shows the creation date/time for the Job}}  
 
{{Bullet1|Started On|Displays the date/time the Job started execution}}
 
{{Bullet1|Started On|Displays the date/time the Job started execution}}
 
{{Bullet1|Completed On|Displays the date/time the Job completed execution}}
 
{{Bullet1|Completed On|Displays the date/time the Job completed execution}}
 +
|}
 
==Job Queue Toolbar==
 
==Job Queue Toolbar==
 
:{|
 
:{|
Line 45: Line 53:
 
|}
 
|}
  
==Delete Selected Jobs==
+
==Activate Selected Jobs==
[[image:jobInfoDeleteButton.png|right]]
+
[[image:ActivateSelectedJobsButton.png|right]]
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.
+
Enables all selected Deferred Jobs to be Activated for processing
  
==Canceling Jobs==
+
==Cancel Selected Jobs==
 
[[image:jobInfoCancelButton.png|right]]
 
[[image:jobInfoCancelButton.png|right]]
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. <br>
+
Where it is required for a Job to be Cancelled, for example; maybe the job has stalled or is taking a large amount of time and resources.  Cancelling a Job will gracefully terminate all initial process(es) spawned by the job, on the target machine.   
[[Image:jobCancelMonitor-a.png|middle]] [[Image:jobCancelTaskList.png|middle]]<br>
 
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.<br>
 
[[Image:jobCancelMonitor-b.png]]<br>
 
  
==Abort==
+
Once a Job has been started all process Id's are visible within the Job's Monitor.  The following shows that a job was started using the "Run As" feature, and thus created three process IDs, The Package Execution process (EspSisExec.exe), The Elevated "Run As" Package Execution Process (EspSisExecRunAs.exe) and finally the package payload (in this example Dotter.exe).<br><br>
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.
+
[[Image:jobCancelMonitor-a.png|middle]]<br><br>
 +
The running process can also be identified using the above PIDs, on the target device by listing the device process listOn a Windows device, this can be achieved via the Task Manager or via the command line using tasklist.exe as shown below:<br><br>
 +
[[Image:jobCancelTaskList.png|middle]]<br><br>
 +
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.<br><br>
 +
[[Image:jobCancelMonitor-b.png]]<br><br>
  
==Technical Details==
+
{{infobox|In most cases just Cancelling a job should suffice, however in cases where this option fails, an Abort option is available to force the termination, accessed via the Job's Details [[IT_Automation_Job#Action Buttons|Action Buttons]].}}
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===
+
==Delete Selected Jobs==
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".
+
[[image:jobInfoDeleteButton.png|right]]
<pre>
+
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.
Hornbill ITOM <---- Site Integration Server (Local System)
 
|-- WMI ---> Managed CI
 
|----> EspSisExec (Administrator))
 
|----> EspSisExec pkg (Run As)
 
<----- returning data (http) ----|
 
</pre>
 
 
 
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:
 
 
 
<pre>{{SISJobOutputParameterStart:variable_name}}variable_data{{SISJobOutputParameterEnd}}</pre>
 
 
 
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.
 
 
 
 
 
[[Category:ITOM]]
 

Latest revision as of 08:04, 20 November 2020

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

Activate Selected Jobs

ActivateSelectedJobsButton.png

Enables all selected Deferred Jobs to be Activated for processing

Cancel Selected Jobs

JobInfoCancelButton.png

Where it is required for a Job to be Cancelled, for example; maybe the job has stalled or is taking a large amount of time and resources. Cancelling a Job will gracefully terminate all initial process(es) spawned by the job, on the target machine.

Once a Job has been started all process Id's are visible within the Job's Monitor. The following shows that a job was started using the "Run As" feature, and thus created three process IDs, The Package Execution process (EspSisExec.exe), The Elevated "Run As" Package Execution Process (EspSisExecRunAs.exe) and finally the package payload (in this example Dotter.exe).

JobCancelMonitor-a.png

The running process can also be identified using the above PIDs, on the target device by listing the device process list. On a Windows device, this can be achieved via the Task Manager or via the command line using tasklist.exe as shown below:

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

Information
In most cases just Cancelling a job should suffice, however in cases where this option fails, an Abort option is available to force the termination, accessed via the Job's Details Action Buttons.

Delete Selected 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.