HostMetric Cleanup task

This commit is contained in:
Martin Slemr
2023-03-27 12:06:22 +02:00
committed by Hao Liu
parent fff6fa7d7a
commit 6d4f92e1e8
5 changed files with 66 additions and 0 deletions

View File

@@ -822,6 +822,15 @@ register(
category_slug='system',
)
register(
'CLEANUP_HOST_METRICS_LAST_TS',
field_class=fields.DateTimeField,
label=_('Last cleanup date for HostMetrics'),
allow_null=True,
category=_('System'),
category_slug='system',
)
def logging_validate(serializer, attrs):
if not serializer.instance or not hasattr(serializer.instance, 'LOG_AGGREGATOR_HOST') or not hasattr(serializer.instance, 'LOG_AGGREGATOR_TYPE'):