package apps import ( "encoding/json" "net/http" "github.com/prometheus/client_golang/prometheus" ) func Vaultwarden(m Metrics) { var resp, err = http.Get("http://localhost:8080/api/version") if err != nil { return } defer resp.Body.Close() var version = new(string) json.NewDecoder(resp.Body).Decode(version) m.Vaultwarden.With(prometheus.Labels{"version": *version}).Set(1) }