Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding TLS to node exporter - cleaner version #1277

Merged
merged 33 commits into from
Nov 15, 2019
Merged

Adding TLS to node exporter - cleaner version #1277

merged 33 commits into from
Nov 15, 2019

Conversation

ksherryBAE
Copy link
Contributor

As discussed in #1198
TLS added in https package.
TLS enabled by config file specified by running with the flag --web.tls-config="/Path-to-Config/"
If no flags passed, http listener starts up as normal.

@ksherryBAE
Copy link
Contributor Author

@brian-brazil Here's the clearer version of the TLS package

@simonpasquier simonpasquier self-requested a review March 7, 2019 16:09
Copy link
Member

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to prometheus/common#173, we could use tls.Config.GetConfigForClient to read the key+cert and CAs from disk every time a client connects, allowing for seamless certificate rotations.

https/tls_config.go Outdated Show resolved Hide resolved
https/tls_config.go Outdated Show resolved Hide resolved
https/tls_config.go Outdated Show resolved Hide resolved
Copy link
Contributor

@brian-brazil brian-brazil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a first pass. We should also have unittests for this.

https/README.md Outdated Show resolved Hide resolved
https/README.md Outdated Show resolved Hide resolved
https/tls-config.yml Outdated Show resolved Hide resolved
https/README.md Outdated Show resolved Hide resolved
https/tls_config.go Outdated Show resolved Hide resolved
https/tls_config.go Outdated Show resolved Hide resolved
node_exporter.go Outdated Show resolved Hide resolved
https/tls_config.go Outdated Show resolved Hide resolved
node_exporter.go Outdated Show resolved Hide resolved
Copy link
Member

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for opening up a clean pull request @ksherryBAE. I left a couple of comments.

https/tls_config.go Outdated Show resolved Hide resolved
https/tls_config.go Outdated Show resolved Hide resolved
https/tls_config.go Outdated Show resolved Hide resolved
https/tls_config.go Outdated Show resolved Hide resolved
https/tls_config.go Outdated Show resolved Hide resolved
https/tls_config.go Outdated Show resolved Hide resolved
https/README.md Outdated Show resolved Hide resolved
https/README.md Outdated Show resolved Hide resolved
https/tls-config.yml Outdated Show resolved Hide resolved
https/tls_config.go Outdated Show resolved Hide resolved
https/tls_config.go Outdated Show resolved Hide resolved
node_exporter.go Outdated Show resolved Hide resolved
node_exporter.go Outdated Show resolved Hide resolved
node_exporter.go Outdated Show resolved Hide resolved
https/tls_config.go Outdated Show resolved Hide resolved
https/README.md Outdated Show resolved Hide resolved
https/README.md Outdated Show resolved Hide resolved
https/README.md Outdated Show resolved Hide resolved
https/README.md Outdated Show resolved Hide resolved
https/tls-config.yml Outdated Show resolved Hide resolved
https/tls_config.go Outdated Show resolved Hide resolved
https/tls_config.go Outdated Show resolved Hide resolved
https/tls_config.go Outdated Show resolved Hide resolved
@ksherryBAE
Copy link
Contributor Author

@brian-brazil tests have now been added to 92% coverage

Issuer: C=NO, O=Green AS, OU=Green Certificate Authority, CN=Green TLS CA
Validity
Not Before: Jul 26 12:47:08 2017 GMT
Not After : Jul 26 12:47:08 2019 GMT
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would break us sooner than later. Please generate a certificate with a very large validity period.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was reused from common/config/testdata , might it be worth waiting until this moves into common and then updating them both?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Certificates from common/config/testdata have been updated so you can copy them again.

https/README.md Outdated
# Paths to Cert File & Key file from base directory
# Both required for valid tls
# Paths set as string values
# These are reloaded on initial connection and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and?

https/README.md Outdated
tlsCertPath : <filename>
tlsKeyPath : <filename>

# ClientAuth declares the policy the server will follow for client auth
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

auth -> authentication

https/README.md Outdated
tlsKeyPath : <filename>

# ClientAuth declares the policy the server will follow for client auth
# Accepts the following string values and maps to ClientAuth Policies
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https/tls_config.go Show resolved Hide resolved
TLSConfig TLSStruct `yaml:"tlsConfig"`
}

