From 9f046cd88e5804cafee9c898247272c074a08273 Mon Sep 17 00:00:00 2001 From: Julius Volz Date: Thu, 28 May 2015 21:21:54 +0200 Subject: [PATCH] Run gofmt. --- collector/diskstats.go | 1 - collector/filesystem.go | 1 - collector/gmond.go | 1 - collector/interrupts.go | 2 -- collector/lastlogin.go | 1 - collector/loadavg.go | 2 -- collector/megacli.go | 3 +-- collector/netdev.go | 1 - collector/netstat.go | 1 - collector/runit.go | 3 --- collector/stat.go | 2 -- collector/tcpstat.go | 2 -- collector/time.go | 2 -- 13 files changed, 1 insertion(+), 21 deletions(-) diff --git a/collector/diskstats.go b/collector/diskstats.go index 1f61db20..93a3c455 100644 --- a/collector/diskstats.go +++ b/collector/diskstats.go @@ -26,7 +26,6 @@ var ( ) type diskstatsCollector struct { - ignoredDevicesPattern *regexp.Regexp metrics []prometheus.Collector } diff --git a/collector/filesystem.go b/collector/filesystem.go index 0640571a..c2be825a 100644 --- a/collector/filesystem.go +++ b/collector/filesystem.go @@ -25,7 +25,6 @@ var ( ) type filesystemCollector struct { - ignoredMountPointsPattern *regexp.Regexp size, free, avail, files, filesFree *prometheus.GaugeVec diff --git a/collector/gmond.go b/collector/gmond.go index 4694d085..30ceadf8 100644 --- a/collector/gmond.go +++ b/collector/gmond.go @@ -25,7 +25,6 @@ const ( type gmondCollector struct { metrics map[string]*prometheus.GaugeVec - } func init() { diff --git a/collector/interrupts.go b/collector/interrupts.go index 6ec40737..aebe184b 100644 --- a/collector/interrupts.go +++ b/collector/interrupts.go @@ -18,7 +18,6 @@ const ( ) type interruptsCollector struct { - metric *prometheus.CounterVec } @@ -30,7 +29,6 @@ func init() { // interrupts stats func NewInterruptsCollector() (Collector, error) { return &interruptsCollector{ - metric: prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: Namespace, diff --git a/collector/lastlogin.go b/collector/lastlogin.go index 05aee4a1..6ca16fab 100644 --- a/collector/lastlogin.go +++ b/collector/lastlogin.go @@ -17,7 +17,6 @@ import ( const lastLoginSubsystem = "last_login" type lastLoginCollector struct { - metric prometheus.Gauge } diff --git a/collector/loadavg.go b/collector/loadavg.go index 8f40e1dc..90643806 100644 --- a/collector/loadavg.go +++ b/collector/loadavg.go @@ -17,7 +17,6 @@ const ( ) type loadavgCollector struct { - metric prometheus.Gauge } @@ -29,7 +28,6 @@ func init() { // load, seconds since last login and a list of tags as specified by config. func NewLoadavgCollector() (Collector, error) { return &loadavgCollector{ - metric: prometheus.NewGauge(prometheus.GaugeOpts{ Namespace: Namespace, Name: "load1", diff --git a/collector/megacli.go b/collector/megacli.go index e83eb49b..f66da864 100644 --- a/collector/megacli.go +++ b/collector/megacli.go @@ -38,8 +38,7 @@ func init() { // RAID status through megacli. func NewMegaCliCollector() (Collector, error) { return &megaCliCollector{ - - cli: *megacliCommand, + cli: *megacliCommand, driveTemperature: prometheus.NewGaugeVec(prometheus.GaugeOpts{ Namespace: Namespace, Name: "megacli_drive_temperature_celsius", diff --git a/collector/netdev.go b/collector/netdev.go index 1df32919..a630ff16 100644 --- a/collector/netdev.go +++ b/collector/netdev.go @@ -24,7 +24,6 @@ var ( ) type netDevCollector struct { - metrics map[string]*prometheus.GaugeVec } diff --git a/collector/netstat.go b/collector/netstat.go index 6e93b6a6..67b9fba1 100644 --- a/collector/netstat.go +++ b/collector/netstat.go @@ -19,7 +19,6 @@ const ( ) type netStatCollector struct { - metrics map[string]prometheus.Gauge } diff --git a/collector/runit.go b/collector/runit.go index abb23f1a..4c359c25 100644 --- a/collector/runit.go +++ b/collector/runit.go @@ -9,8 +9,6 @@ import ( ) type runitCollector struct { - - state, stateDesired, stateNormal *prometheus.GaugeVec } @@ -26,7 +24,6 @@ func NewRunitCollector() (Collector, error) { ) return &runitCollector{ - state: prometheus.NewGaugeVec( prometheus.GaugeOpts{ Namespace: Namespace, diff --git a/collector/stat.go b/collector/stat.go index 68b7e409..80ceb3d8 100644 --- a/collector/stat.go +++ b/collector/stat.go @@ -17,7 +17,6 @@ const ( ) type statCollector struct { - cpu *prometheus.CounterVec intr prometheus.Counter ctxt prometheus.Counter @@ -35,7 +34,6 @@ func init() { // network device stats. func NewStatCollector() (Collector, error) { return &statCollector{ - cpu: prometheus.NewCounterVec( prometheus.CounterOpts{ Namespace: Namespace, diff --git a/collector/tcpstat.go b/collector/tcpstat.go index 1584f8f9..2753b45c 100644 --- a/collector/tcpstat.go +++ b/collector/tcpstat.go @@ -35,7 +35,6 @@ const ( ) type tcpStatCollector struct { - metric *prometheus.GaugeVec } @@ -47,7 +46,6 @@ func init() { // a new Collector exposing network stats. func NewTCPStatCollector() (Collector, error) { return &tcpStatCollector{ - metric: prometheus.NewGaugeVec( prometheus.GaugeOpts{ Namespace: Namespace, diff --git a/collector/time.go b/collector/time.go index 6a0ba69d..edbc839f 100644 --- a/collector/time.go +++ b/collector/time.go @@ -10,7 +10,6 @@ import ( ) type timeCollector struct { - metric prometheus.Counter } @@ -22,7 +21,6 @@ func init() { // the current system time in seconds since epoch. func NewTimeCollector() (Collector, error) { return &timeCollector{ - metric: prometheus.NewCounter(prometheus.CounterOpts{ Namespace: Namespace, Name: "time",