Skip to content

Commit

Permalink
Merge pull request prometheus-community#421 from prometheus-community…
Browse files Browse the repository at this point in the history
…/superq/bump_mod

Update Go modules
  • Loading branch information
SuperQ authored May 31, 2021
2 parents bf3f005 + 3ce6fee commit 07c37d0
Show file tree
Hide file tree
Showing 8 changed files with 418 additions and 68 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:

steps:
- prometheus/setup_environment
# TODO: Fix golangci-lint and test issues to use plain `make` test.
- run: make precheck style check_license unused build
# TODO: Fix test issues to use plain `make` test.
- run: make precheck style check_license lint unused build
- prometheus/store_artifact:
file: elasticsearch_exporter

Expand Down
6 changes: 6 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
issues:
exclude-rules:
- path: _test.go
linters:
- errcheck
8 changes: 0 additions & 8 deletions .gometalinter.json

This file was deleted.

11 changes: 0 additions & 11 deletions Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,6 @@ DOCKER_REPO ?= prom

DOCKER_ARCHS ?= amd64

DISTROLESS_DOCKERFILE_PATH ?= ./Dockerfile.distroless

BUILD_DOCKER_ARCHS = $(addprefix common-docker-,$(DOCKER_ARCHS))
PUBLISH_DOCKER_ARCHS = $(addprefix common-docker-publish-,$(DOCKER_ARCHS))
TAG_DOCKER_ARCHS = $(addprefix common-docker-tag-latest-,$(DOCKER_ARCHS))
Expand Down Expand Up @@ -242,15 +240,6 @@ $(BUILD_DOCKER_ARCHS): common-docker-%:
--build-arg OS="linux" \
$(DOCKERBUILD_CONTEXT)

.PHONY: common-distroless-docker $(BUILD_DOCKER_ARCHS)
common-distroless-docker: $(BUILD_DOCKER_ARCHS)
$(BUILD_DOCKER_ARCHS): common-distroless-docker-%:
docker build -t "$(DOCKER_REPO)/$(DOCKER_IMAGE_NAME)-linux-$*:distroless-$(DOCKER_IMAGE_TAG)" \
-f $(DISTROLESS_DOCKERFILE_PATH) \
--build-arg ARCH="$*" \
--build-arg OS="linux" \
$(DOCKERBUILD_CONTEXT)

.PHONY: common-docker-publish $(PUBLISH_DOCKER_ARCHS)
common-docker-publish: $(PUBLISH_DOCKER_ARCHS)
$(PUBLISH_DOCKER_ARCHS): common-docker-publish-%:
Expand Down
2 changes: 1 addition & 1 deletion collector/indices.go
Original file line number Diff line number Diff line change
Expand Up @@ -1003,8 +1003,8 @@ func NewIndices(logger log.Logger, client *http.Client, url *url.URL, shards boo
go func() {
_ = level.Debug(logger).Log("msg", "starting cluster info receive loop")
for ci := range indices.clusterInfoCh {
_ = level.Debug(logger).Log("msg", "received cluster info update", "cluster", ci.ClusterName)
if ci != nil {
_ = level.Debug(logger).Log("msg", "received cluster info update", "cluster", ci.ClusterName)
indices.lastClusterInfo = ci
}
}
Expand Down
20 changes: 4 additions & 16 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,10 @@ module github.com/prometheus-community/elasticsearch_exporter
go 1.16

require (
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc // indirect
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf // indirect
github.com/beorn7/perks v0.0.0-20160229213445-3ac7bf7a47d1 // indirect
github.com/blang/semver v3.5.2-0.20180723201105-3c1074078d32+incompatible
github.com/go-kit/kit v0.5.1-0.20170620080629-0c52d4024a04
github.com/go-logfmt/logfmt v0.3.0 // indirect
github.com/go-stack/stack v1.5.3 // indirect
github.com/golang/protobuf v0.0.0-20160425215824-7cc19b78d562 // indirect
github.com/imdario/mergo v0.3.7-0.20181107191138-ca3dcc1022ba
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/prometheus/client_golang v0.0.0-20160711222238-28be15864ef9
github.com/prometheus/client_model v0.0.0-20150212101744-fa8ad6fec335 // indirect
github.com/prometheus/common v0.0.0-20170830190555-bc8b88226a12
github.com/prometheus/procfs v0.0.0-20160411190841-abf152e5f3e9 // indirect
github.com/stretchr/testify v1.7.0 // indirect
github.com/go-kit/kit v0.10.0
github.com/imdario/mergo v0.3.12
github.com/prometheus/client_golang v1.10.0
github.com/prometheus/common v0.25.0
gopkg.in/alecthomas/kingpin.v2 v2.2.6
gopkg.in/yaml.v2 v2.4.0 // indirect
)
432 changes: 403 additions & 29 deletions go.sum

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/prometheus-community/elasticsearch_exporter/collector"
"github.com/prometheus-community/elasticsearch_exporter/pkg/clusterinfo"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/prometheus/common/version"
"gopkg.in/alecthomas/kingpin.v2"
)
Expand Down Expand Up @@ -173,7 +174,7 @@ func main() {
prometheus.MustRegister(clusterInfoRetriever)

mux := http.DefaultServeMux
mux.Handle(*metricsPath, prometheus.Handler())
mux.Handle(*metricsPath, promhttp.Handler())
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
_, err = w.Write([]byte(`<html>
<head><title>Elasticsearch Exporter</title></head>
Expand Down

0 comments on commit 07c37d0

Please sign in to comment.