python-alerta-client icon indicating copy to clipboard operation
python-alerta-client copied to clipboard

alerta delete not removing all alerts

Open 3IMOH opened this issue 5 years ago • 1 comments

Issue Summary When running "alerta delete" it does not appear to remove them all. I have to run the command multiple times to get all of the alerts cleared. I have tried waiting for a couple of minutes after running the command but it does not help.

Example:

$ alerta delete Deleting all alerts. Do you want to continue? [y/N]: y Deleting 178 alerts [####################################] 100% $ alerta delete Deleting all alerts. Do you want to continue? [y/N]: y Deleting 129 alerts [####################################] 100% $ alerta delete Deleting all alerts. Do you want to continue? [y/N]: y Deleting 82 alerts [####################################] 100% $ alerta delete Deleting all alerts. Do you want to continue? [y/N]: y Deleting 34 alerts [####################################] 100% $ alerta delete Deleting all alerts. Do you want to continue? [y/N]: y $

Environment

  • OS: Linux

  • API version: 8.0.3

  • Deployment: self hosted

  • For self-hosted, WSGI environment: nginx/uwsgi

  • Database: Mongo

  • web UI version: 8.0

  • CLI version: 8.0

3IMOH avatar Oct 16 '20 13:10 3IMOH

This is a page size issue. If the default page size is less than the number of heartbeats you'll need to run the command repeatedly. I've made a note to review paging more generally so I'll address this issue at the same time. Thanks for bringing it to my attention.

satterly avatar Oct 24 '20 15:10 satterly