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

Generic statistics are broken if a system has no Katello agent installed #5

Closed stdevel closed 7 years ago

stdevel commented 7 years ago

Checking generic statistics breaks if a system has no Katello agent (resulting in missing content_facet_attributes dictionary):

...
Traceback (most recent call last):
File "/usr/lib64/nagios/plugins/check_katello_currency", line 567, in <module>
    main(options)
  File "/usr/lib64/nagios/plugins/check_katello_currency", line 551, in main
    check_stats()
  File "/usr/lib64/nagios/plugins/check_katello_currency", 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

Fixed in commit f6cf5f6efa46ba8ea9763d0a3cd14b1a4602abe7.