policies: fix cached policy metric (#7068)

This commit is contained in:
Jens L 2023-10-05 02:05:01 +02:00 committed by GitHub
parent 83f9eae654
commit f28f301865
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -17,7 +17,7 @@ LOGGER = get_logger()
@receiver(monitoring_set)
def monitoring_set_policies(sender, **kwargs):
"""set policy gauges"""
GAUGE_POLICIES_CACHED.set(len(cache.keys(f"{CACHE_PREFIX}_*") or []))
GAUGE_POLICIES_CACHED.set(len(cache.keys(f"{CACHE_PREFIX}*") or []))
@receiver(post_save, sender=Policy)