Skip to content

Commit

Permalink
Fix session stream zone metrics
Browse files Browse the repository at this point in the history
* Add nginx-plus-go-client dependency
* Remove nginx-plus-go-sdk dependency
* Update nginx-prometheus-exporter dependency
  • Loading branch information
Dean-Coakley authored Jul 23, 2019
1 parent 18ab23a commit 486df14
Show file tree
Hide file tree
Showing 10 changed files with 355 additions and 54 deletions.
16 changes: 8 additions & 8 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,19 @@ required = [
go-tests = true
unused-packages = true

[[constraint]]
name = "github.com/nginxinc/nginx-plus-go-sdk"
version = "0.2.0"

[[constraint]]
name = "github.com/prometheus/client_golang"
version = "0.9.2"

[[constraint]]
name = "github.com/nginxinc/nginx-prometheus-exporter"
version = "0.3.0"
version = "0.4.2"

# github.com/prometheus/client_golang "0.9.2" requires github.com/golang/protobuf "1.3.0"
[[override]]
name = "github.com/golang/protobuf"
version = "1.3.0"
version = "1.3.0"

[[constraint]]
name = "github.com/nginxinc/nginx-plus-go-client"
version = "0.4.0"
2 changes: 1 addition & 1 deletion cmd/nginx-ingress/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/nginxinc/kubernetes-ingress/internal/nginx"
k8s_nginx "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned"
conf_scheme "github.com/nginxinc/kubernetes-ingress/pkg/client/clientset/versioned/scheme"
"github.com/nginxinc/nginx-plus-go-sdk/client"
"github.com/nginxinc/nginx-plus-go-client/client"
"github.com/prometheus/client_golang/prometheus"
api_v1 "k8s.io/api/core/v1"
meta_v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down
4 changes: 2 additions & 2 deletions internal/metrics/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"strconv"

"github.com/golang/glog"
sdkClient "github.com/nginxinc/nginx-plus-go-sdk/client"
plusClient "github.com/nginxinc/nginx-plus-go-client/client"
prometheusClient "github.com/nginxinc/nginx-prometheus-exporter/client"
nginxCollector "github.com/nginxinc/nginx-prometheus-exporter/collector"
"github.com/prometheus/client_golang/prometheus"
Expand All @@ -28,7 +28,7 @@ func RunPrometheusListenerForNginx(port int, client *prometheusClient.NginxClien
}

// RunPrometheusListenerForNginxPlus runs an http server to expose Prometheus metrics for NGINX Plus
func RunPrometheusListenerForNginxPlus(port int, plusClient *sdkClient.NginxClient, registry *prometheus.Registry) {
func RunPrometheusListenerForNginxPlus(port int, plusClient *plusClient.NginxClient, registry *prometheus.Registry) {
registry.MustRegister(nginxCollector.NewNginxPlusCollector(plusClient, "nginx_ingress_nginxplus"))
runServer(strconv.Itoa(port), registry)
}
Expand Down
2 changes: 1 addition & 1 deletion internal/nginx/fake_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"path"

"github.com/golang/glog"
"github.com/nginxinc/nginx-plus-go-sdk/client"
"github.com/nginxinc/nginx-plus-go-client/client"
)

// FakeManager provides a fake implementation of the Manager interface.
Expand Down
2 changes: 1 addition & 1 deletion internal/nginx/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"github.com/nginxinc/kubernetes-ingress/internal/metrics/collectors"

"github.com/golang/glog"
"github.com/nginxinc/nginx-plus-go-sdk/client"
"github.com/nginxinc/nginx-plus-go-client/client"
)

// TLSSecretFileMode defines the default filemode for files with TLS Secrets.
Expand Down
Loading

0 comments on commit 486df14

Please sign in to comment.