It is always a luxury to show off a new plugin in Pandora FMS, and for that reason we decided to devote an article in style to this Zendesk plugin on our blog. We will discuss what it is and how it can help us. Step by step, and concisely, so that no one gets lost along the way.
New Zendesk plugin added to Pandora FMS
But first: What is Zendesk?
Zendesk is a platform that channels the different communication modes between customer and company through a ticketing system.
A consolidated CRM company, devoted specifically to customer service, which designs software to improve relationships with users. Known for growing and innovating while building bonds and putting down roots in the communities where it lives. Its software, such as Pandora FMS, is very advanced and flexible, being able to adapt to the needs of any growing business.
The plugin we are talking about today allows you to create, update and delete Zendesk tickets from the terminal, or from Pandora FMS console. For that, it makes use of the API of the service, which allows this system to be integrated into other platforms. Using a series of parameters, which would be the configurable options of the ticket, you may customize them as if you were working from Zendesk itself.
Zendesk Ticket System
Zendesk has an integrated ticketing system, with which you may track support tickets, prioritize them and resolve them.
To the point: System configuration to use the plugin.
To make use of the plugin, enable access to the API, either using password or token.
Do it from the API section in the administrator menu.
The plugin makes use of a number of parameters when creating, updating or deleting tickets. With them you may configure the ticket according to your own criteria and needs. Just as you would do it from Zendesk’s own system.
With this option you will choose whether to create, update or delete the ticket. Use post to create it, put to update it, and delete to delete it.
IP or hostname
With this alternative you may add the ip or name of your site. Sites usually have this format:
For example, mine is https://pandoraplugin.zendesk.com/. So, in this case, it should be pandoraplugin.
* If the full url is placed, it will not work.
Your username. Usually the email with which you signed up in Zendesk. Use this option, combined with password or token, depending on how you have it enabled.
The password to authenticate with the API.
The token to authenticate to the API. If you use this option, you do not have to use the password option.
The name to be given to the ticket.
Ticket text. It should be enclosed in quotation marks.
Ticket ID. This option is for when you want to update or delete a ticket.
The status of the ticket, which can be new, open, hold, pending, solved or closed.
The priority of the ticket, which can be urgent, high, normal or low.
The ticket type, which can be problem, incident, question or task.
By running the plugin with the appropriate parameters you may create tickets:
python3 pandora_zendesk.py -m post -i <ip or site name> -us <user> -t <token> -tn <ticket name> -tb <ticket content> -tp <priority> -tt <type> -ts <ticket status>
With the following command:
python3 pandora_zendesk.py -m post -i pandoraplugin -us [email protected] -t <token> -tn "Problem with X" -tb "Something is giving some problem" -tp urgent -tt task -ts new
Interact with the API and the ticket will be created in your system.
You may update the tickets. The parameters are the same as in creation, but you have to add also the id, which will be the id of the ticket to be updated.
python3 pandora_zendesk.py -m put -i <ip or site name> -us <user> -t <token> -id <id ticket> -tn <ticket name> -tb <ticket content> -tp <priority> -tt <type> -ts <ticket status>
Let’s update the ticket we created in the example above, which has id #24
With the following command:
We see that the ticket has been updated and moved to pending tickets.
You may also delete a ticket by searching it by its ID with the following command:
python3 pandora_zendesk.py -m delete -i <ip o host> -us <user> -t <token> -id <id ticket>
Use of the plugin from Pandora FMS console
You will be able to execute the plugin from the console, by means of an alert, which will make the use of the plugin easier.
To that end, go to the menu Commands in alerts:
Inside, create a new command that you will use to create alerts. To achieve this, run the plugin by entering its path and use a macro for each of the parameters used to create a ticket.
Add the description to each of these macros:
Once the command is saved, create an action to which assign this created command:
In each field below (the one of each macro where you have added a description when creating the command), add the value that you would have added to the parameter.
Once you have filled in all the fields of the necessary parameters, click Create.
Once done, go to List of alerts (don’t worry, once configured, you won’t have to repeat the process for each ticket you want to create), and create one.
Designate an agent and a module (it does not matter which one), and assign the action you just created. In the template, set the manual alert.
Once completed, click Add alert.
Now, to run the plugin, go to the view of the agent that you assigned to the alert and you will see it there. You may execute it by clicking the icon Force.
To establish different tickets, go to the action you created and change the values of the fields.
Just as we generated an alert for ticket creation, you may make another to update them and another to delete them to allow the use of the optimized plugin.
More integrations in ticketing services
Apart from Zendesk, there are more ticketing services that can be used from Pandora FMS by using a plugin. These are Redmine and Zammad, which have new plugins with which to create, update and delete tickets in these systems. And Jira and OTRS, which also have a plugin in the library that allows you to use these services easily from Pandora FMS.
Alejandro Sánchez Carrión, desarrollador junior, aficionado a la historia, los videojuegos y los comics, también gran aficionado al fútbol y al Real Madrid. De Alcalá de Henares, como el Quijote. Me encargo de desarrollar, modificar y documentar plugins en el departamento de proyectos.
Alejandro Sánchez Carrión is a junior developer, a fan of history, videogames and comics, and also a big fan of football and Real Madrid. From Alcalá de Henares, like Quixote. I’m in charge of developing, modifying and documenting plugins in the projects department.