spacewalk-report goodness
An oft overlooked tool for satellite reporting is spacewalk-report. At a previous employer, I created API scripts to do various routine reporting functions. I found that most of these routine reports were included in the spacewalk-reports package.
The default reports available are:
# spacewalk-report (option)
channel-packages
channels
entitlements
errata-channels
errata-list
errata-list-all
errata-systems
inventory
kickstartable-trees
scap-scan
scap-scan-results
system-history
system-history-channels
system-history-configuration
system-history-entitlements
system-history-errata
system-history-kickstart
system-history-packages
system-history-scap
users
users-systems
One report that I find helpful is "# spacewalk-report inventory" You can dump it to a comma delimted format, and further manipulate the data as you see fit.
#spacewalk-report inventory > inventory.csv
The man page for spacewalk-report is pretty good, there is an option "--list-fields-info" that is helpful to run down the list and see whats available.
HTH!
Jim Lyle
Technical Account Manager(TAM)
Responses
Jan,
No spacewalk-report option available which shows the rpm's involved, but you may combine the following API's to accomplish this.
listOutOfDateSystems and listLatestUpgradablePackages.
I wrote a dirty python script using these api's. Hope this may be helpful
-----------------------------------
#!/usr/bin/python
import xmlrpclib
SATELLITE_URL = "https://satfqdn/rpc/api"
SATELLITE_LOGIN = "satusername"
SATELLITE_PASSWORD = "satpasswd"
## BELOW PROBABLY NEEDS NO MODIFICATION ##
client = xmlrpclib.Server(SATELLITE_URL, verbose=0)
key = client.auth.login(SATELLITE_LOGIN, SATELLITE_PASSWORD)
result = client.system.listOutOfDateSystems(key)
for info in result:
serverid = (info['id'])
print "update packages available for %s" %(info['name'])
print ""
pkg = client.system.listLatestUpgradablePackages(key, serverid)
for data in pkg:
print " %s-%s-%s.%s" %(data['name'],data['to_version'],data['to_release'],data['arch'])
print ""
client.auth.logout(key)
--------------------------------------
Thanks
Dipu
Yes can't see a way to list the rpms for the specific advisory using spacewalk-reports. This leaves you with the other best option at the momement of using API's.
To get this information in spacewalk-reports, it would be a good idea to file a RFE (Request Feature Enhancement) and provide additional details (if any) on how it would help your customers.
Paresh
Hi Jan,
You can open a case with Red Hat Support and mention the details about this feature request.Also you can add reference to this discussion thread so that the engineer working on it would get additional context on it. Once the case is created then our support team would discuss it further with Engineering/Product Management and keep you updated with the developments.
We have a video on Getting Started with Red Hat Support Cases - Part 1, Creating & Closing Cases.
Let me know if that helps you get started.
Paresh
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
