Git Product home page Git Product logo

Comments (5)

octo avatar octo commented on May 26, 2024

It appears that github.com/prometheus/node_exporter/https exports everything needed to set the TLS context up in the same way as the node_exporter, which seems to me like a reasonable thing to do.

from collectd_exporter.

kamilpoleszczuk avatar kamilpoleszczuk commented on May 26, 2024

The change itself would be really simple, basically after importing https package and adding config file flag, it could be just:

-  if err := http.ListenAndServe(*listenAddress, nil); err != nil {
+  server := &http.Server{Addr: *listenAddress}  
+  if err := https.Listen(server, *tlsConfigFile, logger); err != nil {  

but... using github.com/prometheus/node_exporter/https bumps up dependencies in go.mod

 require (
        collectd.org v0.3.1-0.20181025072142-f80706d1e115
-       github.com/go-kit/kit v0.8.0
-       github.com/prometheus/client_golang v1.0.0
-       github.com/prometheus/common v0.4.1
-       golang.org/x/sys v0.0.0-20190422165155-953cdadca894 // indirect
+       github.com/go-kit/kit v0.10.0
+       github.com/prometheus/client_golang v1.4.1
+       github.com/prometheus/common v0.9.1
+       github.com/prometheus/node_exporter v1.0.0-rc.0.0.20200503194828-0c532984b7a6
        gopkg.in/alecthomas/kingpin.v2 v2.2.6
 )

which makes this change a lot heavier. Additionally, as make all requires /vendor update with go mod vendor, it would lead to:

467 files changed, 264071 insertions(+), 2576 deletions(-)

What approach do you recommend?
Thanks

from collectd_exporter.

SuperQ avatar SuperQ commented on May 26, 2024

We want to move the https package to github.com/prometheus/common before we start importing it into other projects. We're going through a security review of the code in the next couple months. When the security review is complete, we'll move the package.

from collectd_exporter.

SuperQ avatar SuperQ commented on May 26, 2024

I added #94 to get the vendoring up to date, should make this diff smaller.

from collectd_exporter.

SuperQ avatar SuperQ commented on May 26, 2024

TLS support is now included via the exporter-toolkit config.

from collectd_exporter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.