From cbcaa149977d71ef5e46795e754b94e9dd7db74c Mon Sep 17 00:00:00 2001 From: Tomas Edwardsson Date: Sat, 21 Jun 2014 16:51:15 +0000 Subject: [PATCH] Add metrics without updates for known types Closes #13 --- check_package_updates/check_package_updates | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/check_package_updates/check_package_updates b/check_package_updates/check_package_updates index cd6851a..83cbd9c 100644 --- a/check_package_updates/check_package_updates +++ b/check_package_updates/check_package_updates @@ -45,6 +45,11 @@ def main(): for pkg in pkg_updates[update_type]: p.add_long_output(" %s" % pkg) + for m in known_types: + m = m.lower() + if not p.get_metric(m): + p.add_metric(m, 0) + p.check_all_metrics() p.exit()