mirror of
https://github.com/prometheus/node_exporter.git
synced 2024-11-23 20:36:21 +01:00
Remove unused func, var, and const (#928)
Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
This commit is contained in:
parent
c9f421d0dd
commit
24a28fcc9e
@ -42,10 +42,6 @@ var (
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
func warnDeprecated(collector string) {
|
|
||||||
log.Warnf("The %s collector is deprecated and will be removed in the future!", collector)
|
|
||||||
}
|
|
||||||
|
|
||||||
const (
|
const (
|
||||||
defaultEnabled = true
|
defaultEnabled = true
|
||||||
defaultDisabled = false
|
defaultDisabled = false
|
||||||
|
@ -19,7 +19,6 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"regexp"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
@ -28,10 +27,6 @@ import (
|
|||||||
"github.com/prometheus/procfs"
|
"github.com/prometheus/procfs"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
|
||||||
digitRegexp = regexp.MustCompile("[0-9]+")
|
|
||||||
)
|
|
||||||
|
|
||||||
type cpuCollector struct {
|
type cpuCollector struct {
|
||||||
cpu *prometheus.Desc
|
cpu *prometheus.Desc
|
||||||
cpuGuest *prometheus.Desc
|
cpuGuest *prometheus.Desc
|
||||||
|
@ -22,7 +22,6 @@ import (
|
|||||||
"path/filepath"
|
"path/filepath"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/prometheus/client_golang/prometheus"
|
"github.com/prometheus/client_golang/prometheus"
|
||||||
@ -34,7 +33,6 @@ import (
|
|||||||
|
|
||||||
var (
|
var (
|
||||||
textFileDirectory = kingpin.Flag("collector.textfile.directory", "Directory to read text files with metrics from.").Default("").String()
|
textFileDirectory = kingpin.Flag("collector.textfile.directory", "Directory to read text files with metrics from.").Default("").String()
|
||||||
textFileAddOnce sync.Once
|
|
||||||
mtimeDesc = prometheus.NewDesc(
|
mtimeDesc = prometheus.NewDesc(
|
||||||
"node_textfile_mtime_seconds",
|
"node_textfile_mtime_seconds",
|
||||||
"Unixtime mtime of textfiles successfully read.",
|
"Unixtime mtime of textfiles successfully read.",
|
||||||
|
Loading…
Reference in New Issue
Block a user