stdevel / check_katello_currency

A Nagios / Icinga plugin for checking patch currency of hosts managed by Foreman/Katello or Red Hat Satellite 6
GNU General Public License v3.0
1 stars 1 forks source link

Generating generic statistics fails #3

Closed stdevel closed 7 years ago

stdevel commented 7 years ago

Generating generic statistics fails:

Traceback (most recent call last):
  File "./check_katello_currency.py", line 562, in <module>
    main(options)
  File "./check_katello_currency.py", line 546, in main
    check_stats()
  File "./check_katello_currency.py", line 188, in check_stats
    bugs_warn = [x for x in SYSTEM_ERRATA if SYSTEM_ERRATA[x]["content_facet_attributes"]["errata_counts"]["bugfix"] >= options.bugs_warn]
KeyError: 'content_facet_attributes'
stdevel commented 7 years ago

This is forced by invalid content hosts (such as the Foreman/Katello host itself). The idea is to make the get_hosts function to respect hosts excluded by the -x / --exclude parameter.

stdevel commented 7 years ago

Finally fixed in commit 5ea6502716a6508b0a3add87cef529f9b34af1f3