Kibana - Monitoring Management - Delete Project Monitors

Hi, i tested docker elastic-agent-complete 8.4.1 and created a test uptime/synthetics project monitor, how do you delete it? It is saying that the monitor was added as an external project. to delete the monitor, remove it from the project and push the configuration again. Are there docs on how to do this? Thanks

Hello @adsandie ,

I believe you used a push command from synthetics agent to add these monitors. In that case, you can just delete the source of monitors and push them again. It will delete those stale monitors. Currently we have a bug where you can't delete all the monitors. So make sure to leave one monitor in the source.

Regards

We have an open PR to fix this feat: delete entire project via push command by vigneshshanmugam · Pull Request #598 · elastic/synthetics · GitHub

Hi @adsandie,

We have a new Synthetics agent release - Release v1.0.0-beta.35 · elastic/synthetics · GitHub which would let you delete an entire project if there are no monitors found.

  1. To delete a single monitor - Delete the journey from local journey folder and run the push command
SYNTHETICS_API_KEY="key"  npx @elastic/synthetics push
  1. To delete an entire project, Delete all the journey files (*.journey.(ts|js)) and run the push command.

Please do let us know if you need more help.

Thanks,
Vignesh

Hi.

Yes i used a push command but unfortunately, i deleted the entire directory of the project. upon recreating the project, it tried to duplicate the monitor id/name as shown from the screenshot. When i deleted the javascript file (journey), it is saying no monitor found. I'll try the new Synthetics agent v1.0.0.beta.35 from [vigneshshanmugam] post.

Thank you.

I was able to delete some of the monitors using - Release v1.0.0-beta.35 but those that are created/pushed using whitespace/blank fields for the "project id" or "journey name" are hard to delete.

Thanks for the feedback. Yeah unfortunately, you would need to at-least remember the projectId so that when you push the next time, the outdated monitors/journeys would be marked as stale and deleted.

We are also planning to make the project as the first class entity going forward, so you could list/delete/ an entire project from the CLI which would provide a better experience for the above scenario you mentioned.

Thanks,
Vignesh

This topic was automatically closed 24 days after the last reply. New replies are no longer allowed.