alerta / alerta-contrib

Contributed integrations, plugins and custom webhooks
http://alerta.io
MIT License
119 stars 170 forks source link

Prometheus Ack timeout from alert not action #337

Closed satterly closed 3 years ago

satterly commented 3 years ago

Issue Summary

Plugin triggers the action to alertManager but timeout is gotten from alert.timeout instead of the action timeout (only available in take_action because it is not available in the alert.history at status_change method.

Environment

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....' or Run '...'
  3. Scroll down to '....'
  4. See error (include command output)

For web app issues, include any web browser JavaScript console errors.

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

NOTE: Please provide as much information about your issue as possible. Failure to provide basic details about your specific environment make it impossible to know if an issue has already been fixed, can delay a response and may result in your issue being closed without a resolution.

frasy commented 3 years ago

This error is only spotted using the API REST or the CLI because timeout is not asked for using the Web UI and the default timeout can be assumed.

My config is next: Environment

To Reproduce Steps to reproduce the behavior:

Expected behavior When sending an ACK to a prometheus alert I expect to have the timeout I send

client.action(id, 'ack', 'Test ACK', 4000)

The timeout should be 4000 instead of alert.timeout

angarilab commented 3 years ago

I am suffering the same issue that was mentioned in this post.

I just noticed this today, and It got my crazy to find out this bug