From 3bc9a93c209636743429b69c517b932cd5b178c9 Mon Sep 17 00:00:00 2001 From: Ben Kochie Date: Sat, 14 Nov 2020 11:53:51 +0100 Subject: [PATCH] Add ErrorLog plumbing to promhttp Fix the error logging of the promhttp handler by connecting it to the promlog setup. * Switch to go-kit/log. * Cleanup CHANGELOG. Fixes: https://github.com/prometheus/node_exporter/issues/1886 Signed-off-by: Ben Kochie --- CHANGELOG.md | 7 +++++-- collector/arp_linux.go | 2 +- collector/bcache_linux.go | 2 +- collector/bonding_linux.go | 4 ++-- collector/boot_time_bsd.go | 2 +- collector/boot_time_openbsd_amd64.go | 2 +- collector/boot_time_solaris.go | 2 +- collector/btrfs_linux.go | 2 +- collector/buddyinfo.go | 4 ++-- collector/collector.go | 4 ++-- collector/conntrack_linux.go | 4 ++-- collector/cpu_darwin.go | 2 +- collector/cpu_dragonfly.go | 2 +- collector/cpu_freebsd.go | 4 ++-- collector/cpu_linux.go | 4 ++-- collector/cpu_openbsd.go | 2 +- collector/cpu_openbsd_amd64.go | 2 +- collector/cpu_solaris.go | 2 +- collector/cpufreq_linux.go | 2 +- collector/cpufreq_solaris.go | 2 +- collector/devstat_dragonfly.go | 2 +- collector/devstat_freebsd.go | 2 +- collector/diskstats_darwin.go | 2 +- collector/diskstats_linux.go | 4 ++-- collector/diskstats_openbsd.go | 2 +- collector/diskstats_openbsd_amd64.go | 2 +- collector/drbd_linux.go | 4 ++-- collector/edac_linux.go | 2 +- collector/entropy_linux.go | 2 +- collector/exec_bsd.go | 2 +- collector/fibrechannel_linux.go | 4 ++-- collector/filefd_linux.go | 2 +- collector/filesystem_bsd.go | 2 +- collector/filesystem_common.go | 4 ++-- collector/filesystem_freebsd.go | 2 +- collector/filesystem_linux.go | 4 ++-- collector/filesystem_linux_test.go | 2 +- collector/filesystem_openbsd_amd64.go | 2 +- collector/hwmon_linux.go | 4 ++-- collector/infiniband_linux.go | 4 ++-- collector/interrupts_common.go | 2 +- collector/ipvs_linux.go | 4 ++-- collector/ipvs_linux_test.go | 2 +- collector/ksmd_linux.go | 2 +- collector/loadavg.go | 4 ++-- collector/logind_linux.go | 2 +- collector/mdadm_linux.go | 4 ++-- collector/meminfo.go | 4 ++-- collector/meminfo_numa_linux.go | 2 +- collector/memory_bsd.go | 2 +- collector/mountstats_linux.go | 4 ++-- collector/netclass_linux.go | 4 ++-- collector/netdev_bsd.go | 4 ++-- collector/netdev_common.go | 4 ++-- collector/netdev_darwin.go | 4 ++-- collector/netdev_linux.go | 4 ++-- collector/netdev_linux_test.go | 2 +- collector/netdev_openbsd.go | 4 ++-- collector/netdev_openbsd_amd64.go | 4 ++-- collector/netstat_linux.go | 2 +- collector/network_route_linux.go | 2 +- collector/nfs_linux.go | 4 ++-- collector/nfsd_linux.go | 4 ++-- collector/ntp.go | 2 +- collector/perf_linux.go | 4 ++-- collector/perf_linux_test.go | 2 +- collector/powersupplyclass.go | 2 +- collector/pressure_linux.go | 4 ++-- collector/processes_linux.go | 4 ++-- collector/processes_linux_test.go | 2 +- collector/qdisc_linux.go | 2 +- collector/rapl_linux.go | 4 ++-- collector/runit.go | 4 ++-- collector/schedstat_linux.go | 4 ++-- collector/sockstat_linux.go | 4 ++-- collector/softnet_linux.go | 2 +- collector/stat_linux.go | 2 +- collector/supervisord.go | 4 ++-- collector/systemd_linux.go | 4 ++-- collector/systemd_linux_test.go | 2 +- collector/tcpstat_linux.go | 2 +- collector/textfile.go | 4 ++-- collector/textfile_test.go | 2 +- collector/thermal_zone_linux.go | 2 +- collector/time.go | 4 ++-- collector/timex.go | 4 ++-- collector/udp_queues_linux.go | 4 ++-- collector/uname.go | 2 +- collector/vmstat_linux.go | 2 +- collector/wifi_linux.go | 4 ++-- collector/xfs_linux.go | 2 +- collector/zfs.go | 4 ++-- collector/zfs_freebsd.go | 2 +- collector/zfs_linux.go | 2 +- collector/zfs_solaris.go | 2 +- collector/zoneinfo_linux.go | 2 +- go.mod | 4 ++-- go.sum | 7 ++++++- node_exporter.go | 6 ++++-- scripts/errcheck_excludes.txt | 2 +- 100 files changed, 155 insertions(+), 145 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a37472fc..12898ad3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,16 @@ ## master / unreleased -* [CHANGE] Rename flags `collector.filesystem.ignored-mount-points` and `collector.filesystem.ignored-fs-types` to match other collectors +* [CHANGE] * [FEATURE] * [ENHANCEMENT] * [BUGFIX] -Note: Ignoring invalid network speed will be the default in 2.x +NOTE: Ignoring invalid network speed will be the default in 2.x +NOTE: Filesystem collector flags have been renamed. `--collector.filesystem.ignored-mount-points` is now `--collector.filesystem.mount-points-exclude` and `--collector.filesystem.ignored-fs-types` is now `--collector.filesystem.fs-types-exclude`. The old flags will be removed in 2.x. +* [CHANGE] Rename filesystem collector flags to match other collectors #2012 * [FEATURE] Add flag to ignore network speed if it is unknown #1989 +* [BUGFIX] Add ErrorLog plumbing to promhttp #1887 ## 1.1.2 / 2021-03-05 diff --git a/collector/arp_linux.go b/collector/arp_linux.go index 86cb78a1..e2fccc18 100644 --- a/collector/arp_linux.go +++ b/collector/arp_linux.go @@ -22,7 +22,7 @@ import ( "os" "strings" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/bcache_linux.go b/collector/bcache_linux.go index 7c2f62f7..3f574475 100644 --- a/collector/bcache_linux.go +++ b/collector/bcache_linux.go @@ -18,7 +18,7 @@ package collector import ( "fmt" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs/bcache" "gopkg.in/alecthomas/kingpin.v2" diff --git a/collector/bonding_linux.go b/collector/bonding_linux.go index 863f62c2..782cf59d 100644 --- a/collector/bonding_linux.go +++ b/collector/bonding_linux.go @@ -23,8 +23,8 @@ import ( "path/filepath" "strings" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/boot_time_bsd.go b/collector/boot_time_bsd.go index 8dcc1e02..2b9caade 100644 --- a/collector/boot_time_bsd.go +++ b/collector/boot_time_bsd.go @@ -17,7 +17,7 @@ package collector import ( - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/boot_time_openbsd_amd64.go b/collector/boot_time_openbsd_amd64.go index 957cecd6..32e070e0 100644 --- a/collector/boot_time_openbsd_amd64.go +++ b/collector/boot_time_openbsd_amd64.go @@ -16,7 +16,7 @@ package collector import ( - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "golang.org/x/sys/unix" "unsafe" diff --git a/collector/boot_time_solaris.go b/collector/boot_time_solaris.go index eb270347..e2eca59e 100644 --- a/collector/boot_time_solaris.go +++ b/collector/boot_time_solaris.go @@ -17,7 +17,7 @@ package collector import ( - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "github.com/siebenmann/go-kstat" ) diff --git a/collector/btrfs_linux.go b/collector/btrfs_linux.go index 4d4857b8..d546c548 100644 --- a/collector/btrfs_linux.go +++ b/collector/btrfs_linux.go @@ -18,7 +18,7 @@ package collector import ( "fmt" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs/btrfs" ) diff --git a/collector/buddyinfo.go b/collector/buddyinfo.go index 579c3e4c..3536a98f 100644 --- a/collector/buddyinfo.go +++ b/collector/buddyinfo.go @@ -20,8 +20,8 @@ import ( "fmt" "strconv" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs" ) diff --git a/collector/collector.go b/collector/collector.go index e9ea14c0..fac94c18 100644 --- a/collector/collector.go +++ b/collector/collector.go @@ -20,8 +20,8 @@ import ( "sync" "time" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" kingpin "gopkg.in/alecthomas/kingpin.v2" ) diff --git a/collector/conntrack_linux.go b/collector/conntrack_linux.go index 9c8f17d2..67298f62 100644 --- a/collector/conntrack_linux.go +++ b/collector/conntrack_linux.go @@ -20,8 +20,8 @@ import ( "fmt" "os" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/cpu_darwin.go b/collector/cpu_darwin.go index ba4ba809..d54c5b35 100644 --- a/collector/cpu_darwin.go +++ b/collector/cpu_darwin.go @@ -25,7 +25,7 @@ import ( "strconv" "unsafe" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/cpu_dragonfly.go b/collector/cpu_dragonfly.go index ccf22d55..929fe893 100644 --- a/collector/cpu_dragonfly.go +++ b/collector/cpu_dragonfly.go @@ -20,7 +20,7 @@ import ( "strconv" "unsafe" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/cpu_freebsd.go b/collector/cpu_freebsd.go index 41573e40..ea3630f0 100644 --- a/collector/cpu_freebsd.go +++ b/collector/cpu_freebsd.go @@ -21,8 +21,8 @@ import ( "strconv" "unsafe" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "golang.org/x/sys/unix" ) diff --git a/collector/cpu_linux.go b/collector/cpu_linux.go index ab65f58d..5c1293d0 100644 --- a/collector/cpu_linux.go +++ b/collector/cpu_linux.go @@ -22,8 +22,8 @@ import ( "strconv" "sync" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs" "gopkg.in/alecthomas/kingpin.v2" diff --git a/collector/cpu_openbsd.go b/collector/cpu_openbsd.go index 7d405103..9f8858f0 100644 --- a/collector/cpu_openbsd.go +++ b/collector/cpu_openbsd.go @@ -20,7 +20,7 @@ import ( "strconv" "unsafe" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "golang.org/x/sys/unix" ) diff --git a/collector/cpu_openbsd_amd64.go b/collector/cpu_openbsd_amd64.go index 83174986..68f3366a 100644 --- a/collector/cpu_openbsd_amd64.go +++ b/collector/cpu_openbsd_amd64.go @@ -19,7 +19,7 @@ import ( "strconv" "unsafe" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "golang.org/x/sys/unix" ) diff --git a/collector/cpu_solaris.go b/collector/cpu_solaris.go index 0624454f..75e0c143 100644 --- a/collector/cpu_solaris.go +++ b/collector/cpu_solaris.go @@ -19,7 +19,7 @@ package collector import ( "strconv" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" kstat "github.com/siebenmann/go-kstat" ) diff --git a/collector/cpufreq_linux.go b/collector/cpufreq_linux.go index 19f9eff3..e387d95b 100644 --- a/collector/cpufreq_linux.go +++ b/collector/cpufreq_linux.go @@ -18,7 +18,7 @@ package collector import ( "fmt" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs/sysfs" ) diff --git a/collector/cpufreq_solaris.go b/collector/cpufreq_solaris.go index f5ac063d..80470a08 100644 --- a/collector/cpufreq_solaris.go +++ b/collector/cpufreq_solaris.go @@ -20,7 +20,7 @@ import ( "fmt" "strconv" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" kstat "github.com/siebenmann/go-kstat" ) diff --git a/collector/devstat_dragonfly.go b/collector/devstat_dragonfly.go index 69e24ba8..9e0b305f 100644 --- a/collector/devstat_dragonfly.go +++ b/collector/devstat_dragonfly.go @@ -19,7 +19,7 @@ import ( "errors" "fmt" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/devstat_freebsd.go b/collector/devstat_freebsd.go index dfa18d1e..454f84c0 100644 --- a/collector/devstat_freebsd.go +++ b/collector/devstat_freebsd.go @@ -21,7 +21,7 @@ import ( "sync" "unsafe" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/diskstats_darwin.go b/collector/diskstats_darwin.go index 864220bf..43466e12 100644 --- a/collector/diskstats_darwin.go +++ b/collector/diskstats_darwin.go @@ -18,7 +18,7 @@ package collector import ( "fmt" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/lufia/iostat" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/diskstats_linux.go b/collector/diskstats_linux.go index b5ae82d8..62d61736 100644 --- a/collector/diskstats_linux.go +++ b/collector/diskstats_linux.go @@ -24,8 +24,8 @@ import ( "strconv" "strings" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "gopkg.in/alecthomas/kingpin.v2" ) diff --git a/collector/diskstats_openbsd.go b/collector/diskstats_openbsd.go index 6318bd79..a168c1b5 100644 --- a/collector/diskstats_openbsd.go +++ b/collector/diskstats_openbsd.go @@ -19,7 +19,7 @@ package collector import ( "unsafe" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "golang.org/x/sys/unix" ) diff --git a/collector/diskstats_openbsd_amd64.go b/collector/diskstats_openbsd_amd64.go index 602fae6c..c8c5849c 100644 --- a/collector/diskstats_openbsd_amd64.go +++ b/collector/diskstats_openbsd_amd64.go @@ -18,7 +18,7 @@ package collector import ( "unsafe" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "golang.org/x/sys/unix" ) diff --git a/collector/drbd_linux.go b/collector/drbd_linux.go index 281c079d..dcb47c66 100644 --- a/collector/drbd_linux.go +++ b/collector/drbd_linux.go @@ -23,8 +23,8 @@ import ( "strconv" "strings" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/edac_linux.go b/collector/edac_linux.go index 1248e2e7..b742266c 100644 --- a/collector/edac_linux.go +++ b/collector/edac_linux.go @@ -20,7 +20,7 @@ import ( "path/filepath" "regexp" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/entropy_linux.go b/collector/entropy_linux.go index 84c92c04..d9123463 100644 --- a/collector/entropy_linux.go +++ b/collector/entropy_linux.go @@ -18,7 +18,7 @@ package collector import ( "fmt" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs" ) diff --git a/collector/exec_bsd.go b/collector/exec_bsd.go index c7bcb74e..7d2237ce 100644 --- a/collector/exec_bsd.go +++ b/collector/exec_bsd.go @@ -17,7 +17,7 @@ package collector import ( - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/fibrechannel_linux.go b/collector/fibrechannel_linux.go index 0f1a1b0c..bc0577c2 100644 --- a/collector/fibrechannel_linux.go +++ b/collector/fibrechannel_linux.go @@ -20,8 +20,8 @@ import ( "fmt" "os" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs/sysfs" ) diff --git a/collector/filefd_linux.go b/collector/filefd_linux.go index 450c4e34..a9faaef8 100644 --- a/collector/filefd_linux.go +++ b/collector/filefd_linux.go @@ -22,7 +22,7 @@ import ( "os" "strconv" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/filesystem_bsd.go b/collector/filesystem_bsd.go index cebb8147..b3d1de86 100644 --- a/collector/filesystem_bsd.go +++ b/collector/filesystem_bsd.go @@ -20,7 +20,7 @@ import ( "errors" "unsafe" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log/level" ) /* diff --git a/collector/filesystem_common.go b/collector/filesystem_common.go index 64525c73..1cf4a8f0 100644 --- a/collector/filesystem_common.go +++ b/collector/filesystem_common.go @@ -20,8 +20,8 @@ import ( "errors" "regexp" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "gopkg.in/alecthomas/kingpin.v2" ) diff --git a/collector/filesystem_freebsd.go b/collector/filesystem_freebsd.go index 2930e617..01e86eb7 100644 --- a/collector/filesystem_freebsd.go +++ b/collector/filesystem_freebsd.go @@ -16,7 +16,7 @@ package collector import ( - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log/level" "golang.org/x/sys/unix" ) diff --git a/collector/filesystem_linux.go b/collector/filesystem_linux.go index 3f3fa204..2d4e2c2b 100644 --- a/collector/filesystem_linux.go +++ b/collector/filesystem_linux.go @@ -25,8 +25,8 @@ import ( "sync" "time" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "golang.org/x/sys/unix" "gopkg.in/alecthomas/kingpin.v2" ) diff --git a/collector/filesystem_linux_test.go b/collector/filesystem_linux_test.go index e4017790..1d18fd59 100644 --- a/collector/filesystem_linux_test.go +++ b/collector/filesystem_linux_test.go @@ -14,7 +14,7 @@ package collector import ( - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "strings" "testing" diff --git a/collector/filesystem_openbsd_amd64.go b/collector/filesystem_openbsd_amd64.go index 22c0c370..1f4f0882 100644 --- a/collector/filesystem_openbsd_amd64.go +++ b/collector/filesystem_openbsd_amd64.go @@ -17,7 +17,7 @@ package collector import ( - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log/level" "golang.org/x/sys/unix" ) diff --git a/collector/hwmon_linux.go b/collector/hwmon_linux.go index 261a7c5a..eff80b97 100644 --- a/collector/hwmon_linux.go +++ b/collector/hwmon_linux.go @@ -24,8 +24,8 @@ import ( "strconv" "strings" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "golang.org/x/sys/unix" ) diff --git a/collector/infiniband_linux.go b/collector/infiniband_linux.go index fb73eace..d17b58f4 100644 --- a/collector/infiniband_linux.go +++ b/collector/infiniband_linux.go @@ -22,8 +22,8 @@ import ( "os" "strconv" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs/sysfs" ) diff --git a/collector/interrupts_common.go b/collector/interrupts_common.go index e681cfc5..c465c221 100644 --- a/collector/interrupts_common.go +++ b/collector/interrupts_common.go @@ -17,7 +17,7 @@ package collector import ( - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/ipvs_linux.go b/collector/ipvs_linux.go index c2e9d709..44fac590 100644 --- a/collector/ipvs_linux.go +++ b/collector/ipvs_linux.go @@ -23,8 +23,8 @@ import ( "strconv" "strings" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs" kingpin "gopkg.in/alecthomas/kingpin.v2" diff --git a/collector/ipvs_linux_test.go b/collector/ipvs_linux_test.go index 43c68395..cf12a216 100644 --- a/collector/ipvs_linux_test.go +++ b/collector/ipvs_linux_test.go @@ -22,7 +22,7 @@ import ( "strings" "testing" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" diff --git a/collector/ksmd_linux.go b/collector/ksmd_linux.go index 44d6f8d3..7bb2b9df 100644 --- a/collector/ksmd_linux.go +++ b/collector/ksmd_linux.go @@ -19,7 +19,7 @@ import ( "fmt" "path/filepath" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/loadavg.go b/collector/loadavg.go index 7c1fd996..4795abad 100644 --- a/collector/loadavg.go +++ b/collector/loadavg.go @@ -19,8 +19,8 @@ package collector import ( "fmt" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/logind_linux.go b/collector/logind_linux.go index 19a29a2e..b684eee2 100644 --- a/collector/logind_linux.go +++ b/collector/logind_linux.go @@ -20,7 +20,7 @@ import ( "os" "strconv" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/godbus/dbus" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/mdadm_linux.go b/collector/mdadm_linux.go index d1da7245..066d6cf2 100644 --- a/collector/mdadm_linux.go +++ b/collector/mdadm_linux.go @@ -20,8 +20,8 @@ import ( "fmt" "os" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs" ) diff --git a/collector/meminfo.go b/collector/meminfo.go index 38b23268..96c3b689 100644 --- a/collector/meminfo.go +++ b/collector/meminfo.go @@ -20,8 +20,8 @@ import ( "fmt" "strings" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/meminfo_numa_linux.go b/collector/meminfo_numa_linux.go index f3d93073..bfefb7bb 100644 --- a/collector/meminfo_numa_linux.go +++ b/collector/meminfo_numa_linux.go @@ -25,7 +25,7 @@ import ( "strconv" "strings" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/memory_bsd.go b/collector/memory_bsd.go index ac8b3010..4ebf8d3c 100644 --- a/collector/memory_bsd.go +++ b/collector/memory_bsd.go @@ -19,7 +19,7 @@ package collector import ( "fmt" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "golang.org/x/sys/unix" ) diff --git a/collector/mountstats_linux.go b/collector/mountstats_linux.go index 41020671..d40ed477 100644 --- a/collector/mountstats_linux.go +++ b/collector/mountstats_linux.go @@ -18,8 +18,8 @@ package collector import ( "fmt" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs" ) diff --git a/collector/netclass_linux.go b/collector/netclass_linux.go index 9026d2cb..a2984a5e 100644 --- a/collector/netclass_linux.go +++ b/collector/netclass_linux.go @@ -22,8 +22,8 @@ import ( "os" "regexp" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs/sysfs" "gopkg.in/alecthomas/kingpin.v2" diff --git a/collector/netdev_bsd.go b/collector/netdev_bsd.go index 43cdbe32..d4fb1d8c 100644 --- a/collector/netdev_bsd.go +++ b/collector/netdev_bsd.go @@ -19,8 +19,8 @@ package collector import ( "errors" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" ) /* diff --git a/collector/netdev_common.go b/collector/netdev_common.go index 6802549b..b6748de1 100644 --- a/collector/netdev_common.go +++ b/collector/netdev_common.go @@ -20,8 +20,8 @@ import ( "errors" "fmt" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "gopkg.in/alecthomas/kingpin.v2" ) diff --git a/collector/netdev_darwin.go b/collector/netdev_darwin.go index 26ad4198..dd7e3fc4 100644 --- a/collector/netdev_darwin.go +++ b/collector/netdev_darwin.go @@ -21,8 +21,8 @@ import ( "fmt" "net" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "golang.org/x/sys/unix" ) diff --git a/collector/netdev_linux.go b/collector/netdev_linux.go index 02d0fb29..a9b4e33f 100644 --- a/collector/netdev_linux.go +++ b/collector/netdev_linux.go @@ -24,8 +24,8 @@ import ( "strconv" "strings" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" ) var ( diff --git a/collector/netdev_linux_test.go b/collector/netdev_linux_test.go index 8a341bcf..8e227a24 100644 --- a/collector/netdev_linux_test.go +++ b/collector/netdev_linux_test.go @@ -17,7 +17,7 @@ import ( "os" "testing" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" ) func TestNetDevStatsIgnore(t *testing.T) { diff --git a/collector/netdev_openbsd.go b/collector/netdev_openbsd.go index fb86e026..327aec55 100644 --- a/collector/netdev_openbsd.go +++ b/collector/netdev_openbsd.go @@ -19,8 +19,8 @@ package collector import ( "errors" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" ) /* diff --git a/collector/netdev_openbsd_amd64.go b/collector/netdev_openbsd_amd64.go index 47f2a36e..8bba9942 100644 --- a/collector/netdev_openbsd_amd64.go +++ b/collector/netdev_openbsd_amd64.go @@ -16,8 +16,8 @@ package collector import ( - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "golang.org/x/sys/unix" "unsafe" diff --git a/collector/netstat_linux.go b/collector/netstat_linux.go index 98447f86..efd1f6cc 100644 --- a/collector/netstat_linux.go +++ b/collector/netstat_linux.go @@ -25,7 +25,7 @@ import ( "strconv" "strings" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "gopkg.in/alecthomas/kingpin.v2" ) diff --git a/collector/network_route_linux.go b/collector/network_route_linux.go index 75462a58..98c0815d 100644 --- a/collector/network_route_linux.go +++ b/collector/network_route_linux.go @@ -21,7 +21,7 @@ import ( "net" "strconv" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/jsimonetti/rtnetlink" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/nfs_linux.go b/collector/nfs_linux.go index 60803eb0..3802dc19 100644 --- a/collector/nfs_linux.go +++ b/collector/nfs_linux.go @@ -21,8 +21,8 @@ import ( "os" "reflect" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs/nfs" ) diff --git a/collector/nfsd_linux.go b/collector/nfsd_linux.go index 3dba8995..1f785664 100644 --- a/collector/nfsd_linux.go +++ b/collector/nfsd_linux.go @@ -20,8 +20,8 @@ import ( "fmt" "os" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs/nfs" ) diff --git a/collector/ntp.go b/collector/ntp.go index c7d55c99..7c9a4d3b 100644 --- a/collector/ntp.go +++ b/collector/ntp.go @@ -22,7 +22,7 @@ import ( "time" "github.com/beevik/ntp" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "gopkg.in/alecthomas/kingpin.v2" ) diff --git a/collector/perf_linux.go b/collector/perf_linux.go index 3a2f7394..aebdcceb 100644 --- a/collector/perf_linux.go +++ b/collector/perf_linux.go @@ -21,8 +21,8 @@ import ( "strconv" "strings" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/hodgesds/perf-utils" "github.com/prometheus/client_golang/prometheus" "golang.org/x/sys/unix" diff --git a/collector/perf_linux_test.go b/collector/perf_linux_test.go index f7d5709f..d206d01f 100644 --- a/collector/perf_linux_test.go +++ b/collector/perf_linux_test.go @@ -22,7 +22,7 @@ import ( "strings" "testing" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/powersupplyclass.go b/collector/powersupplyclass.go index cd2028d0..3239a32b 100644 --- a/collector/powersupplyclass.go +++ b/collector/powersupplyclass.go @@ -23,7 +23,7 @@ import ( "regexp" "strings" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs/sysfs" "gopkg.in/alecthomas/kingpin.v2" diff --git a/collector/pressure_linux.go b/collector/pressure_linux.go index ad81ad73..ae6c4328 100644 --- a/collector/pressure_linux.go +++ b/collector/pressure_linux.go @@ -21,8 +21,8 @@ import ( "os" "syscall" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs" ) diff --git a/collector/processes_linux.go b/collector/processes_linux.go index 9d838d5b..4b354b61 100644 --- a/collector/processes_linux.go +++ b/collector/processes_linux.go @@ -22,8 +22,8 @@ import ( "strings" "syscall" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs" ) diff --git a/collector/processes_linux_test.go b/collector/processes_linux_test.go index 2727dd1a..a1681db2 100644 --- a/collector/processes_linux_test.go +++ b/collector/processes_linux_test.go @@ -18,7 +18,7 @@ package collector import ( "testing" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/procfs" kingpin "gopkg.in/alecthomas/kingpin.v2" ) diff --git a/collector/qdisc_linux.go b/collector/qdisc_linux.go index ba462a0e..3e7f373f 100644 --- a/collector/qdisc_linux.go +++ b/collector/qdisc_linux.go @@ -21,7 +21,7 @@ import ( "path/filepath" "github.com/ema/qdisc" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "gopkg.in/alecthomas/kingpin.v2" ) diff --git a/collector/rapl_linux.go b/collector/rapl_linux.go index 8a5f5f3f..a0f90119 100644 --- a/collector/rapl_linux.go +++ b/collector/rapl_linux.go @@ -21,8 +21,8 @@ import ( "os" "strconv" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs/sysfs" ) diff --git a/collector/runit.go b/collector/runit.go index 9d889046..b0355414 100644 --- a/collector/runit.go +++ b/collector/runit.go @@ -16,8 +16,8 @@ package collector import ( - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/soundcloud/go-runit/runit" "gopkg.in/alecthomas/kingpin.v2" diff --git a/collector/schedstat_linux.go b/collector/schedstat_linux.go index 9f29a7e1..e7e7c352 100644 --- a/collector/schedstat_linux.go +++ b/collector/schedstat_linux.go @@ -20,8 +20,8 @@ import ( "fmt" "os" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs" ) diff --git a/collector/sockstat_linux.go b/collector/sockstat_linux.go index 8f5a99fa..28fd32fd 100644 --- a/collector/sockstat_linux.go +++ b/collector/sockstat_linux.go @@ -20,8 +20,8 @@ import ( "fmt" "os" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs" ) diff --git a/collector/softnet_linux.go b/collector/softnet_linux.go index befec8ed..8bda26ee 100644 --- a/collector/softnet_linux.go +++ b/collector/softnet_linux.go @@ -19,7 +19,7 @@ import ( "fmt" "strconv" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs" ) diff --git a/collector/stat_linux.go b/collector/stat_linux.go index 667d9621..12795a23 100644 --- a/collector/stat_linux.go +++ b/collector/stat_linux.go @@ -18,7 +18,7 @@ package collector import ( "fmt" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs" ) diff --git a/collector/supervisord.go b/collector/supervisord.go index 7ece32fb..8d78c72c 100644 --- a/collector/supervisord.go +++ b/collector/supervisord.go @@ -23,8 +23,8 @@ import ( "net/url" "time" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/mattn/go-xmlrpc" "github.com/prometheus/client_golang/prometheus" "gopkg.in/alecthomas/kingpin.v2" diff --git a/collector/systemd_linux.go b/collector/systemd_linux.go index ac6a4453..0daf438d 100644 --- a/collector/systemd_linux.go +++ b/collector/systemd_linux.go @@ -26,8 +26,8 @@ import ( "time" "github.com/coreos/go-systemd/dbus" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" kingpin "gopkg.in/alecthomas/kingpin.v2" ) diff --git a/collector/systemd_linux_test.go b/collector/systemd_linux_test.go index 93137f22..1b55af7c 100644 --- a/collector/systemd_linux_test.go +++ b/collector/systemd_linux_test.go @@ -14,7 +14,7 @@ package collector import ( - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "regexp" "testing" diff --git a/collector/tcpstat_linux.go b/collector/tcpstat_linux.go index af5ae981..d3b4f3ad 100644 --- a/collector/tcpstat_linux.go +++ b/collector/tcpstat_linux.go @@ -23,7 +23,7 @@ import ( "strconv" "strings" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/textfile.go b/collector/textfile.go index 50c18075..46d66ab4 100644 --- a/collector/textfile.go +++ b/collector/textfile.go @@ -24,8 +24,8 @@ import ( "strings" "time" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" dto "github.com/prometheus/client_model/go" "github.com/prometheus/common/expfmt" diff --git a/collector/textfile_test.go b/collector/textfile_test.go index f0e93a8b..4bdcc5ac 100644 --- a/collector/textfile_test.go +++ b/collector/textfile_test.go @@ -20,7 +20,7 @@ import ( "net/http/httptest" "testing" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/common/promlog" diff --git a/collector/thermal_zone_linux.go b/collector/thermal_zone_linux.go index 5d223bcd..8c6f6b87 100644 --- a/collector/thermal_zone_linux.go +++ b/collector/thermal_zone_linux.go @@ -18,7 +18,7 @@ package collector import ( "fmt" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs/sysfs" ) diff --git a/collector/time.go b/collector/time.go index 76a2d1e9..f55c564e 100644 --- a/collector/time.go +++ b/collector/time.go @@ -18,8 +18,8 @@ package collector import ( "time" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/timex.go b/collector/timex.go index 3b978ec5..d0edd632 100644 --- a/collector/timex.go +++ b/collector/timex.go @@ -21,8 +21,8 @@ import ( "fmt" "os" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "golang.org/x/sys/unix" ) diff --git a/collector/udp_queues_linux.go b/collector/udp_queues_linux.go index 5e185f15..bc88c057 100644 --- a/collector/udp_queues_linux.go +++ b/collector/udp_queues_linux.go @@ -20,8 +20,8 @@ import ( "fmt" "os" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs" ) diff --git a/collector/uname.go b/collector/uname.go index 2c0c3068..12ec751f 100644 --- a/collector/uname.go +++ b/collector/uname.go @@ -17,7 +17,7 @@ package collector import ( - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/vmstat_linux.go b/collector/vmstat_linux.go index 605c38ad..191cc7fb 100644 --- a/collector/vmstat_linux.go +++ b/collector/vmstat_linux.go @@ -23,7 +23,7 @@ import ( "strconv" "strings" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "gopkg.in/alecthomas/kingpin.v2" ) diff --git a/collector/wifi_linux.go b/collector/wifi_linux.go index 076982d7..d64554bc 100644 --- a/collector/wifi_linux.go +++ b/collector/wifi_linux.go @@ -23,8 +23,8 @@ import ( "os" "path/filepath" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/mdlayher/wifi" "github.com/prometheus/client_golang/prometheus" "gopkg.in/alecthomas/kingpin.v2" diff --git a/collector/xfs_linux.go b/collector/xfs_linux.go index 1952ea82..de3d2c8f 100644 --- a/collector/xfs_linux.go +++ b/collector/xfs_linux.go @@ -18,7 +18,7 @@ package collector import ( "fmt" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs/xfs" ) diff --git a/collector/zfs.go b/collector/zfs.go index 240df895..e9c020f3 100644 --- a/collector/zfs.go +++ b/collector/zfs.go @@ -20,8 +20,8 @@ import ( "errors" "strings" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/zfs_freebsd.go b/collector/zfs_freebsd.go index 2f200967..b45ba267 100644 --- a/collector/zfs_freebsd.go +++ b/collector/zfs_freebsd.go @@ -18,7 +18,7 @@ package collector import ( "fmt" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/zfs_linux.go b/collector/zfs_linux.go index a676534a..77ca1ee9 100644 --- a/collector/zfs_linux.go +++ b/collector/zfs_linux.go @@ -24,7 +24,7 @@ import ( "strconv" "strings" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" ) diff --git a/collector/zfs_solaris.go b/collector/zfs_solaris.go index c9877875..0a4da823 100644 --- a/collector/zfs_solaris.go +++ b/collector/zfs_solaris.go @@ -19,7 +19,7 @@ package collector import ( "strings" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "github.com/siebenmann/go-kstat" ) diff --git a/collector/zoneinfo_linux.go b/collector/zoneinfo_linux.go index 66929d60..8f7e35d9 100644 --- a/collector/zoneinfo_linux.go +++ b/collector/zoneinfo_linux.go @@ -17,7 +17,7 @@ import ( "fmt" "reflect" - "github.com/go-kit/kit/log" + "github.com/go-kit/log" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/procfs" diff --git a/go.mod b/go.mod index 13c36ebc..853d3f33 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,7 @@ require ( github.com/beevik/ntp v0.3.0 github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf github.com/ema/qdisc v0.0.0-20200603082823-62d0308e3e00 - github.com/go-kit/kit v0.10.0 + github.com/go-kit/log v0.1.0 github.com/godbus/dbus v0.0.0-20190402143921-271e53dc4968 github.com/hodgesds/perf-utils v0.2.5 github.com/jsimonetti/rtnetlink v0.0.0-20210122163228-8d122574c736 @@ -14,7 +14,7 @@ require ( github.com/mdlayher/wifi v0.0.0-20200527114002-84f0b9457fdd github.com/prometheus/client_golang v1.9.0 github.com/prometheus/client_model v0.2.0 - github.com/prometheus/common v0.15.0 + github.com/prometheus/common v0.26.0 github.com/prometheus/exporter-toolkit v0.5.1 github.com/prometheus/procfs v0.6.0 github.com/siebenmann/go-kstat v0.0.0-20200303194639-4e8294f9e9d5 diff --git a/go.sum b/go.sum index 37f928be..5dcb3404 100644 --- a/go.sum +++ b/go.sum @@ -68,6 +68,8 @@ github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2 github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.10.0 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/log v0.1.0 h1:DGJh0Sm43HbOeYDNnVZFl8BvcYVvjD5bqYJvp0REbwQ= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= @@ -268,8 +270,9 @@ github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8 github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4= github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= -github.com/prometheus/common v0.15.0 h1:4fgOnadei3EZvgRwxJ7RMpG1k1pOZth5Pc13tyspaKM= github.com/prometheus/common v0.15.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= +github.com/prometheus/common v0.26.0 h1:iMAkS2TDoNWnKM+Kopnx/8tnEStIfpYA0ur0xQzzhMQ= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= github.com/prometheus/exporter-toolkit v0.5.1 h1:9eqgis5er9xN613ZSADjypCJaDGj9ZlcWBvsIHa8/3c= github.com/prometheus/exporter-toolkit v0.5.1/go.mod h1:OCkM4805mmisBhLmVFw858QYi3v0wKdY6/UxrT0pZVg= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= @@ -373,6 +376,7 @@ golang.org/x/net v0.0.0-20201216054612-986b41b23924/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.0.0-20201224014010-6772e930b67b h1:iFwSg7t5GZmB/Q5TjiEAsdoLDrdJRC1RiF2WhuV29Qw= golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421 h1:Wo7BWFiOk0QRFMLYMqJGFMd9CgUAcGx7V+qEg/h5IBI= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -445,6 +449,7 @@ golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8T google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= diff --git a/node_exporter.go b/node_exporter.go index 0e5e680e..e717dc6c 100644 --- a/node_exporter.go +++ b/node_exporter.go @@ -15,6 +15,7 @@ package main import ( "fmt" + stdlog "log" "net/http" _ "net/http/pprof" "os" @@ -24,8 +25,8 @@ import ( "github.com/prometheus/common/promlog" "github.com/prometheus/common/promlog/flag" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" + "github.com/go-kit/log" + "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/common/version" @@ -122,6 +123,7 @@ func (h *handler) innerHandler(filters ...string) (http.Handler, error) { handler := promhttp.HandlerFor( prometheus.Gatherers{h.exporterMetricsRegistry, r}, promhttp.HandlerOpts{ + ErrorLog: stdlog.New(log.NewStdlibAdapter(level.Error(h.logger)), "", 0), ErrorHandling: promhttp.ContinueOnError, MaxRequestsInFlight: h.maxRequests, Registry: h.exporterMetricsRegistry, diff --git a/scripts/errcheck_excludes.txt b/scripts/errcheck_excludes.txt index ed0736fb..14b824f8 100644 --- a/scripts/errcheck_excludes.txt +++ b/scripts/errcheck_excludes.txt @@ -1,4 +1,4 @@ // Used in HTTP handlers, any error is handled by the server itself. (net/http.ResponseWriter).Write // Never check for logger errors. -(github.com/go-kit/kit/log.Logger).Log \ No newline at end of file +(github.com/go-kit/log.Logger).Log