Skip to content

Ticketing and change systems

This guide shows you how to connect QubeSight to the system that holds your approved change tickets (ServiceNow, Jira, any REST API that returns JSON, or a CSV export) so that database change statements can be reconciled against approved changes. Unapproved changes are listed for review and can raise an alert.

Enterprise

Change reconciliation requires the capability change_reconciliation. In Community, the Change reconciliation page is not shown.

Direction of the integration

QubeSight reads change tickets from these systems. It does not create, update or close tickets in ServiceNow or Jira. To open tickets from alerts in an ITSM tool, send alerts to the tool's inbound endpoint with a Webhook notification channel; see Mail (SMTP) and notification channels. The Investigate view of a security event shows matched change tickets as context.

How reconciliation works

flowchart LR
    T[Ticket source] -->|sync every 15 min| K[(Change tickets)]
    E[(Database events)] -->|every 2 min: DDL, DCL...| M{Match}
    K --> M
    M -->|ticket number in event| A[Matched]
    M -->|window + text score >= 0.75| A
    M -->|score 0.5 - 0.75| R[Needs review]
    M -->|no approved ticket| U[Unapproved]
    U --> AL[Alert: Unapproved database change]
  1. Sync. Each source is read on its own interval (default 15 minutes). Only tickets changed since the last sync are fetched; the first sync looks back 90 days by default.
  2. Change events. Every 2 minutes, new database events of the selected change classes (default DDL and DCL) are evaluated. Session settings such as ALTER SESSION, SET or USE are not counted as changes.
  3. Matching by ticket number. If the ticket number appears in the event (SQL comment or text, session context, client program), the event is Matched to that ticket. If that ticket is not approved, the event is Unapproved. A match outside the planned window is still matched, with a lower score and the reason outside the planned window.
  4. Matching by window and text. Otherwise, approved tickets whose planned window (plus tolerance) contains the event time are scored: window 0.5, object named in the ticket 0.25, database 0.1, server 0.1, user 0.05, operation 0.05. At or above the automatic threshold (default 0.75) the event is Matched; at or above the review threshold (default 0.5) it Needs review with up to 5 candidate tickets; below that it is Unapproved.
  5. People decide. Reviewers can Match with this ticket, Reject (unapproved) or Accept with reason. Decisions are never overwritten by later re-evaluation.

Put the ticket number in the change

The most reliable match is a ticket number in the SQL itself, for example /* CHG0012345 */ ALTER TABLE ..., or in the client program name or session context. Ask DBAs and deployment tools to include it.

Prerequisites

  • An Enterprise licence.
  • The Administrator role to add sources and change matching settings. Administrators, analysts and DBAs can decide on changes; auditors can read.
  • Network access from the QubeSight nodes to the ticket system's API (HTTPS), or a CSV export.
  • A read-only account or token at the ticket system.

Prepare the ticket system

  • Create an integration user with read access to the change table (by default change_request), for example with the itil role or a custom read-only role.
  • QubeSight reads these fields through the Table API: number, short description, description, state, approval, planned start and end dates, configuration item, assignment group, assigned to, requested by, updated time, and the business service and affected CI where present.
  • Decide whether you need an extra encoded query, for example only the DBA assignment group's changes.
  • Create an API token (Jira Cloud) or a personal access token (Jira Data Center / Server) for a user who can browse the change project.
  • Write a JQL query that selects change tickets, for example project = CHG AND issuetype = Change.
  • If planned start and end dates are custom fields, note their field IDs (for example customfield_10050).
  • Provide a GET endpoint that returns approved changes as a JSON array (or an object containing one).
  • Note the JSON path to the list and to each field you want to map.
  • Export tickets with a header row. Comma and semicolon separators and a UTF-8 byte-order mark are accepted.

