Newer
Older
nextcloud-monitoring-dashboard / zabbix-agent-scripts / read_storage_metrics.py
@pmarini pmarini on 20 Dec 2023 316 bytes first commit of assets
## warnings are disabled as they confuse Zabbix
import warnings 

warnings.filterwarnings("ignore")

import json

import sys

# The metric is passed as a single parameter.
metric = sys.argv[1]

fl = open("/var/lib/zabbix/output/storage_metrics.json","r")

metric_values = json.load(fl)

print(metric_values[metric])