Hi all, first time posting, glad to be here. I have spent quite a bit of time troubleshooting an issue and I am stumped and could use some advice. I also could not find an answer to this already in this forum.
The task that I am trying to accomplish is to use Zabbix's JIRA Service Desk Media Type to auto create tickets from Zabbix alerts. This works if I am not using a custom field in the JIRA request type that is single-select from multiple values.
Example that does not work
JIRA request type: SUPPORT
Custom field (not optional): 'Environment' with a drop down to choose one of 2 choices: TESTERS or PRODUCTION
Example that does work
JIRA request type: CHANGE
Custom field: 'RESOURCE' with just one value: VM
What happens is that for the non-working example, JIRA Zabbix errors out with what is listed below. The screenshot is from the Zabbix Action log. It is a problem with the formatting of the value because JIRA sees it as part of an array.
In the Media Type, for the custom field, I have tried the following formats (the IDs are correct):
TESTERS
"TESTERS"
{TESTERS}
{ TESTERS }
{"TESTERS"}
{ "TESTERS" }
{ "value": "TESTERS" }
{ "id": 10112 }
[{ "value": "TESTERS" }]
[{ "id": 10112 }]
I found the following excerpt in the JIRA Atlassian API documentation.
Single-select custom field: A custom field that allows you to select a single value from a defined list of values. You can address them by value or by ID.
Copy
"customfield_11449" : { "value": "option3" }
or
Copy
"customfield_11449" : { "id": 10112 }
Anyone have any ideas or run into this before? Also, I have to accomplish this without altering anything in JIRA itself.
Thank you -
Hi,
Anyone find a solution?
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was not able to get custom fields to work within the Media types in Zabbix. I think that this is because Zabbix does not support certain symbols in the fields.
As a work around, I just wrote a script to do a curl and placed it in /usr/lib/zabbix/alertscripts on the Zabbix server.
Then, I have an action in Zabbix that calls the script from Administration -> Scripts -> JSD (the script is /usr/lib/zabbix/alertscripts/JSD/jsd.sh).
Part of the format in the script looks like this (variables defined earlier in the script):
-d '{
"serviceDeskId": "1",
"requestTypeId": "2",
"requestFieldValues": {
"summary": "'"$jsd_summary"'",
"description": "'"$jsd_problem \n $jsd_start \n Host: $jsd_host \n $jsd_severity \n \n Please assign to the proper owner for remediation. \n"'",
"customfield_10901": {"value":"Support","id":"10400","disabled":false},
"customfield_10301": "noreply@server.com",
"customfield_10309": "user.id"
}
}'
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mind sharing the whole thing? I'm pretty new to this and we're running into a problem after requiring certain custom fields.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.