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

Plugin dies in a fire when host non-existent #9

Open stdevel opened 6 years ago

stdevel commented 6 years ago

If a host does not exist, the plugin fails. Would be great to have an error message instead:

Traceback (most recent call last):
File "/usr/lib64/nagios/plugins/check_katello_currency.py", line 547, in <module>
    main(options)
  File "/usr/lib64/nagios/plugins/check_katello_currency.py", line 533, in main
    check_systems()
  File "/usr/lib64/nagios/plugins/check_katello_currency.py", line 87, in check_systems
    SYSTEM_ERRATA[system]["content_facet_attributes"]["errata_counts"]
KeyError: 'pinkepank.giertz.loc'