Allow using a custom livebox address
This commit is contained in:
parent
5abe206e27
commit
8215e950e9
11 changed files with 79 additions and 21 deletions
|
@ -14,7 +14,7 @@ var _ prometheus.Collector = &DeviceInfo{}
|
|||
|
||||
// DeviceInfo implements a prometheus Collector that returns Livebox specific metrics.
|
||||
type DeviceInfo struct {
|
||||
client livebox.Client
|
||||
client *livebox.Client
|
||||
numberOfRebootsMetric *prometheus.Desc
|
||||
uptimeMetric *prometheus.Desc
|
||||
memoryTotalMetric *prometheus.Desc
|
||||
|
@ -22,7 +22,7 @@ type DeviceInfo struct {
|
|||
}
|
||||
|
||||
// NewDeviceInfo returns a new DeviceInfo collector using the specified client.
|
||||
func NewDeviceInfo(client livebox.Client) *DeviceInfo {
|
||||
func NewDeviceInfo(client *livebox.Client) *DeviceInfo {
|
||||
return &DeviceInfo{
|
||||
client: client,
|
||||
numberOfRebootsMetric: prometheus.NewDesc(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue