In Satellite 6.4, how do i list hosts with their associated content version?

Latest response

In the Satellite web interface...

I'm looking for a way to list Hosts, each with their associated Life Cycle Environment, Content View (name), and the Version of the Content View available to the associated Life Cycle Environment, and the count of outstanding updates/packages/errata for that host. Currently, I have to go to every host to see that info. content_view->Versions does not have a list of hosts. the closest I can get is a the list of Content Hosts, but that does not show the version of the Content View.

~~removed due to it confusing people~~
mock-up screen shot forethcoming.

for bonus points: also list a host's associated host-group, last report-in, and openSCAP stats. ;-)

full disclosure: I'm new to satellite. I started with 6.4.


Hi Brandon,

A quick option to give you some ideas:

# hammer  host list | awk -F"\|" '{print $2, $4, $(NF-1), $NF}'

--------------------------------------- ------------------------------------------------ ----------------- -----------------
 NAME                                    HOST GROUP                                       CONTENT VIEW      LIFECYCLE ENVIRONMENT
--------------------------------------- ------------------------------------------------ ----------------- -----------------

CLI hammer can do all you want, alboeit not in a single command.

Of course, one can use API to program it in Python, Ryby, Perl, and so on...


Dusan Baljevic (amateur radio VK2COT)

For last checkin, please refer to Red Rat article:


Dusan Baljevic (amateur radio VK2COT)

Dusan, Thanks for the response. I am already working on a little python+flask based satellite-helper site that uses the Hammer API. I was just hoping that there was a template file or something that I could use to add to the list of attributes listed on the Hosts UI page.

I realize now that my table my lead one to think I was talking about a command-line solution. I was not. I will clarify in the morning with pictures.

Hi, Could you please share the satellite-helper site info ? I want to use it. Thanks

after thinking about this, I now see how that would be hard to do. Composite views make what I am asking much more complex. hrm....

I am not sure if it is possible to do it with 1 single command, but using multiple commands it is possible.

  • Get all Content Views: hammer content-view list --organization [organization name]

  • Get all hosts associated with a content-view: hammer host list --search="content_view=[content-view name]"

You can replace the keyword "content_view" in the --search option with for example activation_key. This way you can get all required data.

Drop me a message if you need assistance with this.

I have updated the original post to limit this question to the Satellite web interface.

After reading the responses, I realized that no one understood what I am asking. I hope my update to the original post will clarify. Please do not suggest any more hammer commands. I know about hammer, and it will not fit this "screw". ;-)

the data I am wanting all on 1 page is ...

list of Hosts with associated:
  - Life Cycle Environment, 
  - Content View (name), 
  - the **Version** of the Content View,
  - and a count packages that are available to that host in that lifecycle for that content view version, but not installed/updated.

@Gary, that is a great avatar. Is that you?