Merge pull request #2943 from hosseinsh/imporved-metrics-sources

emitting the count of certificates on the source
This commit is contained in:
Hossein Shafagh 2020-04-08 09:36:59 -07:00 committed by GitHub
commit 6102ec9267
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -193,6 +193,11 @@ def sync_certificates(source, user):
s = plugins.get(source.plugin_name)
certificates = s.get_certificates(source.options)
# emitting the count of certificates on the source
metrics.send("sync_certificates_count",
"gauge", len(certificates),
metric_tags={"source": source.label})
for certificate in certificates:
exists, updated_by_hash = find_cert(certificate)