Skip to content

Commit

Permalink
Fix prom upgrade compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
neilfordyce committed May 29, 2024
1 parent 952102b commit 5f08f5e
Show file tree
Hide file tree
Showing 4 changed files with 1,547 additions and 150 deletions.
6 changes: 3 additions & 3 deletions cmd/bosun/expr/prom.go
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ func timePromRequest(e *State, prefix, query string, start, end time.Time, step
cacheKeyBytes, _ := json.MarshalIndent(cacheKey, "", " ")
e.Timer.StepCustomTiming("prom", fmt.Sprintf("query (%v)", prefix), query, func() {
getFn := func() (interface{}, error) {
res, err := client.QueryRange(context.Background(), query, r)
res, _, err := client.QueryRange(context.Background(), query, r)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -495,7 +495,7 @@ func PromMetricList(prefix string, e *State) (r *Results, err error) {
getFn := func() (interface{}, error) {
var metrics promModels.LabelValues
e.Timer.StepCustomTiming("prom", "metriclist", "", func() {
metrics, err = client.LabelValues(context.Background(), "__name__")
metrics, _, err = client.LabelValues(context.Background(), "__name__", []string{}, time.Time{}, time.Time{})
})
if err != nil {
return nil, err
Expand Down Expand Up @@ -530,7 +530,7 @@ func PromTagInfo(prefix string, e *State, metric, sdur, edur string) (r *Results
getFn := func() (interface{}, error) {
var res promModels.Value
e.Timer.StepCustomTiming("prom", "taginfo", metric, func() {
res, err = client.QueryRange(context.Background(), metric, qRange)
res, _, err = client.QueryRange(context.Background(), metric, qRange)
})
if err != nil {
return nil, err
Expand Down
105 changes: 0 additions & 105 deletions cmd/scollector/collectors/google_webmaster.go

This file was deleted.

17 changes: 8 additions & 9 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/StackExchange/httpunit v0.0.0-20190320172535-088c22a5342e
github.com/StackExchange/mof v0.0.0-20170227230456-cfc83d4047d1
github.com/StackExchange/wmi v0.0.0-20180725035823-b12b22c5341f
github.com/ajstarks/svgo v0.0.0-20151117013546-fd2151ebabde
github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b
github.com/alicebob/gopher-json v0.0.0-20180125190556-5a6b3ba71ee6 // indirect
github.com/alicebob/miniredis v2.5.0+incompatible // indirect
github.com/andybalholm/cascadia v0.0.0-20150730174459-3ad29d1ad1c4 // indirect
Expand All @@ -37,8 +37,7 @@ require (
github.com/glendc/gopher-json v0.0.0-20170414221815-dc4743023d0c // indirect
github.com/gocarina/gocsv v0.0.0-20190927101021-3ecffd272576 // indirect
github.com/godbus/dbus v4.0.1-0.20160727174541-7a8c533d28e8+incompatible // indirect
github.com/golang/freetype v0.0.0-20150924013838-f29eb116deb3 // indirect
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da
github.com/gomodule/redigo v2.0.0+incompatible // indirect
github.com/google/cadvisor v0.21.1-0.20160212224345-e9739af18411
github.com/google/go-github v0.0.0-20151126072848-44b1ede22d71
Expand Down Expand Up @@ -66,27 +65,27 @@ require (
github.com/pelletier/go-toml v1.6.0 // indirect
github.com/pkg/errors v0.9.1
github.com/pmezard/go-difflib v1.0.0
github.com/prometheus/client_golang v1.11.1
github.com/prometheus/common v0.26.0
github.com/prometheus/client_golang v1.19.1
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.53.0
github.com/prometheus/prometheus v1.8.2-0.20190115164134-b639fe140c1f
github.com/ryanuber/go-glob v0.0.0-20160226084822-572520ed46db
github.com/siddontang/go v0.0.0-20150505004501-b151716326d7 // indirect
github.com/siddontang/goredis v0.0.0-20150324035039-760763f78400 // indirect
github.com/siddontang/ledisdb v0.0.0-20190202134119-8ceb77e66a92
github.com/siddontang/rdb v0.0.0-20150307021120-fc89ed2e418d // indirect
github.com/stretchr/testify v1.5.1
github.com/stretchr/testify v1.8.2
github.com/syndtr/goleveldb v0.0.0-20150819051622-1a9d62f03ea9 // indirect
github.com/tatsushid/go-fastping v0.0.0-20150818125950-06cac0fecdc2
github.com/twinj/uuid v0.0.0-20151029044442-89173bcdda19
github.com/ugorji/go v0.0.0-20151120143108-ea9cd21fa0bc // indirect
github.com/vdobler/chart v0.0.0-20150914065344-293b01f8b75d
github.com/vmware/govmomi v0.16.1-0.20180228032728-a2138329bbd1
github.com/yuin/gopher-lua v0.0.0-20190514113301-1cd887cd7036 // indirect
golang.org/x/image v0.0.0-20150916112557-baddd3465a05 // indirect
golang.org/x/net v0.23.0
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421
golang.org/x/oauth2 v0.18.0
golang.org/x/sys v0.18.0
google.golang.org/api v0.0.0-20180506000402-20530fd5d65a
google.golang.org/api v0.126.0
gopkg.in/asn1-ber.v1 v1.0.0-20141119150059-9eae18c3681a // indirect
gopkg.in/fsnotify.v1 v1.4.7
gopkg.in/ldap.v1 v1.0.0-20150224155422-0041a4127039 // indirect
Expand Down
Loading

0 comments on commit 5f08f5e

Please sign in to comment.