I’ve had a “Host Action” in Icinga Web 2 with which I could fill a web form in an intermediate system that was able to create a ticket in Jira SD via Jira API.
That system will be shut down due to internal technology changes.
Unfortunately I don’t have direct access to the Jira SD API so that’s no option.
The idea was to have a form directly in Jira SD that could handle the content of the URL directly (without an intermediate system).
My problem is that some output of check plugins does contain special characters that corrupts the URL (e.g. “%”, “/”, etc.) which wasn’t a problem in the old system.
Examples:
“PING CRITICAL - Packet loss = 100%”
“check_ping: Invalid hostname/address”
The link for the “Host Action” is built like that:
The built-in action feature does not encode urls.
It sound reasonable to have a syntax like urlencode($host.name$). You can open a feature request on github:
or you could create an icingaweb2 module by yourself.
Here is an example of an IcingaDb Hostaction:
don’ forget to load it via run.php
In your code you can encode whatever you want, access the host object variables and so on…
Make sure you start with the training module to get all the basics right, like namespaces/ folders… :