Integrating Pandora FMS alerts in JIRA
This post is also available in: Spanish
JIRA integration? Doesn’t Pandora FMS already have a perfectly compatible ticketing tool in the form of Integria IMS? True, but JIRA, from the software stable Atlassian, has really taken off after being initially used for software development. When JIRA Service Desk was launched JIRA came into its own as a ticketing tool, in combination with the Service Desk that is deployed when the program is installed. Using the same software it’s possible to manage software development, tickets, and projects. These characteristics, in tandem with the add-ons library, have turned JIRA into a welcome guest in many IT departments.
JIRA now has more than 11,500 clients worldwide, so, priding themselves on its flexibility and adaptability, the good people at Pandora FMS HQ have started working on a project to get JIRA and Pandora FMS communicating. Read on if you want to find out how to integrate your Pandora FMS instance with your JIRA. It’s possible to automatize issue generation with on-premise or Cloud versions of JIRA.
Taking as an example starting point an IT installation monitored with Pandora FMS and with JIRA Service Desk as a ticketing tool. Pandora FMS provides the necessary oversight of the infrastructure, advising on possible errors and giving a global view of your environment, while JIRA and the technical staff manage the disparate hardware and software incidents, all meaning that, when Pandora FMS detects any anomalous activity JIRA automatically generates a ticket.
This is a way of centralizing all the data referring to your organization’s infrastructural anomalies. Taking a look at the Atlassian documentation, which sounds like a tome of ancient lore dreamt up by the inhabitants of a long-lost ocean continent, you can hook up both environments – Pandora FMS and JIRA – via JIRA’s API, thereby getting the best out of both. From version 7 of JIRA the API is activated by default, so you don’t need to change anything on the tool.
To carry out the integration the Pandora FMS dev team have developed a plugin (available at the Pandora FMS plugin library), which is easy to install and which automates issue creation on JIRA, generating a ticket the moment a module status changes on Pandora FMS and an alert is triggered.
The first thing you have to do is to download the plugin and put it in a file, e.g. – /usr/share/pandor_server/util/jira_create.sh – with the other Pandora FMS server scripts, using WinSCP, for example.
Once the file is uploaded, check that you have permission to execute. In case you don’t, the command chmod +x jira_create.sh will put things right.
The plugin is now ready to be configured. Pandora FMS alerts are based on three components; commands, actions and templates. To begin, create a command based on the jira_create.sh script by going to Alerts > Commands and introducing a command that will launch when an alert is triggered. Use the following command:
/usr/share/pandora_server/util/jira_create.sh -c _field1_ -u _field2_ -k _field3_ -t _field4_ -d "_field5_" -p "_field6_" -a _field7_ -g _field8_ -i _field9_
Now it’s time to configure the action. Go to Alerts > Actions and introduce your instance’s data, giving the values to the macros established previously. This allows Pandora FMS to communicate with JIRA and carry out the creation of issues. Use the Pandora FMS macros to define the values in each field so that the JIRA issue will be created with the data collected by Pandora FMS.
To give an example, in our environment, it looks like this:
As you complete the parameters at the bottom with values, you’ll be able to check the command that Pandora FMS executes when an alert is triggered in the Command preview.
We’ve opted to configure the fields with the following system macros. This is just an example, and you can configure as you like. It’s worth pointing out that in order to introduce line breaks in the ticket description, they should be indicated in the appropriate field with \n.
With the plugin installed and configured it’s time to verify that everything is working by forcing an alert to trigger. Attach a Pandora FMS agent to a module and establish issue creation on JIRA as the action to execute.
When the alert triggers check JIRA for the result:
As you can see, Pandora FMS is a flexible monitoring tool that allows cross-platform integration quickly and easily, with its plugin library able to solve any issue you may have. Everyone has access to the Open Source library, plus anyone can develop their own plugins and upload them for communal perusal and deployment. Enterprise version users also have an Enterprise plugin library, focused on business applications.
Issues can be created for any project, with its corresponding roles, workflows, custom fields etc. Alternatively, you can attach a new type of issue to an existing project and bring under control your Pandora FMS instances, for example. JIRA’s potential is almost infinite. Any alert triggered by Pandora FMS and configured with the Issue Creation action will have their corresponding ticket on the tool. This is particularly useful for technical staff who find themselves sorting out infrastructure problems, as the issue is automatically assigned to their incident queue, keeping everything centralized. It will also be useful with respect to report generation on JIRA, since the incident data is useful for other add-ons like eazyBI or Power Report.