switch to vanity import path
This commit is contained in:
parent
21ffc9ccde
commit
62b6f62b59
3 changed files with 21 additions and 11 deletions
24
exporter.go
24
exporter.go
|
@ -1,5 +1,5 @@
|
|||
// The lifepo4wered-exporter binary serves Prometheus metrics based on the output
|
||||
package main // import "gitea.drjosh.dev/josh/lifepo4wered-exporter"
|
||||
package main // import "drjosh.dev/lifepo4wered-exporter"
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
|
@ -11,7 +11,7 @@ import (
|
|||
"os/exec"
|
||||
"time"
|
||||
|
||||
"gitea.drjosh.dev/josh/jmetrics"
|
||||
"drjosh.dev/jmetrics"
|
||||
"github.com/prometheus/client_golang/prometheus"
|
||||
"github.com/prometheus/client_golang/prometheus/promauto"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
|
@ -30,12 +30,22 @@ var (
|
|||
)
|
||||
|
||||
lifepo4weredSummaries = map[string]*jmetrics.LiteGaugeSummary{
|
||||
"VIN": jmetrics.NewLiteGaugeSummary("lifepo4wered_voltage_in", "Voltage in (mV)"),
|
||||
"VOUT": jmetrics.NewLiteGaugeSummary("lifepo4wered_voltage_out", "Voltage out (mV)"),
|
||||
"VBAT": jmetrics.NewLiteGaugeSummary("lifepo4wered_voltage_bat", "Battery voltage (mV)"),
|
||||
"IOUT": jmetrics.NewLiteGaugeSummary("lifepo4wered_current_out", "Current out (mA)"),
|
||||
"VIN": jmetrics.NewLiteGaugeSummary(jmetrics.LiteGaugeSummaryOpts{
|
||||
Namespace: "lifepo4wered", Name: "voltage_in", Help: "Voltage in (mV)",
|
||||
}),
|
||||
"VOUT": jmetrics.NewLiteGaugeSummary(jmetrics.LiteGaugeSummaryOpts{
|
||||
Namespace: "lifepo4wered", Name: "voltage_out", Help: "Voltage out (mV)",
|
||||
}),
|
||||
"VBAT": jmetrics.NewLiteGaugeSummary(jmetrics.LiteGaugeSummaryOpts{
|
||||
Namespace: "lifepo4wered", Name: "voltage_bat", Help: "Battery voltage (mV)",
|
||||
}),
|
||||
"IOUT": jmetrics.NewLiteGaugeSummary(jmetrics.LiteGaugeSummaryOpts{
|
||||
Namespace: "lifepo4wered", Name: "current_out", Help: "Current out (mA)",
|
||||
}),
|
||||
}
|
||||
lifepo4weredPOutSummary = jmetrics.NewLiteGaugeSummary("lifepo4wered_power_out", "Power out (mW)")
|
||||
lifepo4weredPOutSummary = jmetrics.NewLiteGaugeSummary(jmetrics.LiteGaugeSummaryOpts{
|
||||
Namespace: "lifepo4wered", Name: "power_out", Help: "Power out (mW)",
|
||||
})
|
||||
|
||||
lifepo4weredHists = map[string]prometheus.Histogram{
|
||||
"VIN": promauto.NewHistogram(prometheus.HistogramOpts{
|
||||
|
|
4
go.mod
4
go.mod
|
@ -1,9 +1,9 @@
|
|||
module gitea.drjosh.dev/josh/lifepo4wered-exporter
|
||||
module drjosh.dev/lifepo4wered-exporter
|
||||
|
||||
go 1.23.1
|
||||
|
||||
require (
|
||||
gitea.drjosh.dev/josh/jmetrics v0.0.1
|
||||
drjosh.dev/jmetrics v0.0.3
|
||||
github.com/prometheus/client_golang v1.20.4
|
||||
)
|
||||
|
||||
|
|
4
go.sum
4
go.sum
|
@ -1,5 +1,5 @@
|
|||
gitea.drjosh.dev/josh/jmetrics v0.0.1 h1:s79Ye9SEAXen17hXFWuTjAhwjvgYs4L1YW2Vs9mdaR0=
|
||||
gitea.drjosh.dev/josh/jmetrics v0.0.1/go.mod h1:2nQ3pf8j3kSfLIjRVWrKWuWGPjh/TKnu7MDx6PFb4BM=
|
||||
drjosh.dev/jmetrics v0.0.3 h1:6xBfQQG4qzOLJeoQRD0gzmQqB3XkQueLYnCT/YqPR0A=
|
||||
drjosh.dev/jmetrics v0.0.3/go.mod h1:unknXjbR6aU7nTtXi80zvZLwTQdxEvoRtgIi4vCWx/g=
|
||||
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
|
||||
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
|
||||
github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
|
||||
|
|
Loading…
Reference in a new issue