mirror of
https://github.com/tubearchivist/tubearchivist-metrics.git
synced 2025-07-03 00:41:09 +00:00
12 lines
292 B
Python
12 lines
292 B
Python
from esconnect import ElasticWrapper
|
|
|
|
|
|
class GetMetrics:
|
|
@staticmethod
|
|
def count(index_name):
|
|
|
|
"""Get count of documents from ES"""
|
|
result = ElasticWrapper.get_count(index_name)
|
|
print("Metric for " + index_name + ": " + str(result))
|
|
return int(result)
|