Add a source

  1. Go to Assurance Center → Change reconciliation and open Sources.
  2. Click Add source.
  3. Select the Kind (ServiceNow, Jira, REST (JSON) or CSV file) and enter a Name.
  4. Fill in the fields for the kind:

    Field ServiceNow Jira REST (JSON) CSV file
    Address ServiceNow address, for example https://company.service-now.com Jira address, for example https://company.atlassian.net REST address (GET) —
    Authentication User name + password / API token, Bearer token, Custom header or None Same; for Jira Cloud use the e-mail as user name and an API token Same —
    Selection Table (default change_request), Extra filter (encoded query) JQL query * (required), Deployment: Jira Cloud or Jira Data Center / Server Path of the ticket list (empty: the response itself is the array) —
    Dates Planned start and end of the change Planned start field, Planned end field (custom field IDs; empty uses the created time and the resolution time, or 14 days after creation) Field map Column map
    Field map — — Field map (JSON path, e.g. approval.state) for Ticket no, Title, Description, Status, Approval, Start, End, System / CI, Link Column map (CSV headers) for the same fields
  5. Set Values counted as approved (comma-separated). Defaults:

    • ServiceNow: the approval field equals approved. Cancelled tickets never count as approved.
    • Jira: status is one of Approved, Scheduled, Implementing, In Progress, Done, Closed, Resolved.
    • REST and CSV: the approval field (or else the status) is true, yes, approved or a similar value.
  6. Set Sync interval (min) (5–1440, default 15) and First sync looks back (days) (default 90, up to 365).
  7. If the ticket system uses an internal CA, paste it in Extra root certificate (PEM, internal CA).
  8. Click Test connection. The result shows how many tickets changed in the last 7 days and how many are approved.
  9. Leave Enabled on and save. For a CSV source, click Upload CSV on the source card.

Passwords and tokens are stored encrypted and never returned to the screen. If you change the address, enter the secret again.

For Jira Cloud, the dialog holds the kind Jira, the Jira address, the e-mail as user name with an API token, the JQL query with Deployment set to Jira Cloud, and the Values counted as approved. A passed Test connection shows the number of tickets changed in the last 7 days and how many of them are approved.

Matching settings

Open Settings on the Change reconciliation page. Saving re-evaluates open changes.

Setting Description Default Range
Matching on Turns reconciliation on or off. on —
Changes that need a ticket Change classes: DDL, DCL, DML, EXEC, PROC, ADMIN (ADMIN covers server configuration such as ALTER SYSTEM SET or sp_configure). DDL, DCL —
Tolerance before the window (min) Minutes before the planned start that still count. 60 0–10080
Tolerance after the window (min) Minutes after the planned end that still count. 60 0–10080
Look-back (days) How far back events are evaluated. 30 1–365
Automatic match threshold Score for an automatic match. 0.75 0–1
Review threshold Score for Needs review; below it counts as unapproved. Must be lower than the automatic threshold. 0.5 0–1
Excluded users (comma-separated) For example automated maintenance accounts. empty —

Verify

  1. On Sources, each card shows the ticket count, the approved count and Last sync …, or Sync failed with the error. Click Sync now to sync immediately.
  2. Open Change tickets to see the imported tickets with Ticket, Title, Status, Planned window, System / CI, Events and Source.
  3. Run a test change on a monitored database that contains an approved ticket number in a comment. Within a few minutes it appears on Changes as Matched, by ticket number.
  4. A change with no approved ticket appears as Unapproved and raises the built-in alert Unapproved database change (High, category Policy). Events are grouped into one alert per user and server. The alert's link opens Changes filtered to Unapproved and to that database user (shown as a removable user chip). The rule type is Unapproved change (no ticket) on Alerts & Notifications → Rules.

For the day-to-day review of changes, see Change reconciliation.

Troubleshooting

Symptom What to check
No change ticket source yet: matching is not running. Add at least one enabled source.
Test connection fails with 401 or 403 Credentials, token scope and, for Jira Cloud, the e-mail as user name.
ServiceNow returns no tickets Table name and Extra filter; the user needs read access to that table.
Jira returns no tickets The JQL must be valid on its own; QubeSight adds a filter on the update time. Check Deployment (Cloud and Data Center use different APIs).
Tickets are imported but never approved Adjust Values counted as approved to your approval states.
Every change is Unapproved Tickets have no planned window, or the window or tolerance does not cover the change time; or the change class is not one you track.
Many Needs review results Ask for ticket numbers in the SQL, or include object, database and server names in the ticket text.
A REST source imports nothing Check Path of the ticket list and the JSON paths in the field map.

Limitations

  • Integration is one way: tickets are read, never written back.
  • A sync reads at most 50,000 tickets.
  • Matching is rule-based and explainable; it does not use a language model.
  • Jira tickets without planned date fields use the creation and resolution times, which may not reflect the real change window.