Documentation
¶
Overview ¶
Package uptimekuma implements the Uptime Kuma monitoring provider.
Index ¶
Constants ¶
View Source
const ( UP = 1 DOWN = 0 PENDING = 2 MAINTENANCE = 3 )
View Source
const ( ID = "uptimekuma" EndpointKey = "endpoint" TokenKey = "token" )
View Source
const MonitorStatusMetric = "monitor_status"
MonitorStatusMetric Monitor Status (1 = UP, 0= DOWN, 2= PENDING, 3= MAINTENANCE)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UptimeKuma ¶
type UptimeKuma struct {
// contains filtered or unexported fields
}
UptimeKuma is an HTTP client for Uptime Kuma Prometheus metrics.
func GetClient ¶
func GetClient() *UptimeKuma
GetClient builds an Uptime Kuma client from vendors.uptimekuma config. Returns nil when endpoint is not configured.
func NewUptimeKuma ¶
func NewUptimeKuma(endpoint, token string) *UptimeKuma
NewUptimeKuma creates an Uptime Kuma client with Basic auth (empty user + token). Returns nil when endpoint is empty.
func (*UptimeKuma) Health ¶ added in v0.96.2
func (i *UptimeKuma) Health(ctx context.Context) error
Health reports whether the /metrics endpoint is reachable with a 2xx status.
func (*UptimeKuma) Metrics ¶
func (i *UptimeKuma) Metrics(ctx context.Context) (map[string]*dto.MetricFamily, error)
Metrics fetches and parses Prometheus metrics from /metrics.
Click to show internal directories.
Click to hide internal directories.