Overview
This guide provides assistance with the preparation, installation and configuration of the JAMS Alert Management Pack for ServiceNow.
Application Dependencies
- Plugins required: these include the Orchestration plugin plus setting up a MID Server in the same environment as the JAMS Scheduler.
- System table permissions required: No special requirements are necessary.
Configuration Instructions
This section details how to install and configure your instance after installing the application.
Initial Setup Procedures
- Install the JAMS Alert Management application by ensuring the "JAMS Alert Management Pack for ServiceNow" is checked on the JAMS Installation Wizard.
- Deploy a MID Server in the same environment with the JAMS Scheduler.
- Create a user with permission to access the MID Server and then configure the MID Server config.xml according to the MID documentation.
- Add the following role to the user: x_mvpss_jams.jams_admin, mid_server.
- Start the MID Server and verify that it is has registered in the instance, then add the PowerShell capability to the MID Server.
- Make sure to grant access to the JAMS Alert Management roles as needed and include the following roles:
x_mvpss_jams.jams_user: to allow access to all JAMS alert, definition, and agent records.
x_mvpss_jams.jams_admin: to access all JAMS components.
- The server that is running the MID server should also have the JAMS Client installed so it can execute the JAMS scripts requested from the ServiceNow instance.
- Open the JAMS Scheduler > Properties module. Set the Duration in minutes that JAMS Scheduler is configured to keep jobs in the monitor property to match the duration defined in JAMS. The default duration is 10 minutes.
Adding JAMS Schedulers
- Log in as a user with the x_mvpss_jams.jams_admin role.
- Open the JAMS Scheduler > JAMS Schedulers module to access the list of schedulers.
- Create a new scheduler record.
- Name: contains the host name of the JAMS Server and is how the MID server connects to the JAMS Scheduler to run PowerShell commands.
- Import data: enable this to import agents, users, calendars, jobs, and job failures for this scheduler.
- Classification: is an optional field that defines the type of scheduler in your environment.
- Host: is an optional field that associates the scheduler with a server configuration item.
Initial Import of the JAMS Data
- From a scheduler form, click the Load Scheduler Data UI Action related link. This will create a JAMS Job to import agents, job definitions, calendars, and users from the scheduler. This may take a few minutes to complete.
- Once the imports are complete, you can review all agents and definitions in the Scheduler’s related lists.
- The scheduled Job "JAMS Get Scheduler Data" will automatically run every 12 hours to refresh this data.
Importing JAMS Job Failures
- A scheduled job is configured by default to query all JAMS Schedulers with “import data” enabled. This job imports all failed jobs from the scheduler every 2 minutes, converting them into the JAMS Alert record.
- From the JAMS console, run a test job that is configured to fail intentionally.
- Wait 2-3 minutes for the scheduled import to run and the MID server to process the import.
- Open the JAMS Scheduler–JAMS Alerts module to view the alert.
Restarting Failed Jobs from the Alert
- You can submit a JAMS job restart using the alert form. Click the Restart job UI Action related link. This action queues a request for the scheduler to restart the existing failed job in the monitor using the same JAMS entry ID.
- Once the job has completed, the updated status is imported into the JAMS alert. If the job completes successfully, it is entered into the comments and the alert closes. If the job fails again, the alert comments are updated with the result.
- If the job completion time goes beyond the time frame defined in the Duration in minutes that JAMS Scheduler is configured to keep jobs in the monitor property, then the restart cannot access the previous entry ID, so a new Job is submitted. In this case, the new Job will not be able to update an existing alert record.
Creating an Incident from an Alert
If you need to assign work based on a failed alert, you can use the Create Incident UI Action related link to generate a new incident record.
Manage Scheduled Jobs
Three scheduled jobs (described below) are configured by default and can be configured using the JAMS Scheduler > Scheduled Jobs module.
- JAMS Get Scheduler Data: runs twice a day to import the list of agents, users, calendars, and job definitions for all schedulers that are set to "import data".
- JAMS Get Failures: runs every 2 minutes to import all failed jobs from the schedulers that are set to "import data".
- JAMS Deactivate Old Job Definitions: runs daily to disable job definitions that have not been refreshed through the import in the number of days specified in the properties page.
 |
NOTE: Users upgrading from JAMS Incident Management App version 1 should delete or disable the following scheduled jobs from version 1 if they still exist, as they are no longer needed:
- JAMS Get Scheduler Agents
- JAMS Get Scheduler Definitions
- JAMS Get Scheduler Failures
|
JAMS Alert Console
The JAMS Alert Console displays common alert and JAMS Request report gauges.
Understanding Workflow Components
Version 2 of the JAMS integration changes how all orchestration requests are created and processed. All user requests, as well as system scheduled data imports, are all handled through the new JAMS Job Request records. All workflows are defined on this table for the various request types.
The following workflows are included:
- JAMS Request – Create: Sample workflow to provision a new JAMS job from the request catalog record producer.
- JAMS Request – Edit: sample workflow to modify a JAMS job from the request catalog record producer.
- JAMS Request – Submit: Sample workflow to submit a JAMS job for executing from the request catalog record producer.
- JAMS Request Get Failed Jobs: Import failed jobs from a scheduler, request is automatically created from the “JAMS Get Failures” ServiceNow scheduled job.
- JAMS Request Get Scheduler Data: Import data from a scheduler, request is automatically created from the “JAMS Get Failures” ServiceNow scheduled job.
The following custom workflow activities are included; they can be used in your own workflows and are accessible from the Packs tab in the workflow designer canvas:
- Get JAMS Agents: import agents from a JAMS Scheduler.
- Get JAMS Definitions: import the folders and jobs from a JAMS Scheduler.
- Get JAMS Failed Entries: import failed jobs from the JAMS Scheduler monitor.
- Submit JAMS Entry: submit a job name or entry id to a JAMS Scheduler.
- Get JAMS Entry: retrieve the status of a JAMS job using an entry ID.
- Create JAMS Job: provision a new job on the JAMS server using the inputs provided.
- Get JAMS Calendars: import custom calendar/dates from a JAMS scheduler.
- Get JAMS Users: import users from a JAMS scheduler.
- Edit JAMS Job Definition: make a source script change for a job on a JAMS scheduler.
Service Catalog
Three record producer service catalogs are included with version 2 of this application. They are available to users with the JAMS User role, and can be found in the JAMS Scheduling category.
All record producers generate JAMS Job Request records and set the request type value so the correct workflow will be triggered.
- Create JAMS Job
- Edit JAMS Job
- Submit JAMS Job
External Systems Connection
All external connections to JAMS Schedulers are handled by the MID Server.
Testing the Configuration
All communications with the JAMS Server are handled through the MID Server and ECC queue. Use the ECC queue records to monitor the transactions.
Troubleshooting
A first step to troubleshooting is to enable debug level logging using the JAMS Scheduler > Properties module. This action then forces additional logging through the System Logs > Application Logs module. Filter this list using the JAMS Alert Management App Scope.
To troubleshoot workflows, open the JAMS Scheduler > Workflow Contexts. Select the context in question and review the Workflow Log related list for possible error information.