Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to create jira ticket and getting error on alertmanager is "only GET allowed" #178

Open
PrakashNagarro opened this issue Oct 17, 2023 · 3 comments

Comments

@PrakashNagarro
Copy link

Hi Team, I have configure the jiralert and alertmanager with the document steps but Getting error in Alertmanager for jiralert on the below error:

ts=2023-10-17T14:28:18.019Z caller=dispatch.go:352 level=error component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="alerts-channels/webhook[0]: notify retry canceled due to unrecoverable error after 1 attempts: unexpected status code 400: http://jiralert:9097/alerts: only GET allowed"

Please help me to resolve the issue.

@PrakashNagarro PrakashNagarro changed the title unable to create jira ticket and out like "only GET allowed" unable to create jira ticket and getting error on alertmanager is "only GET allowed" Oct 17, 2023
@free
Copy link
Member

free commented Oct 18, 2023

Per the documentation, the webhook endpoint is /alert, not /alerts.

@PrakashNagarro
Copy link
Author

PrakashNagarro commented Oct 19, 2023

Hi @free ,

Thanks for your inputs and details. Yes I tried that "/alert" and "/alert/" at jiralert endpoint in the alertmanager config under webhook_config. but still I am getting error. Please check below,

If - url: 'http://jiralert:9097/alert/' then the error is on alertmanager only.

alertmanager  | ts=2023-10-19T06:34:42.982Z caller=dispatch.go:515 level=debug component=dispatcher aggrGroup="{}/{severity=\"low\"}:{alertname=\"InstanceDown\"}" msg=flushing alerts=[InstanceDown[19452ae][active]]

alertmanager  | ts=2023-10-19T06:34:42.983Z caller=dispatch.go:352 level=error component=dispatcher msg="Notify for alerts failed" num_alerts=1 err="alerts-channels/webhook[0]: notify retry canceled due to unrecoverable error after 1 attempts: unexpected status code 400: http://jiralert:9097/alert/: only GET allowed"

When we used - url: 'http://jiralert:9097/alert' , then both jiralert and alermanager thrown the below error,

alertmanager  | ts=2023-10-19T07:38:13.285Z caller=notify.go:745 level=warn component=dispatcher receiver=alerts-channels integration=webhook[0] aggrGroup="{}/{severity=\"low\"}:{alertname=\"InstanceDown\"}" msg="Notify attempt failed, will retry later" attempts=1 err="unexpected status code 500: http://jiralert:9097/alert: {\"Error\":true,\"Status\":500,\"Message\":\"JIRA request https://developcloudapp.atlassian.net/rest/api/2/search?fields=summary%2Cstatus%2Cresolution%2Cresolutiondate\\u0026jql=project%3D%22MON%22+and+labels%3D%22JIRALERT%7B57aadf1e36b0894abfef1a1d10a7a0e82e29b2319c9c3d00eec64de0d3144e75d2fd1b25e2e507c0a1fd156f24dcea1eb339e1425b12ced940c5c915ade03539%7D%22+order+by+resolutiondate+desc\\u0026maxResults=2 returned status 403 Forbidden, body \\\"\\\"\"}"

jiralert      | level=error ts=2023-10-19T07:38:13.629947363Z caller=main.go:173 msg="error handling request" statusCode=500 statusText="Internal Server Error" err="JIRA request https://developcloudapp.atlassian.net/rest/api/2/search?fields=summary%2Cstatus%2Cresolution%2Cresolutiondate&jql=project%3D%22MON%22+and+labels%3D%22JIRALERT%7B57aadf1e36b0894abfef1a1d10a7a0e82e29b2319c9c3d00eec64de0d3144e75d2fd1b25e2e507c0a1fd156f24dcea1eb339e1425b12ced940c5c915ade03539%7D%22+order+by+resolutiondate+desc&maxResults=2 returned status 403 Forbidden, body \"\"" receiver=alerts-channels groupLabels="unsupported value type"

@PrakashNagarro
Copy link
Author

Hi Team, any clue/ides/suggestions are welcome for my issue mentioned above comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants