GUI suggestion: remove a host from Icons action

  • For new user like me, I like to see option of removing 192.168.1.119 action available in action Icons popup.

image

You can already click on “Edit this host” and see a “Delete host” button there.

1 Like

If you really want to have a delete button there it is only possible with some strange hacks :slight_smile:

Define a “Custom action” with a link like this

javascript:(function(){document.body.innerHTML='<form method="POST" action="http://<my_mon_server>/<instance>/check_mk/webapi.py?action=delete_host&_username=automation&_secret=<automation_secret>"><input name="hostname" value="$HOSTNAME$"/></form>';document.forms[0].submit()})();

Then you can assign this action for the hosts as “custom icon and action”.

But i would strongly recommend also the way @r.sander has described.

3 Likes

I did not want to be that evil.

Thanks you providing the hack to create delete button. I will use @r.sander’s tip for now.
The delete/trashing button should leave to CMK GUI design team.

  • Following is adagios’ delete ops work-flow, looks more logical to me, IMHO.
  • actions are easily spotted.
    image
  • also asking if one want to remove the services also.
    image