Merge pull request #1887 from prometheus/superq/promhttp_errorlog

Add ErrorLog plumbing to promhttp
This commit is contained in:
Ben Kochie 2021-06-03 16:38:30 +02:00 committed by GitHub
commit e1db354611
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
100 changed files with 155 additions and 145 deletions

View file

@ -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

View file

@ -22,7 +22,7 @@ import (
"os"
"strings"
"github.com/go-kit/kit/log"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
)

View file

@ -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"

View file

@ -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"
)

View file

@ -17,7 +17,7 @@
package collector
import (
"github.com/go-kit/kit/log"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
)

View file

@ -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"

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -25,7 +25,7 @@ import (
"strconv"
"unsafe"
"github.com/go-kit/kit/log"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
)

View file

@ -20,7 +20,7 @@ import (
"strconv"
"unsafe"
"github.com/go-kit/kit/log"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
)

View file

@ -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"
)

View file

@ -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"

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -19,7 +19,7 @@ import (
"errors"
"fmt"
"github.com/go-kit/kit/log"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
)

View file

@ -21,7 +21,7 @@ import (
"sync"
"unsafe"
"github.com/go-kit/kit/log"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -17,7 +17,7 @@
package collector
import (
"github.com/go-kit/kit/log"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
)

View file

@ -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"
)

View file

@ -22,7 +22,7 @@ import (
"os"
"strconv"
"github.com/go-kit/kit/log"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
)

View file

@ -20,7 +20,7 @@ import (
"errors"
"unsafe"
"github.com/go-kit/kit/log/level"
"github.com/go-kit/log/level"
)
/*

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -14,7 +14,7 @@
package collector
import (
"github.com/go-kit/kit/log"
"github.com/go-kit/log"
"strings"
"testing"

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -17,7 +17,7 @@
package collector
import (
"github.com/go-kit/kit/log"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
)

View file

@ -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"

View file

@ -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"

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -25,7 +25,7 @@ import (
"strconv"
"strings"
"github.com/go-kit/kit/log"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"

View file

@ -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"
)
/*

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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 (

View file

@ -17,7 +17,7 @@ import (
"os"
"testing"
"github.com/go-kit/kit/log"
"github.com/go-kit/log"
)
func TestNetDevStatsIgnore(t *testing.T) {

View file

@ -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"
)
/*

View file

@ -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"

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"

View file

@ -22,7 +22,7 @@ import (
"strings"
"testing"
"github.com/go-kit/kit/log"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
)

View file

@ -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"

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"

View file

@ -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"
)

View file

@ -14,7 +14,7 @@
package collector
import (
"github.com/go-kit/kit/log"
"github.com/go-kit/log"
"regexp"
"testing"

View file

@ -23,7 +23,7 @@ import (
"strconv"
"strings"
"github.com/go-kit/kit/log"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
)

View file

@ -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"

View file

@ -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"

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -17,7 +17,7 @@
package collector
import (
"github.com/go-kit/kit/log"
"github.com/go-kit/log"
"github.com/prometheus/client_golang/prometheus"
)

View file

@ -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"
)

View file

@ -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"

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"
)

View file

@ -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"

4
go.mod
View file

@ -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

7
go.sum
View file

@ -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=

View file

@ -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,

View file

@ -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
(github.com/go-kit/log.Logger).Log