How to Create Jira Issues
Fix Inventory constantly monitors your infrastructure, and can alert you to any detected issues.
One way to receive these alerts is via Jira. In this guide, we will configure Fix Inventory to create Jira issues when defined criteria is true.
Prerequisites​
This guide assumes that you have already installed and configured Fix Inventory to collect your cloud resources.
Directions​
-
Create an API token in Jira.
-
Define search criteria. For example, let's say instances that are older than 4 years are not permitted:
> search is(instance) and age>4yr
-
Now that we've defined the alert trigger, we will simply pipe the result of the search query to the
jira
custom command, replacing thetitle
with your desired issue title andurl
with your Jira URL. You also need to provide your credentials (username and API token), the project ID, and the reporting user ID:> search is(instance) and age>4yr | jira title="Fix Inventory found something!" message="The following instances are older than 4 years:" url="https://your-domain.atlassian.net" username="you@your-team.com" token="xxxxxxxxx" project_id="12345" reporter_id="1111111111111"
If the defined condition is currently true, you should see a new issue in Jira:
We do not recommend creating a job using the jira
command at this time, as this will result in the creation of a new ticket each hour while the search condition remains true.
For all parameters mentioned above you can specify defaults in the jira
custom command configuration, so that you can simply execute jira title="..."
.