Merge pull request #2943 from hosseinsh/imporved-metrics-sources
emitting the count of certificates on the source
This commit is contained in:
commit
6102ec9267
|
@ -193,6 +193,11 @@ def sync_certificates(source, user):
|
||||||
s = plugins.get(source.plugin_name)
|
s = plugins.get(source.plugin_name)
|
||||||
certificates = s.get_certificates(source.options)
|
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:
|
for certificate in certificates:
|
||||||
exists, updated_by_hash = find_cert(certificate)
|
exists, updated_by_hash = find_cert(certificate)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue