Valentin Doreau
f0f1213dbc
All checks were successful
Build package / typos (push) Successful in 1m31s
21 lines
389 B
Go
21 lines
389 B
Go
package apps
|
|
|
|
import (
|
|
"log"
|
|
"os/exec"
|
|
"strings"
|
|
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
)
|
|
|
|
func Minio(m Metrics) {
|
|
out, err := exec.Command("minio", "--version").Output()
|
|
if err != nil {
|
|
log.Printf(">> WARN: Unable to get Minio version: %v", err)
|
|
return
|
|
}
|
|
|
|
version := strings.Split(string(out), " ")[2]
|
|
|
|
m.Minio.With(prometheus.Labels{"version": version}).Set(1)
|
|
}
|