# check for minio

# $1 : zabbix macro {$MINIO_ALIAS}
UserParameter=minio.prometheus_cluster[*],/usr/bin/sudo /usr/local/bin/mcli admin prometheus metrics $1 cluster
UserParameter=minio.prometheus_node[*],/usr/bin/sudo /usr/local/bin/mcli admin prometheus metrics $1 node
UserParameter=minio.prometheus_bucket[*],/usr/bin/sudo /usr/local/bin/mcli admin prometheus metrics $1 bucket
UserParameter=minio.prometheus_resource[*],/usr/bin/sudo /usr/local/bin/mcli admin prometheus metrics $1 resource

# $1 : zabbix macro {$MINIO_HOST}
# $2 : zabbix macro {$MINIO_PORT}
# Health check API https://min.io/docs/minio/linux/operations/monitoring/healthcheck-probe.html
UserParameter=minio.ping[*],/usr/bin/curl -s -o /dev/null --write-out '%{http_code}'  -I http://$1:$2/minio/health/live
