Add addtional column to Host page

I want to add additional column to below image, is that possible ?

Foreman and Proxy versions:
foreman 2.5
Distribution and version:
Ubuntu 18.04 LTS

Thanks in advance


There is GitHub - theforeman/foreman_column_view: A simple Foreman plugin showcasing Deface for altering the Hosts view but the installation should mention that you can use the installer (foreman-installer --enable-foreman-plugin-column-view from the top of my head). Perhaps that helps you?

1 Like

thank you so much @ekohl , I had below error with that:

#: foreman-installer --enable-foreman-plugin-column-view
2021-07-13 10:57:26 [NOTICE] [root] Loading installer configuration. This will take some time.
2021-07-13 10:57:34 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2021-07-13 10:57:34 [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-13 10:57:36 [ERROR ] [root] Parameter foreman-plugin-column-view-columns invalid: Hash value elements are invalid: nil is not a valid hash
Error during configuration, exiting

I install the plugin via apt-get, and its listed in plugins on GUI:

but the file /etc/foreman/plugins/foreman_column_view.yaml is not available, is there any trick or any .example files ?

thanks in advance

check this file /etc/foreman/plugins/foreman_column_view.yaml.example, adapt it, rename it and restart foreman.

This file is available with rpm, not sure with apt flavour. If not, here the sample:

cat /etc/foreman/plugins/foreman_column_view.yaml.example
# Copy this file to foreman_column_view.yaml to enable, then restart Foreman
# See tfm-rubygem-foreman_column_view-doc and /opt/theforeman/tfm/root/usr/share/gems/gems/foreman_column_view-0.4.0/ for more information
    :title: Architecture
    :after: last_report
    :content: facts_hash['architecture']
    :title: Uptime
    :after: architecture
    :content: facts_hash['uptime']
1 Like

thanks for your answer @kobena.

Its available on apt too, but you have to create the file foreman_column_view.yaml its not created by default with .example

What I dont find is how to create linke for the content parameter. I want to link that also to the host.

What do you mean by content parameter ? Content View ? Smart Proxy ?

1 Like

Here I want to have something like :

:content: link_to( facts_hash['architecture']) so the user can click on the architecture and go to next page.

if you need a link_to, not sure you can use facts_hash.

Maybe something like this may works:

    :title: Architecture
    :after: last_report
	:content: link_to(#{host.architecture}, "https://katello.fqdn/hosts?search=architecture+%3D+#{host.architecture}")

Just check the link to access to your architectures, it seems look like this form:


Sorry I can’t help you more, my ruby ​​knowledge ends here.

1 Like

thank you so much, I edit 2 foreman files! and it works for me and did what I want.
But I have to be carefull when I update the foreman :smiley: ! I have to edit them again!

I’ll check your solution too, its better if that works!

thank you again @kobena


In addition, when I have this type of need from a client, I avoid as much as possible adding plugins nor customizing Katello as much as possible. Updates are getting more and more complicated, and I’m never sure I’m going backwards.

Now, I manage this type of need by developing a prometheus exporter and by using Katello APIs, and by making beautiful grafana dashboards. Usually, it does the job if you don’t have 10,000 hosts and thousand of metrics. If this is the case, massively multiprocessing and pagination must be used.

1 Like

You are right, but in this case its for me, it makes a little bit easier, now I dont have to search in another system for the host. Now I can click that in foreman and I go directly to the next system when I click on it.

its on my To-Do-List but I dont have time for it :frowning:

delighted to have been able to exchange with you :wink:

Do not hesitate to close this topic if you consider your problem solved

1 Like

me too @kobena thank you again

of course Ill do that :slight_smile: