Outstanding errat report

Can anyone point me in the right direction?

I am looking to query outstanding errata per host/content host/system
directly from the foreman database. I have a requirement to have weekly
reports sent to a team of engineers.

I have been able to find most of the fields that I need, but the errata per
server is eluding me.

Any help would be appreciated.

Craig Elston

You using the API for this or querying the database? Querying the database
is the way to insanity . . .

I did this for Satellite 5.x, but haven't looked at it for
Katello/Satellite6 yet. Not sure if all the queries are in place yet.
There was a ticket raised for querying the outstanding packages on a host
based on the Errata that are in Library rather than the hosts own
environment. This would allow you to see outstanding Errata as they come
into Katello/Satellite before they're promoted through your environments.
Have now been asked to look into this for work on our Satellite 6.2
install, so will share what I can.

··· On Friday, 26 August 2016 14:22:01 UTC+1, Craig Elston wrote: > > Can anyone point me in the right direction? > > I am looking to query outstanding errata per host/content host/system > directly from the foreman database. I have a requirement to have weekly > reports sent to a team of engineers. > > I have been able to find most of the fields that I need, but the errata > per server is eluding me. > > Any help would be appreciated. > > Craig Elston >

Thanks for the replies. I've found a way to get the data I'm looking for.
It will now allow me to query and join files to provide a report to all our
engineers with the information they need to stay on top of our patching
requirements.

For those interested & especially for Duncan (perhaps help with your
endeavours), the Hammer CLI can pull the data for us.

hammer -u "USERNAME" -p "PASSWORD" host errata list --host "HOSTNAME".

Regards

··· On Friday, August 26, 2016 at 3:22:01 PM UTC+2, Craig Elston wrote: > > Can anyone point me in the right direction? > > I am looking to query outstanding errata per host/content host/system > directly from the foreman database. I have a requirement to have weekly > reports sent to a team of engineers. > > I have been able to find most of the fields that I need, but the errata > per server is eluding me. > > Any help would be appreciated. > > Craig Elston >

> Any help would be appreciated.

Hello,

we introduced "exports" rake task recently. It's fairly documented here:

Simply drop your exporter code into:

/etc/foreman/exporters.rb.conf

and run the task. When you are done, share your exporter with us so we
can include it in the next release.

My ultimate goal is to use these exporters also from foreman-debug for
debugging purposes. We are not there yet.

··· -- Later, Lukas #lzap Zapletal