how to change jira.Summary values?
Hello
How do I change the jira.summary template by entering ".Status: .jobname .alertname"?
I tried to configure jira.summary as follows:
"{{.Status | toUpper}} {{if eq .Status" firing "}}: {{.Alerts.Firing | len}} {{end}} {{.CommonLabels.alertname}} for {{.CommonLabels. job}}}} "
However, when checking the Logs, I noticed that when forwarding the call to Jira, he returns error below:
"level = error ts = 2019-09-27T19: 30: 51.012349498Z caller = main.go: 142 msg =" error handling request "statusCode = 500 statusText =" Internal Server Error "err =" JIRA request https: // jira_url .com / rest / api / 2 / issue / OPTI-12763 returned status 400, body \ "\" "receiver = jiralert groupLabels =" unsupported value type ""
Hi, All
Please, Is there any position?
Thanks very much
Att,
Fernando Beltrame
I'm also seeing the same error message (groupLabels="unsupported value type") Any pointers?
The groupLabels="unsupported value type" could simply be due to logfmt (which JIRAlert uses for logging) being unable to log a map[string]string (which is what groupLabels is) in a structured log. And is likely unrelated to the root cause (i.e. why JIRA returns a HTTP 400).
The latter could e.g. be caused by the issue summary including characters that are not accepted. (Maybe terminating with a space?) Or it could be a bug in JIRAlert that causes it to produce an invalid request (which is what HTTP 400 stands for).
For me, it's a HTTP 500 error:
level=error ts=2020-01-09T01:34:49.698466622Z caller=main.go:143 msg="error handling request" statusCode=500 statusText="Internal Server Error" err="JIRA request https://myjira.mycompany.com/rest/api/2/search?jql=project%3D%22MYPROJECT%22+and+labels%3D%22ALERT%7Balertname%3D%5C%22TestAlert%5C%22%7D%22+order+by+resolutiondate+desc&maxResults=2&fields=summary,status,resolution,resolutiondate returned status 400 , body \"\"" receiver=jira-ab groupLabels="unsupported value type"
When i paste the same API url into my web browser, i also get a HTTP 500.
It looks like Jira doesn't like ALERT{alertname="TestAlert"} I'm using Jira v7.4.4 Which version of Jira supports that syntax: ALERT{alertname="TestAlert"} ?
Thanks --Andrew
I'm also getting the error groupLabels="unsupported value type"
Can't find out the reason..
@free Could you please help on how to fix that problem (maybe how to change log format)?
I am facing the same kind of problem here. It would be very much appreciated if we could have those following information:
- jira project configuration (How to configure the fields within issues and related workflow in JIRA to match jiralert configuration/template)
- jiralert/jira releases compliance