selfprivacy-rest-api/selfprivacy_api/graphql/queries/monitoring.py

15 lines
300 B
Python
Raw Normal View History

2024-07-07 12:33:15 +00:00
import strawberry
2024-06-15 18:17:08 +00:00
from selfprivacy_api.utils.prometheus import PrometheusQueries
2024-06-10 01:57:41 +00:00
@strawberry.type
class Monitoring:
2024-06-10 02:27:37 +00:00
@strawberry.field
2024-06-15 18:17:08 +00:00
def disks_usage():
return PrometheusQueries.disks_usage()
2024-06-10 02:27:37 +00:00
2024-06-10 01:57:41 +00:00
@strawberry.field
2024-07-07 12:33:15 +00:00
def cpu_usage():
return PrometheusQueries.cpu_usage()