Delete automatically hosts that didn't comunicate after x days

Hi all,
How can I delete hosts from the foreman that didn’t comunicate after x days automatically.


1 Like


You can take a look to this thread Automatically deleting a provisioned host.


Hi I install the tool
[root@nb-foreman foreman_webhooks]# gem install foreman_webhooks
Successfully installed foreman_webhooks-2.0.0
1 gem installed

But I don’t see it on the gui.
This is the command to install or i missing something? If I did ok so why I don’t see this plugin on the foreman web


We have the docs for this in progress at the moment:

The draft installation docs say

# yum install tfm-rubygem-hammer_cli_foreman_webhooks
  • Install the webhooks plugin using the following command:

[options=“nowrap” subs="+quotes,attributes"]

{foreman-installer} --enable-foreman-plugin-webhooks

  • Optionally, install the shellhooks plugin on each {SmartProxy} used for shellhooks, using the following command:

[options=“nowrap” subs="+quotes,attributes"]

{foreman-installer} --enable-foreman-proxy-plugin-shellhooks

  • Optionally, install the CLI plugin using the following command:

[options=“nowrap” subs="+quotes,attributes"]

yum install tfm-rubygem-hammer_cli_foreman_webhooks

I try all of the commands :\ noting work. (version of foreman 2.2.3)

Webhooks was released as part of Foreman 2.5, so that might explain it.

This would be the command:

# foreman-installer --enable-foreman-plugin-webhooks

# foreman-installer --enable-foreman-proxy-plugin-shellhooks

1 Like

[root@nb-foreman ~]# foreman-installer --enable-foreman-plugin-webhooks
ERROR: Unrecognised option ‘–enable-foreman-plugin-webhooks’

See: ‘foreman-installer --help’
[root@nb-foreman ~]# foreman-installer --enable-foreman-proxy-plugin-shellhooks
ERROR: Unrecognised option ‘–enable-foreman-proxy-plugin-shellhooks’


Webhooks is a feature introduced in a later version of Foreman than what you have installed.

Do you have any manual to upgrade ?

Sure, Foreman :: Manual

1 Like

Have to say today I don’t have luck :frowning:
I am getting error when I try to upgrade
root@nb-foreman ~]# foreman-installer -l
2021-07-28 14:52:49 [NOTICE] [root] Loading installer configuration. This will take some time.
2021-07-28 14:52:53 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2021-07-28 14:52:53 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2021-07-28 14:52:54 [ERROR ] [root] Parameter foreman-proxy-httpboot invalid: nil is not a valid boolean

Hi, do you actively use foreman-proxy-httpboot ? if you do not, disable it to see if that makes the installer goes through

1 Like

Hi everyone,
Thanks :slight_smile: I solved by upgrading my foreman.
Unfortunately I didn’t manages create webhook to delete computers that didn’t communicate with my foreman.( Just wanted to delete form the foreman hosts)