This python module allows you to create Jira tickets from Uptycs alerts.
Usage: ./uptjira.py <uptycs_apikey_file> [--domainsuffix <uptycs_domain>]
The --domainsuffix flag is only required for uptycs domains other than '.uptycs.io'
This python script reads alerts from Uptycs and creates JIRA tickets from them.
Each type of Uptycs alert to be processed must have a corresponding config file in
the "./alert_config/" directory. Each config file has the Uptycs alert code and JSON
for the Jira ticket.
The summary and description fields in the Jira JSON can reference the following Uptycs alert fields:
$upt_hostname
$upt_asset_id
$key
$value
$alert_time
The Jira ticket creation uses the following fields: project, issuetype, summary, description
Jira configuration details (server, user, auth_token) must be set in the file: jira_config.json
Each time this script is run it pulls alerts for codes specified in the ./alert_config/*.json files
with timestamp greater than the last run time and less than the current run time.
The first time it is run it goes back a maximum of 1 day.
We recommend running this script every 30 mins and specifying a maximum interval of 15 mins
for SQL alerts.