mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-11-26 22:11:29 +00:00
19 lines
491 B
Python
19 lines
491 B
Python
import strawberry
|
|
|
|
from selfprivacy_api.utils.prometheus import PrometheusQueries, PrometheusQueryResult
|
|
|
|
|
|
@strawberry.type
|
|
class Monitoring:
|
|
@strawberry.field
|
|
def disk_usage() -> PrometheusQueryResult:
|
|
return PrometheusQueries.disk_usage()
|
|
|
|
@strawberry.field
|
|
def memory_usage() -> PrometheusQueryResult:
|
|
return PrometheusQueries.memory_usage()
|
|
|
|
@strawberry.field
|
|
def cpu_usage() -> PrometheusQueryResult:
|
|
return PrometheusQueries.cpu_usage()
|