type TLSStruct struct {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

https/tls_config.go Outdated Show resolved Hide resolved
func configToTLSConfig(c *Config) (*tls.Config, error) {
cfg := &tls.Config{}
if len(c.TLSConfig.TLSCertPath) > 0 && len(c.TLSConfig.TLSKeyPath) > 0 {
_, err := tls.LoadX509KeyPair(c.TLSConfig.TLSCertPath, c.TLSConfig.TLSKeyPath)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment explaining that it is only for the initial validation of the certificate and key. You could also call cfg.GetCertificate() after initializing it to avoid code repetition:

cfg.GetCertificate = func(*tls.ClientHelloInfo) (*tls.Certificate, error) {
...
}
// Check that certificate and key files are valid.
_, err := cfg.GetCertificate(nil)
if err != nil {
    return nil, err
}

case "RequireAndVerifyClientCert":
cfg.ClientAuth = tls.RequireAndVerifyClientCert
default:
return nil, errors.New("Invalid string provided to ClientAuth")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The erroneous value should be displayed.

https/tls_config_test.go Outdated Show resolved Hide resolved
@simonpasquier simonpasquier self-requested a review April 3, 2019 11:53
@@ -0,0 +1,27 @@
I wandered lonely as a cloud
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this is well out of copyright, it'd be best to use actual junk so companies using this don't have to send lawyers to verify.

@ksherryBAE
Copy link
Contributor Author

I'm afraid I can't see why the buildkite/node-exporter build is failing, could anyone offer some insight? I assume it's something to do with the tests?

@SuperQ
Copy link
Member

SuperQ commented Apr 11, 2019

The buildkite jobs all fail with this:

2019/04/11 http: TLS handshake error from [::1]:51818: write tcp [::1]:44783->[::1]:51818: use of closed network connection
  | panic: runtime error: invalid memory address or nil pointer dereference [recovered]
  | panic: runtime error: invalid memory address or nil pointer dereference
  | [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x1029c914]
  |  
  | goroutine 19 [running]:
  | testing.tRunner.func1(0xc000100100)
  | /home/peon/godev/go/src/testing/testing.go:830 +0x384
  | panic(0x102ef600, 0x105d0b60)
  | /home/peon/godev/go/src/runtime/panic.go:522 +0x1c8
  | github.com/prometheus/node_exporter/https.TestListen(0xc000100100)
  | /home/peon/.buildkite-agent/builds/debian-9-4-0-ppc64le-build-prometheus-io-1/prometheus/node-exporter-370675b33ffdfb96e5199ec46a69acbf2403ea6e-1703-8zdG/src/github.com/prometheus/node_exporter/https/tls_config_test.go:337 +0x1d24
  | testing.tRunner(0xc000100100, 0x103671f8)
  | /home/peon/godev/go/src/testing/testing.go:865 +0xc4
  | created by testing.(*T).Run
  | /home/peon/godev/go/src/testing/testing.go:916 +0x2f4
  | FAIL	github.com/prometheus/node_exporter/https	9.736s
  | Makefile:77: recipe for target 'test' failed
  | make: *** [test] Error 1

Copy link
Member

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would also need tests validating that the certificate, key and configuration files are effectively reloaded for every request.

@@ -0,0 +1,8 @@
#TLS Config YAML
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(nit) this line can be removed and you could also remove the blank lines. Same remark for the other test configuration files.

log.Printf("Running %v tests:", numberOfTests)
}

logsDisabled := func(disable bool) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't usually customize the logging this way. I'd suggest to just use t.Log()/t.Logf() if needed.

var errorMessage error

var once sync.Once
recordConnectionResult := func(status bool, err error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that status is true only if err is nil so I think that recording and checking err alone is enough.

}
}
for _, test := range testTables {
test.httpClient = test.Client()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use T.Run here.

https/tls_config_test.go Show resolved Hide resolved
func TestListen(t *testing.T) {
logging := testing.Verbose()

port := ":9100"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still using a fixed port number.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@simonpasquier do you have any suggestions on how to use a random available port? The generally accepted method appears to be to create a Listener independently of the server, get the port with that, and then start the server with s.Serve(Listener), such as in the answer to this StackOverflow question; but due to the way the https.Listen function is being utilised this is not possible.
I have previously tried using a Listener to find an available port, releasing it from the listener and using the port again for the server, but this did not pass the build tests.

return
}
if string(body) != "Hello World!" {
recordConnectionResult(false, err)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to create a custom error here.

@ksherryBAE
Copy link
Contributor Author

Hello, has there been any further thoughts on this? I know there was talk of an experimental branch, would a pull request against an experimental branch be of interest?

https/README.md Outdated

```
#TLS CONFIG YAML
# Main config options for tls
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those 2 lines could be removed IMO.

https/README.md Outdated
@@ -0,0 +1,42 @@
# HTTPS Package for prometheus
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prometheus

https/README.md Outdated
@@ -0,0 +1,42 @@
# HTTPS Package for prometheus

The `https` directory contains files and a template config for the implementation of tls.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/tls/TLS/

https/README.md Outdated
The config file should is written in YAML format.
The layout is outlined below, with optional parameters in brackets.

For more detail on the clientAuth option: [ClientAuthType](https://golang.org/pkg/crypto/tls/#ClientAuthType)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could be moved to the configuration file example instead.

https/README.md Outdated
# RequireAndVerifyClientCert
[ clientAuth : <string> | default = "NoClientCert" ]

# ClientCa's accepts a string path to the set of CA's
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/ClientCa's/clientCAs/

}()
err := <-errorChannel
if test.isCorrectError(err) == false {
t.Errorf(" *** Failed test: %s *** Returned error: %v *** Expected error: %v", test.Name, err, test.ExpectedError)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to add the test's name (it will already be reported by the testing package). And the error message should be clear about what is wrong (eg error expected but doesn't match vs. unexpected error):
"Expected error to match regular expression %q, got %q"
"Expected no error, got %q"

"errors"
"fmt"
"io/ioutil"
"log"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to use the log package. The code should either panic (eg getPort()) or use t.Fatal.

https/tls_config_test.go Show resolved Hide resolved
func TestServerBehaviour(t *testing.T) {
testTables := []*TestInputs{
{
Name: `nil Server and default client`,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By definition, the Listen() function expects that server isn't nil so I wouldn't have this test.

node_exporter.go Outdated Show resolved Hide resolved
@jakewarr8
Copy link

any help needed on this?

https/README.md Outdated
# HTTPS Package for Prometheus

The `https` directory contains files and a template config for the implementation of TLS.
When running a server with tls use the flag `--web.tls-config`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/tls/TLS/

https/README.md Outdated
@@ -0,0 +1,10 @@
# HTTPS Package for Prometheus

The `https` directory contains files and a template config for the implementation of TLS.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: "The https directory contains a Go package and a sample configuration file for running node_exporter with HTTPS instead of HTTP."

https/README.md Outdated

The `https` directory contains files and a template config for the implementation of TLS.
When running a server with tls use the flag `--web.tls-config`
Where the path is from where the exporter was run.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wouldn't mention it since this is the usual way of doing things.

https/README.md Outdated
e.g. `./node_exporter --web.tls-config="https/tls-config.yml"`
If the config is kept within the https directory.

The config file should is written in YAML format, and is reloaded on each connection to check for new certificates and/or authentication policy.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would include the sample configuration in this page.


// When the listen function is called if the tlsConfigPath is an empty string an HTTP server is started
// If the tlsConfigPath is a valid config file then an HTTPS server will be started
// The listen function also sets the GetConfigForClient method of the HTTPS server so that the config and certs are reloaded on new connections
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would move this comment right before L107.

// If the tlsConfigPath is a valid config file then an HTTPS server will be started
// The listen function also sets the GetConfigForClient method of the HTTPS server so that the config and certs are reloaded on new connections
func Listen(server *http.Server, tlsConfigPath string) error {
if len(tlsConfigPath) > 0 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer this code flow:

if len(tlsConfigPath) == 0 {
    return server.ListenAndServe()
}
...
return server.ListenAndServeTLS("", "")

return cfg, nil
}

// When the listen function is called if the tlsConfigPath is an empty string an HTTP server is started
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: "Listen starts the server on the given address. If tlsConfigPath isn't empty the connection will be using TLS."

https/tls_config_test.go Show resolved Hide resolved
loadCert := func() (*tls.Certificate, error) {
cert, err := tls.LoadX509KeyPair(c.TLSCertPath, c.TLSKeyPath)
if err != nil {
return nil, err
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using errors.Wrap(...) would be interesting as otherwise it might not be obvious what is failing.


func configToTLSConfig(c *TLSConfig) (*tls.Config, error) {
cfg := &tls.Config{}
if len(c.TLSCertPath) > 0 && len(c.TLSKeyPath) > 0 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See below too but TLSCertPath and TLSKeyPath are mandatory so YAML umarshaling should have filed.

@ksherryBAE
Copy link
Contributor Author

Hello, just checking on this. Any further thoughts about this pr or about possibly moving to an experimental branch?

@simonpasquier
Copy link
Member

@ksherryBAE I pushed a few changes on top of the PR and resolve the latest conflicts. It looks good to me at the code level but it would need other reviews from @brian-brazil and @SuperQ.

https/README.md Outdated
The `https` directory contains a Go package and a sample configuration file for running `node_exporter` with HTTPS instead of HTTP.
When running a server with TLS use the flag `--web.tls-config`

e.g. `./node_exporter --web.tls-config="https/tls-config.yml"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't we planning on doing basic auth too? A more generic flag name would be better

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https doesn't cover basic auth.

}

// Listen starts the server on the given address. If tlsConfigPath isn't empty,
// the connection will be using TLS.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/connection/server/

https/README.md Show resolved Hide resolved
https/README.md Outdated
# HTTPS Package for Prometheus

The `https` directory contains a Go package and a sample configuration file for running `node_exporter` with HTTPS instead of HTTP.
When running a server with TLS use the flag `--web.authentication-config`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since eventually the file will hold configuration for both TLS and authentication, maybe we should name the flag --web.config?

return nil, errors.New("invalid ClientAuth: " + s)
}
}
if len(c.ClientCAs) > 0 && len(c.ClientAuth) == 0 {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For clarity and to match the README file, I would default c.ClientAuth to NoClientCert if unset and change this test to len(c.ClientCAs) > 0 && c.ClientAuth != NoClientCert.

@discordianfish discordianfish added this to the v1.0.0 milestone Aug 28, 2019
Signed-off-by: KSherry <kieran.sherry@baesystems.com>
Signed-off-by: KSherry <kieran.sherry@baesystems.com>
@simonpasquier
Copy link
Member

@ksherryBAE you need to sync the vendor/ directory:

rm -rf vendor/*
make unused
git add vendor/ && git commit -s -m "update vendor/"

Signed-off-by: KSherry <kieran.sherry@baesystems.com>
@simonpasquier
Copy link
Member

@ksherryBAE still not ok. Can you make sure you have Go 1.13.1 installed locally?

benridley and others added 2 commits October 20, 2019 12:34
Signed-off-by: Ben RIdley <benridley29@gmail.com>
@benridley
Copy link

Anything else required on this?

@PRIHLOP
Copy link

PRIHLOP commented Nov 13, 2019

Hello. Sorry for my perseverance.
This is a very important and highly anticipated feature. When can you expect a merge?

@pashok2398
Copy link

pashok2398 commented Nov 14, 2019

@ksherryBAE Sorry for the stupid question but, is there an option to validate the client (prometheus server) based on certificate attribute and not just on the signed CA?
For me is, if i want to use trusted root CA to sign both client (prometheus) and server (exporter) certificates and make sure that authentication is made not just by the signed CA...

@SuperQ
Copy link
Member

SuperQ commented Nov 14, 2019

We discussed this at our dev summit. I think it's ready to go. I cleaned up most of the un-resolved and outdated comments.

Can I get one final thumbs up from @simonpasquier and @brian-brazil

Copy link
Member

@simonpasquier simonpasquier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

https/tls_config.go Show resolved Hide resolved
Copy link
Contributor

@brian-brazil brian-brazil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

When running a server with TLS use the flag `--web.config`

e.g. `./node_exporter --web.config="web-config.yml"`
If the config is kept within the https directory.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be https/web-config.yml then?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to merge this and we can do more work in additional MRs.

@SuperQ SuperQ merged commit aede041 into prometheus:master Nov 15, 2019
@thda
Copy link

thda commented Nov 18, 2019

Can we get an rc or an alpha release containing this?
I'd like to try out and provide feedback.
I could not find a release schedule.

@SuperQ
Copy link
Member

SuperQ commented Nov 18, 2019

There is no release schedule for the node_exporter. Feel free to build your own for testing.

@simonpasquier
Copy link
Member

@thda you can get the binaries from here.

@markmsmith
Copy link

Just so I understand the above, is the plan to have a 0.19.0 release where we can get this (just not scheduled for a particular date yet), or is the next official release going to be 1.0, so we'll have to wait for all the stuff on the 1.0 project board to land?
https://github.com/prometheus/node_exporter/projects/1
(Also, the CircleCI link for the binaries gives me a 404).

@SuperQ
Copy link
Member

SuperQ commented Nov 21, 2019

Milestone 1.0. https://github.com/prometheus/node_exporter/milestone/5

We're pretty close, so I don't think we'll need to do 0.19, as I would want those fixed for 0.19 anyway.

@WOLFinBULLcity
Copy link

@SuperQ, is 1.0 still coming pretty soon? Or could a release be made to at least include the TLS support? It's currently a blocker for me being able to use node exporter. Thanks!

SuperQ added a commit that referenced this pull request May 25, 2020
* The netdev collector CLI argument `--collector.netdev.ignored-devices` was renamed to `--collector.netdev.device-blacklist` in order to conform with the systemd collector. #1279
* The label named `state` on `node_systemd_service_restart_total` metrics was changed to `name` to better describe the metric. #1393
* Refactoring of the mdadm collector changes several metrics
    - `node_md_disks_active` is removed
    - `node_md_disks` now has a `state` label for "fail", "spare", "active" disks.
    - `node_md_is_active` is replaced by `node_md_state` with a state set of "active", "inactive", "recovering", "resync".
* Additional label `mountaddr` added to NFS device metrics to distinguish mounts from the same URL, but different IP addresses. #1417
* Metrics node_cpu_scaling_frequency_min_hrts and node_cpu_scaling_frequency_max_hrts of the cpufreq collector were renamed to node_cpu_scaling_frequency_min_hertz and node_cpu_scaling_frequency_max_hertz. #1510
* Collectors that are enabled, but are unable to find data to collect, now return 0 for `node_scrape_collector_success`.

* [CHANGE] Add `--collector.netdev.device-whitelist`. #1279
* [CHANGE] Ignore iso9600 filesystem on Linux #1355
* [CHANGE] Refactor mdadm collector #1403
* [CHANGE] Add `mountaddr` label to NFS metrics. #1417
* [CHANGE] Don't count empty collectors as success. #1613
* [FEATURE] New flag to disable default collectors #1276
* [FEATURE] Add experimental TLS support #1277, #1687, #1695
* [FEATURE] Add collector for Power Supply Class #1280
* [FEATURE] Add new schedstat collector #1389
* [FEATURE] Add FreeBSD zfs support #1394
* [FEATURE] Add uname support for Darwin and OpenBSD #1433
* [FEATURE] Add new metric node_cpu_info #1489
* [FEATURE] Add new thermal_zone collector #1425
* [FEATURE] Add new cooling_device metrics to thermal zone collector #1445
* [FEATURE] Add swap usage on darwin #1508
* [FEATURE] Add Btrfs collector #1512
* [FEATURE] Add RAPL collector #1523
* [FEATURE] Add new softnet collector #1576
* [FEATURE] Add new udp_queues collector #1503
* [FEATURE] Add basic authentication #1673
* [ENHANCEMENT] Log pid when there is a problem reading the process stats #1341
* [ENHANCEMENT] Collect InfiniBand port state and physical state #1357
* [ENHANCEMENT] Include additional XFS runtime statistics. #1423
* [ENHANCEMENT] Report non-fatal collection errors in the exporter metric. #1439
* [ENHANCEMENT] Expose IPVS firewall mark as a label #1455
* [ENHANCEMENT] Add check for systemd version before attempting to query certain metrics. #1413
* [ENHANCEMENT] Add a flag to adjust mount timeout #1486
* [ENHANCEMENT] Add new counters for flush requests in Linux 5.5 #1548
* [ENHANCEMENT] Add metrics and tests for UDP receive and send buffer errors #1534
* [ENHANCEMENT] The sockstat collector now exposes IPv6 statistics in addition to the existing IPv4 support. #1552
* [ENHANCEMENT] Add infiniband info metric #1563
* [ENHANCEMENT] Add unix socket support for supervisord collector #1592
* [ENHANCEMENT] Implement loadavg on all BSDs without cgo #1584
* [ENHANCEMENT] Add model_name and stepping to node_cpu_info metric #1617
* [ENHANCEMENT] Add `--collector.perf.cpus` to allow setting the CPU list for perf stats. #1561
* [ENHANCEMENT] Add metrics for IO errors and retires on Darwin. #1636
* [ENHANCEMENT] Add perf tracepoint collection flag #1664
* [ENHANCEMENT] ZFS: read contents of objset file #1632
* [ENHANCEMENT] Linux CPU: Cache CPU metrics to make them monotonically increasing #1711
* [BUGFIX] Read /proc/net files with a single read syscall #1380
* [BUGFIX] Renamed label `state` to `name` on `node_systemd_service_restart_total`. #1393
* [BUGFIX] Fix netdev nil reference on Darwin #1414
* [BUGFIX] Strip path.rootfs from mountpoint labels #1421
* [BUGFIX] Fix seconds reported by schedstat #1426
* [BUGFIX] Fix empty string in path.rootfs #1464
* [BUGFIX] Fix typo in cpufreq metric names #1510
* [BUGFIX] Read /proc/stat in one syscall #1538
* [BUGFIX] Fix OpenBSD cache memory information #1542
* [BUGFIX] Refactor textfile collector to avoid looping defer #1549
* [BUGFIX] Fix network speed math #1580
* [BUGFIX] collector/systemd: use regexp to extract systemd version #1647
* [BUGFIX] Fix initialization in perf collector when using multiple CPUs #1665
* [BUGFIX] Fix accidentally empty lines in meminfo_linux #1671

Signed-off-by: Ben Kochie <superq@gmail.com>
@SuperQ SuperQ mentioned this pull request May 25, 2020
oblitorum pushed a commit to shatteredsilicon/node_exporter that referenced this pull request Apr 9, 2024
Add support for https connections.

Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>
Signed-off-by: James Ritchie <james.g.ritchie@baesystems.com>
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Signed-off-by: Ben RIdley <benridley29@gmail.com>
oblitorum pushed a commit to shatteredsilicon/node_exporter that referenced this pull request Apr 9, 2024
* The netdev collector CLI argument `--collector.netdev.ignored-devices` was renamed to `--collector.netdev.device-blacklist` in order to conform with the systemd collector. prometheus#1279
* The label named `state` on `node_systemd_service_restart_total` metrics was changed to `name` to better describe the metric. prometheus#1393
* Refactoring of the mdadm collector changes several metrics
    - `node_md_disks_active` is removed
    - `node_md_disks` now has a `state` label for "fail", "spare", "active" disks.
    - `node_md_is_active` is replaced by `node_md_state` with a state set of "active", "inactive", "recovering", "resync".
* Additional label `mountaddr` added to NFS device metrics to distinguish mounts from the same URL, but different IP addresses. prometheus#1417
* Metrics node_cpu_scaling_frequency_min_hrts and node_cpu_scaling_frequency_max_hrts of the cpufreq collector were renamed to node_cpu_scaling_frequency_min_hertz and node_cpu_scaling_frequency_max_hertz. prometheus#1510
* Collectors that are enabled, but are unable to find data to collect, now return 0 for `node_scrape_collector_success`.

* [CHANGE] Add `--collector.netdev.device-whitelist`. prometheus#1279
* [CHANGE] Ignore iso9600 filesystem on Linux prometheus#1355
* [CHANGE] Refactor mdadm collector prometheus#1403
* [CHANGE] Add `mountaddr` label to NFS metrics. prometheus#1417
* [CHANGE] Don't count empty collectors as success. prometheus#1613
* [FEATURE] New flag to disable default collectors prometheus#1276
* [FEATURE] Add experimental TLS support prometheus#1277, prometheus#1687, prometheus#1695
* [FEATURE] Add collector for Power Supply Class prometheus#1280
* [FEATURE] Add new schedstat collector prometheus#1389
* [FEATURE] Add FreeBSD zfs support prometheus#1394
* [FEATURE] Add uname support for Darwin and OpenBSD prometheus#1433
* [FEATURE] Add new metric node_cpu_info prometheus#1489
* [FEATURE] Add new thermal_zone collector prometheus#1425
* [FEATURE] Add new cooling_device metrics to thermal zone collector prometheus#1445
* [FEATURE] Add swap usage on darwin prometheus#1508
* [FEATURE] Add Btrfs collector prometheus#1512
* [FEATURE] Add RAPL collector prometheus#1523
* [FEATURE] Add new softnet collector prometheus#1576
* [FEATURE] Add new udp_queues collector prometheus#1503
* [FEATURE] Add basic authentication prometheus#1673
* [ENHANCEMENT] Log pid when there is a problem reading the process stats prometheus#1341
* [ENHANCEMENT] Collect InfiniBand port state and physical state prometheus#1357
* [ENHANCEMENT] Include additional XFS runtime statistics. prometheus#1423
* [ENHANCEMENT] Report non-fatal collection errors in the exporter metric. prometheus#1439
* [ENHANCEMENT] Expose IPVS firewall mark as a label prometheus#1455
* [ENHANCEMENT] Add check for systemd version before attempting to query certain metrics. prometheus#1413
* [ENHANCEMENT] Add a flag to adjust mount timeout prometheus#1486
* [ENHANCEMENT] Add new counters for flush requests in Linux 5.5 prometheus#1548
* [ENHANCEMENT] Add metrics and tests for UDP receive and send buffer errors prometheus#1534
* [ENHANCEMENT] The sockstat collector now exposes IPv6 statistics in addition to the existing IPv4 support. prometheus#1552
* [ENHANCEMENT] Add infiniband info metric prometheus#1563
* [ENHANCEMENT] Add unix socket support for supervisord collector prometheus#1592
* [ENHANCEMENT] Implement loadavg on all BSDs without cgo prometheus#1584
* [ENHANCEMENT] Add model_name and stepping to node_cpu_info metric prometheus#1617
* [ENHANCEMENT] Add `--collector.perf.cpus` to allow setting the CPU list for perf stats. prometheus#1561
* [ENHANCEMENT] Add metrics for IO errors and retires on Darwin. prometheus#1636
* [ENHANCEMENT] Add perf tracepoint collection flag prometheus#1664
* [ENHANCEMENT] ZFS: read contents of objset file prometheus#1632
* [ENHANCEMENT] Linux CPU: Cache CPU metrics to make them monotonically increasing prometheus#1711
* [BUGFIX] Read /proc/net files with a single read syscall prometheus#1380
* [BUGFIX] Renamed label `state` to `name` on `node_systemd_service_restart_total`. prometheus#1393
* [BUGFIX] Fix netdev nil reference on Darwin prometheus#1414
* [BUGFIX] Strip path.rootfs from mountpoint labels prometheus#1421
* [BUGFIX] Fix seconds reported by schedstat prometheus#1426
* [BUGFIX] Fix empty string in path.rootfs prometheus#1464
* [BUGFIX] Fix typo in cpufreq metric names prometheus#1510
* [BUGFIX] Read /proc/stat in one syscall prometheus#1538
* [BUGFIX] Fix OpenBSD cache memory information prometheus#1542
* [BUGFIX] Refactor textfile collector to avoid looping defer prometheus#1549
* [BUGFIX] Fix network speed math prometheus#1580
* [BUGFIX] collector/systemd: use regexp to extract systemd version prometheus#1647
* [BUGFIX] Fix initialization in perf collector when using multiple CPUs prometheus#1665
* [BUGFIX] Fix accidentally empty lines in meminfo_linux prometheus#1671

Signed-off-by: Ben Kochie <superq@gmail.com>
oblitorum pushed a commit to shatteredsilicon/node_exporter that referenced this pull request Apr 9, 2024
Add support for https connections.

Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com>
Signed-off-by: James Ritchie <james.g.ritchie@baesystems.com>
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
Signed-off-by: Ben RIdley <benridley29@gmail.com>
oblitorum pushed a commit to shatteredsilicon/node_exporter that referenced this pull request Apr 9, 2024
* The netdev collector CLI argument `--collector.netdev.ignored-devices` was renamed to `--collector.netdev.device-blacklist` in order to conform with the systemd collector. prometheus#1279
* The label named `state` on `node_systemd_service_restart_total` metrics was changed to `name` to better describe the metric. prometheus#1393
* Refactoring of the mdadm collector changes several metrics
    - `node_md_disks_active` is removed
    - `node_md_disks` now has a `state` label for "fail", "spare", "active" disks.
    - `node_md_is_active` is replaced by `node_md_state` with a state set of "active", "inactive", "recovering", "resync".
* Additional label `mountaddr` added to NFS device metrics to distinguish mounts from the same URL, but different IP addresses. prometheus#1417
* Metrics node_cpu_scaling_frequency_min_hrts and node_cpu_scaling_frequency_max_hrts of the cpufreq collector were renamed to node_cpu_scaling_frequency_min_hertz and node_cpu_scaling_frequency_max_hertz. prometheus#1510
* Collectors that are enabled, but are unable to find data to collect, now return 0 for `node_scrape_collector_success`.

* [CHANGE] Add `--collector.netdev.device-whitelist`. prometheus#1279
* [CHANGE] Ignore iso9600 filesystem on Linux prometheus#1355
* [CHANGE] Refactor mdadm collector prometheus#1403
* [CHANGE] Add `mountaddr` label to NFS metrics. prometheus#1417
* [CHANGE] Don't count empty collectors as success. prometheus#1613
* [FEATURE] New flag to disable default collectors prometheus#1276
* [FEATURE] Add experimental TLS support prometheus#1277, prometheus#1687, prometheus#1695
* [FEATURE] Add collector for Power Supply Class prometheus#1280
* [FEATURE] Add new schedstat collector prometheus#1389
* [FEATURE] Add FreeBSD zfs support prometheus#1394
* [FEATURE] Add uname support for Darwin and OpenBSD prometheus#1433
* [FEATURE] Add new metric node_cpu_info prometheus#1489
* [FEATURE] Add new thermal_zone collector prometheus#1425
* [FEATURE] Add new cooling_device metrics to thermal zone collector prometheus#1445
* [FEATURE] Add swap usage on darwin prometheus#1508
* [FEATURE] Add Btrfs collector prometheus#1512
* [FEATURE] Add RAPL collector prometheus#1523
* [FEATURE] Add new softnet collector prometheus#1576
* [FEATURE] Add new udp_queues collector prometheus#1503
* [FEATURE] Add basic authentication prometheus#1673
* [ENHANCEMENT] Log pid when there is a problem reading the process stats prometheus#1341
* [ENHANCEMENT] Collect InfiniBand port state and physical state prometheus#1357
* [ENHANCEMENT] Include additional XFS runtime statistics. prometheus#1423
* [ENHANCEMENT] Report non-fatal collection errors in the exporter metric. prometheus#1439
* [ENHANCEMENT] Expose IPVS firewall mark as a label prometheus#1455
* [ENHANCEMENT] Add check for systemd version before attempting to query certain metrics. prometheus#1413
* [ENHANCEMENT] Add a flag to adjust mount timeout prometheus#1486
* [ENHANCEMENT] Add new counters for flush requests in Linux 5.5 prometheus#1548
* [ENHANCEMENT] Add metrics and tests for UDP receive and send buffer errors prometheus#1534
* [ENHANCEMENT] The sockstat collector now exposes IPv6 statistics in addition to the existing IPv4 support. prometheus#1552
* [ENHANCEMENT] Add infiniband info metric prometheus#1563
* [ENHANCEMENT] Add unix socket support for supervisord collector prometheus#1592
* [ENHANCEMENT] Implement loadavg on all BSDs without cgo prometheus#1584
* [ENHANCEMENT] Add model_name and stepping to node_cpu_info metric prometheus#1617
* [ENHANCEMENT] Add `--collector.perf.cpus` to allow setting the CPU list for perf stats. prometheus#1561
* [ENHANCEMENT] Add metrics for IO errors and retires on Darwin. prometheus#1636
* [ENHANCEMENT] Add perf tracepoint collection flag prometheus#1664
* [ENHANCEMENT] ZFS: read contents of objset file prometheus#1632
* [ENHANCEMENT] Linux CPU: Cache CPU metrics to make them monotonically increasing prometheus#1711
* [BUGFIX] Read /proc/net files with a single read syscall prometheus#1380
* [BUGFIX] Renamed label `state` to `name` on `node_systemd_service_restart_total`. prometheus#1393
* [BUGFIX] Fix netdev nil reference on Darwin prometheus#1414
* [BUGFIX] Strip path.rootfs from mountpoint labels prometheus#1421
* [BUGFIX] Fix seconds reported by schedstat prometheus#1426
* [BUGFIX] Fix empty string in path.rootfs prometheus#1464
* [BUGFIX] Fix typo in cpufreq metric names prometheus#1510
* [BUGFIX] Read /proc/stat in one syscall prometheus#1538
* [BUGFIX] Fix OpenBSD cache memory information prometheus#1542
* [BUGFIX] Refactor textfile collector to avoid looping defer prometheus#1549
* [BUGFIX] Fix network speed math prometheus#1580
* [BUGFIX] collector/systemd: use regexp to extract systemd version prometheus#1647
* [BUGFIX] Fix initialization in perf collector when using multiple CPUs prometheus#1665
* [BUGFIX] Fix accidentally empty lines in meminfo_linux prometheus#1671

Signed-off-by: Ben Kochie <superq@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.