Pandora FMS integrations: JIRA

After the integration of Pandora FMS with the Integria IMS ticketing tool, now it’s the turn of another one of the tools of the moment. It’s JIRA, from the manufacturer Atlassian. This tool has obtained a great growth in the last years. Initially, it was used for software development, but since JIRA Service Desk was introduced, it is also possible to use it as a ticketing tool, through the support center that is deployed in its installation. This opens a wide range of possibilities, to be able to have from the same tool, the management of software development, ticket management, and project management. This series of features, together with its add-on shop, have made JIRA present in many IT departments.

Throughout the world JIRA has more than 11,500 customers in 107 countries, so we have launched and started looking for ways in which Pandora FMS and JIRA can communicate. By reading this article we will link our Pandora FMS instance with our JIRA tool. We will be able to automate the management of incidents in JIRA instances in on-premise installations, as well as in Cloud instances.

We start from an environment where there is an instance of Pandora FMS, as a monitoring tool and JIRA Service Desk as a ticketing tool. Pandora FMS is in charge of guaranteeing the control in our infrastructure, it prevents possible failures that could happen in our environment and gives us a vision of the current state of it, either through the dashboards or through the service and network maps. On the other hand, through the JIRA tool (JIRA integration) the technicians of the technology department manage the different incidents related to the software and hardware of the enterprise IT infrastructure, so it is very useful that the alerts generated by an anomalous state in Pandora FMS generate an issue automatically in the ticketing tool.

In this way, we will be able to centralize all the anomalies referring to the technological infrastructure of our corporation. By reviewing the Atlassian documentation, we have verified that the integration between the two environments could be done using the JIRA API. In this way, we can bring together the best of the two tools and enhance their possibilities. From version 7 of JIRA the API is activated by default, so you don’t have to make any changes to the tool.

To do this integration we have developed a plugin, available in Pandora FMS plugin library. Its installation is simple, and it will allow us to automate the management of JIRA incidences (JIRA integration) at the moment in which an alert goes off due to a Pandora FMS module that has changed its state.

The first thing we will do to start with the JIRA integration in Pandora FMS will be to download the plugin from the library indicated above, and place it, for example, in the folder /usr/share/pandora_server/util/plugin/jira_ticket.sh next to the rest of scripts of Pandora FMS server, for this we can use WinSCP.

jira integration

Once with the file in our instance of Pandora FMS, we make sure that it has execution permissions, in case it doesn’t have them, we can add them quickly with the command chmod +x jira_create.sh
Now we have the plugin ready for configuration. In Pandora FMS, the alerts are based on three components, commands, actions and templates. Initially, we will create a new command based on the script jira_create.sh. To do this, go to the menu Alerts > Commands, and enter the command that will be launched when an alert is fired. The set command is as follows:

/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_ -s _field10_ -o _field11_ -m _module_id_

jira integration - configure alert command view

To execute the command with the variables we need, we have made use of the macros, the following have been established:

  • field1_ Corresponds to the URL of the JIRA instance
  • field2_ Corresponds to the API access user
  • field3_ Corresponds to the API user password
  • field4_ Corresponds to the project of the incidence
  • field5_ Corresponds to the title of the request
  • field6_ Corresponds to the description of the incident
  • field7_ Corresponds to the user to which the ticket is assigned
  • field8_ Corresponds to the type of incidence
  • field9_ Corresponds to the priority
  • field10_ Corresponds to security level
  • field11_ Corresponds to custom parameters
  • id_module_ Corresponds to the module that triggers the alert

It is important to bear in mind that two independent actions must be established, one for the generation of tickets and the other for their recovery.

When we want to create the action corresponding to the closing of incidences we must take into account that the parameters to use are different, as indicated in the example below:

jira integration - configure alert command - Jira recovery view

As you can see, the fields we will need are only:

  • field1_ Corresponds to the URL of the JIRA instance
  • field2_ Corresponds to the API access user
  • field3_ Corresponds to the API user password
  • id_module_ Corresponds to the module that triggers the alert
  • field4_ This field corresponds in this case with the trigger for recovery. This is a special value that will always be “validate” and that will serve to indicate to JIRA that the issue is resolved.

Now it’s time to set up the action. To do this, go to Alerts > Actions. In this section we introduce the real data of our instance, giving the values to the macros established in the previous step so that Pandora FMS is able to communicate with JIRA and to be able to carry out the issue’s opening. To define these fields with values, we can use Pandora FMS macros so the JIRA issue would be created with Pandora FMS information.

In our environment it would look like this:

jira integration - configure alert action - Jira ticket view

In Command preview we can check the command that Pandora FMS will execute when an alert is fired.

We have chosen to configure the fields with the following system macros, this is only a sample, you can configure it to your liking. It should be noted that to enter line breaks in the description of the ticket, we must indicate them in the field intended for this purpose with \n

jira integration - configure alert action - host

jira integration - configure alert action - type and priority

Let’s also look at an example of what a recovery alert for events would look like:

jira integration - configure alert action Jira recovery

jira integration - configure alert action host and user

For optimal management of the alerts in our installation it is advisable to link them to events. In this way, we will make sure that our environment is correctly monitored and warnings are generated for each module inside the agent we want.

It is important to remember once again that the processes of creation and resolution of alerts work in an independent way, so it will be necessary to create two events separately and to each one to assign the condition with which we want that it is triggered, as it could be that a module enters in critical state to generate the incidence and the return to the normal state to close the corresponding ticket in JIRA.

jira integration - event alerts

To check that everything works correctly and already with the plugin installed and configured we can test its operation forcing the triggering of an alert, for it we go to a Pandora FMS agent, we link an alert to a module and as an action we establish the creation of issue in JIRA.

Once the alert is launched, we access the JIRA instance to see the result:

jira integration

As we can see, Pandora FMS is a flexible monitoring tool, that allows the integration with other systems in a fast and simple way with the plugins library. All users of the Open Source version have access to this library, they can even develop their own and upload them so that the rest of users can use it in their instances. In addition, there are other plugins available for companies, available with the Enterprise version.

Incidents can be created in any project we have. We can even create a new project with its roles, its own workflow, its customized fields… or we can add a new type of incidence in an existing project and have controlled the Pandora FMS incidences, just to give some examples. The possibilities with JIRA integration are endless.

Thanks to this plugin, all the alerts that are fired in Pandora FMS will not only generate their corresponding ticket in JIRA, but we will be able to store the alert identifier with the associated module for possible verifications. This is especially useful for technicians who are solving different IT infrastructure problems, as they will automatically be assigned the issue to their incident queue. This way everything would be centralized. It can also be useful for generating reports in the JIRA tool, where we can have the incidents and use this information in add-ons such as eazyBI or Power Report.

banner full pandora fms free demo
banner tablet pandora fms free demo
banner mobile pandora fms free demo

About Pandora FMS

Pandora FMS is a flexible monitoring system, capable of monitoring devices, infrastructures, applications, services and business processes.
Of course, one of the things that Pandora FMS can control is the hard disks of your computers.
Would you like to know more about what Pandora FMS can offer you? Discover it by entering here: https://pandorafms.com

If you have more than 100 devices to monitor, you can contact us through the following form: https://pandorafms.com/en/contact/

Also, remember that if your monitoring needs are more limited you have at your disposal the OpenSource version of Pandora FMS. Find more information here: https://pandorafms.org

Do not hesitate to send us your queries. The Pandora FMS team will be happy to assist you!

Shares