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

Bump node_exporter version to v1.5.0 #2629

Merged
merged 9 commits into from
Jan 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,15 @@ internal API changes are not present.

Main (unreleased)
-----------------
### Breaking changes

- Node Exporter configuration options changed to align with new upstream version (@Thor77):
- `diskstats_ignored_devices` is now `diskstats_device_exclude` in agent configuration.
- `ignored_devices` is now `device_exclude` in flow configuration.

### Enhancements

- Update Prometheus Node Exporter integration to v1.5.0. (@Thor77)

v0.31.0-rc.0 (2023-01-26)
--------------------
Expand Down
17 changes: 14 additions & 3 deletions component/prometheus/integration/node_exporter/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ var DefaultConfig = Config{
RootFSPath: node_integration.DefaultConfig.RootFSPath,
SysFSPath: node_integration.DefaultConfig.SysFSPath,
Disk: DiskStatsConfig{
IgnoredDevices: node_integration.DefaultConfig.DiskStatsIgnoredDevices,
DeviceExclude: node_integration.DefaultConfig.DiskStatsDeviceExclude,
},
EthTool: EthToolConfig{
MetricsInclude: ".*",
Expand Down Expand Up @@ -92,6 +92,7 @@ type Config struct {
Powersupply PowersupplyConfig `river:"powersupply,block,optional"`
Runit RunitConfig `river:"runit,block,optional"`
Supervisord SupervisordConfig `river:"supervisord,block,optional"`
Sysctl SysctlConfig `river:"sysctl,block,option"`
Systemd SystemdConfig `river:"systemd,block,optional"`
Tapestats TapestatsConfig `river:"tapestats,block,optional"`
Textfile TextfileConfig `river:"textfile,block,optional"`
Expand All @@ -113,7 +114,8 @@ func (c *Config) Convert() *node_integration.Config {
CPUEnableCPUGuest: c.CPU.EnableCPUGuest,
CPUEnableCPUInfo: c.CPU.EnableCPUInfo,
CPUFlagsInclude: c.CPU.FlagsInclude,
DiskStatsIgnoredDevices: c.Disk.IgnoredDevices,
DiskStatsDeviceExclude: c.Disk.DeviceExclude,
DiskStatsDeviceInclude: c.Disk.DeviceInclude,
EthtoolDeviceExclude: c.EthTool.DeviceExclude,
EthtoolDeviceInclude: c.EthTool.DeviceInclude,
EthtoolMetricsInclude: c.EthTool.MetricsInclude,
Expand All @@ -138,6 +140,8 @@ func (c *Config) Convert() *node_integration.Config {
PowersupplyIgnoredSupplies: c.Powersupply.IgnoredSupplies,
RunitServiceDir: c.Runit.ServiceDir,
SupervisordURL: c.Supervisord.URL,
SysctlInclude: c.Sysctl.Include,
SysctlIncludeInfo: c.Sysctl.IncludeInfo,
SystemdEnableRestartsMetrics: c.Systemd.EnableRestartsMetrics,
SystemdEnableStartTimeMetrics: c.Systemd.EnableStartTimeMetrics,
SystemdEnableTaskMetrics: c.Systemd.EnableTaskMetrics,
Expand Down Expand Up @@ -245,7 +249,8 @@ type CPUConfig struct {

// DiskStatsConfig contains config specific to the diskstats collector.
type DiskStatsConfig struct {
IgnoredDevices string `river:"ignored_devices,attr,optional"`
DeviceExclude string `river:"device_exclude,attr,optional"`
DeviceInclude string `river:"device_include,attr,optional"`
}

// NTPConfig contains config specific to the ntp collector.
Expand All @@ -266,3 +271,9 @@ type SystemdConfig struct {
UnitExclude string `river:"unit_exclude,attr,optional"`
UnitInclude string `river:"unit_include,attr,optional"`
}

// SysctlConfig contains config specific to the sysctl collector.
type SysctlConfig struct {
Include []string `river:"include,attr,optional"`
IncludeInfo []string `river:"include_info,attr,optional"`
}
21 changes: 19 additions & 2 deletions docs/sources/configuration/integrations/node-exporter-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ the Agent is running on is a no-op.
| boottime | Exposes system boot time derived from the kern.boottime sysctl. | Darwin, Dragonfly, FreeBSD, NetBSD, OpenBSD, Solaris | yes |
| btrfs | Exposes statistics on btrfs. | Linux | yes |
| buddyinfo | Exposes statistics of memory fragments as reported by /proc/buddyinfo. | Linux | no |
| cgroups | Exposes number of active and enabled cgroups. | Linux | no |
| conntrack | Shows conntrack statistics (does nothing if no /proc/sys/net/netfilter/ present). | Linux | yes |
| cpu | Exposes CPU statistics. | Darwin, Dragonfly, FreeBSD, Linux, Solaris | yes |
| cpufreq | Exposes CPU frequency statistics. | Linux, Solaris | yes |
Expand Down Expand Up @@ -160,10 +161,13 @@ the Agent is running on is a no-op.
| rapl | Exposes various statistics from /sys/class/powercap. | Linux | yes |
| runit | Exposes service status from runit. | any | no |
| schedstat | Exposes task scheduler statistics from /proc/schedstat. | Linux | yes |
| selinux | Exposes SELinux statistics. | Linux | yes |
| slabinfo | Exposes slab statistics from `/proc/slabinfo`. | Linux | no |
| sockstat | Exposes various statistics from /proc/net/sockstat. | Linux | yes |
| softnet | Exposes statistics from /proc/net/softnet_stat. | Linux | yes |
| stat | Exposes various statistics from /proc/stat. This includes boot time, forks and interrupts. | Linux | yes |
| supervisord | Exposes service status from supervisord. | any | no |
| sysctl | Expose sysctl values from `/proc/sys`. | Linux | no |
| systemd | Exposes service and system status from systemd. | Linux | no |
| tapestats | Exposes tape device stats. | Linux | yes |
| tcpstat | Exposes TCP connection status information from /proc/net/tcp and /proc/net/tcp6. (Warning: the current version has potential performance issues in high load situations). | Linux | no |
Expand Down Expand Up @@ -274,8 +278,11 @@ the Agent is running on is a no-op.
# Regexp of `flags` field in cpu info to filter.
[cpu_flags_include: <string>]

# Regexmp of devices to ignore for diskstats.
[diskstats_ignored_devices: <string> | default = "^(ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\\d+n\\d+p)\\d+$"]
# Regexp of devices to ignore for diskstats (mutually exclusive with diskstats_device_include).
[diskstats_device_exclude: <string> | default = "^(ram|loop|fd|(h|s|v|xv)d[a-z]|nvme\\d+n\\d+p)\\d+$"]

# Regexp of devices to include for diskstats (mutually exclusive with diskstats_device_exclude).
[diskstats_device_include: <string>]

# Regexp of ethtool devices to exclude (mutually exclusive with ethtool_device_include)
[ethtool_device_exclude: <string>]
Expand Down Expand Up @@ -358,6 +365,16 @@ the Agent is running on is a no-op.
# variable.
[supervisord_url: <string> | default = "http://localhost:9001/RPC2"]

# Numeric sysctl values to expose.
# For sysctl with multiple numeric values,
# an optional mapping can be given to expose each value as its own metric.
sysctl_include:
[- <string>]

# String sysctl values to expose.
sysctl_include_info:
[- <string>]

# Regexp of systemd units to include. Units must both match include and not
# match exclude to be collected.
[systemd_unit_include: <string> | default = ".+"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ perf | [perf][] | Configures the perf collector. | no
powersupply | [powersupply][] | Configures the powersupply collector. | no
runit | [runit][] | Configures the runit collector. | no
supervisord | [supervisord][] | Configures the supervisord collector. | no
sysctl | [sysctl][] | Configures the sysctl collector. | no
systemd | [systemd][] | Configures the systemd collector. | no
tapestats | [tapestats][] | Configures the tapestats collector. | no
textfile | [textfile][] | Configures the textfile collector. | no
Expand All @@ -95,6 +96,7 @@ vmstat | [vmstat][] | Configures the vmstat collector. | no
[powersupply]: #powersupply-block
[runit]: #runit-block
[supervisord]: #supervisord-block
[sysctl]: #sysctl-block
[systemd]: #systemd-block
[tapestats]: #tapestats-block
[textfile]: #textfile-block
Expand All @@ -116,7 +118,8 @@ Name | Type | Description | Default | Required
### disk block
Name | Type | Description | Default | Required
---- | ---- | ----------- | ------- | --------
`ignored_devices` | `string` | Regexp of devices to ignore for diskstats. | `"^(ram\|loop\|fd\|(h\|s\|v\|xv)d[a-z]\|nvme\\d+n\\d+p)\\d+$"` | no
`device_exclude` | `string` | Regexp of devices to exclude for diskstats (mutually exclusive with `device_include`). | `"^(ram\|loop\|fd\|(h\|s\|v\|xv)d[a-z]\|nvme\\d+n\\d+p)\\d+$"` | no
`device_include` | `string` | Regexp of devices to include for diskstats (mutually exclusive with `device_exclude`). | | no

### ethtool block
Name | Type | Description | Default | Required
Expand Down Expand Up @@ -201,6 +204,12 @@ name | type | description | default | required
Setting `SUPERVISORD_URL` in the environment overrides the default value.
An explicit value in the block takes precedence over the environment variable.

### sysctl block
name | type | description | default | required
---- | ---- | ----------- | ------- | --------
`include` | `list(string)` | Numeric sysctl values to expose. | `[]` | no
`include_info` | `list(string)` | String sysctl values to expose. | `[]` | no

### systemd block
name | type | description | default | required
---- | ---- | ----------- | ------- | --------
Expand Down Expand Up @@ -318,6 +327,7 @@ or disable collectors that are expensive to run.
| `softnet` | Exposes statistics from `/proc/net/softnet_stat`. | Linux | yes |
| `stat` | Exposes various statistics from `/proc/stat`. This includes boot time, forks and interrupts. | Linux | yes |
| `supervisord` | Exposes service status from supervisord. | any | no |
| `sysctl` | Expose sysctl values from `/proc/sys`. | Linux | no |
| `systemd` | Exposes service and system status from systemd. | Linux | no |
| `tapestats` | Exposes tape device stats. | Linux | yes |
| `tcpstat` | Exposes TCP connection status information from `/proc/net/tcp` and `/proc/net/tcp6`. (Warning: The current version has potential performance issues in high load situations.) | Linux | no |
Expand Down
11 changes: 11 additions & 0 deletions docs/sources/upgrade-guide/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,17 @@ These symbolic links will be removed in v0.33. Custom entrypoints must be
updated prior to v0.33 to use the new binaries before the symbolic links get
removed.

### Breaking change: node exporter configuration options changed

With the upgrade of the Node Exporter integration to upstream v1.5.0
the diskstats collector has new configuration options to configure device selection.

- `diskstats_ignored_devices` is now `diskstats_device_exclude` in agent configuration.
- `ignored_devices` is now `device_exclude` in flow configuration.

Additionally there's new `diskstats_device_exclude` and `device_include` (flow) option
to explicitly select devices to include.

## v0.30.0

### Breaking change: `ebpf_exporter` integration removed
Expand Down
31 changes: 17 additions & 14 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ require (
github.com/prometheus/consul_exporter v0.8.0
github.com/prometheus/memcached_exporter v0.10.0
github.com/prometheus/mysqld_exporter v0.14.0
github.com/prometheus/node_exporter v1.3.1-0.20220127103407-4f27a4fd8efa
github.com/prometheus/node_exporter v1.5.0
github.com/prometheus/procfs v0.8.0
github.com/prometheus/prometheus v1.99.0
github.com/prometheus/snmp_exporter v0.20.1-0.20220111173215-83399c23888f
Expand Down Expand Up @@ -129,7 +129,7 @@ require (
github.com/cespare/xxhash/v2 v2.2.0
github.com/cloudflare/cloudflare-go v0.27.0
github.com/coreos/go-systemd v0.0.0-20191104093116-d3cd4ed1dbcf
github.com/coreos/go-systemd/v22 v22.4.0
github.com/coreos/go-systemd/v22 v22.5.0
github.com/fatih/color v1.13.0
github.com/ghodss/yaml v1.0.1-0.20190212211648-25d852aebe32
github.com/google/go-cmp v0.5.9
Expand Down Expand Up @@ -250,7 +250,7 @@ require (
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/checkpoint-restore/go-criu/v5 v5.3.0 // indirect
github.com/cilium/ebpf v0.7.0 // indirect
github.com/cilium/ebpf v0.9.3 // indirect
github.com/cncf/xds/go v0.0.0-20220314180256-7f1daf1720fc // indirect
github.com/containerd/cgroups v1.0.3 // indirect
github.com/containerd/console v1.0.3 // indirect
Expand All @@ -261,6 +261,8 @@ require (
github.com/cyphar/filepath-securejoin v0.2.3 // indirect
github.com/danieljoos/wincred v1.1.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/dennwc/btrfs v0.0.0-20221026161108-3097362dc072 // indirect
github.com/dennwc/ioctl v1.0.0 // indirect
github.com/dennwc/varint v1.0.0 // indirect
github.com/denverdino/aliyungo v0.0.0-20190125010748-a747050bb1ba // indirect
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
Expand Down Expand Up @@ -315,7 +317,7 @@ require (
github.com/go-test/deep v1.1.0 // indirect
github.com/go-zookeeper/zk v1.0.3 // indirect
github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect
github.com/godbus/dbus/v5 v5.0.6 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/gogo/googleapis v1.4.1 // indirect
github.com/gogo/status v1.1.1 // indirect
github.com/golang-jwt/jwt/v4 v4.4.1 // indirect
Expand Down Expand Up @@ -343,7 +345,7 @@ require (
github.com/hairyhenderson/toml v0.4.2-0.20210923231440-40456b8e66cf // indirect
github.com/hashicorp/cronexpr v1.1.1 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-envparse v0.0.0-20200406174449-d9cfd743a15e // indirect
github.com/hashicorp/go-envparse v0.1.0 // indirect
github.com/hashicorp/go-hclog v1.3.1 // indirect
github.com/hashicorp/go-immutable-radix v1.3.1 // indirect
github.com/hashicorp/go-msgpack v0.5.5 // indirect
Expand All @@ -366,7 +368,7 @@ require (
github.com/hashicorp/vic v1.5.1-0.20190403131502-bbfe86ec9443 // indirect
github.com/hashicorp/yamux v0.0.0-20190923154419-df201c70410d // indirect
github.com/hetznercloud/hcloud-go v1.35.3 // indirect
github.com/hodgesds/perf-utils v0.4.0 // indirect
github.com/hodgesds/perf-utils v0.5.1 // indirect
github.com/huandu/xstrings v1.3.1 // indirect
github.com/illumos/go-kstat v0.0.0-20210513183136-173c9b0a9973 // indirect
github.com/imdario/mergo v0.3.13 // indirect
Expand All @@ -382,10 +384,10 @@ require (
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/joho/godotenv v1.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/josharian/native v0.0.0-20200817173448-b6b71def0850 // indirect
github.com/josharian/native v1.0.0 // indirect
github.com/joyent/triton-go v0.0.0-20180628001255-830d2b111e62 // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/jsimonetti/rtnetlink v0.0.0-20211022192332-93da33804786 // indirect
github.com/jsimonetti/rtnetlink v1.3.0 // indirect
github.com/julienschmidt/httprouter v1.3.0 // indirect
github.com/karrick/godirwalk v1.16.1 // indirect
github.com/kevinburke/ssh_config v1.1.0 // indirect
Expand All @@ -407,10 +409,11 @@ require (
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/mattn/go-xmlrpc v0.0.3 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mdlayher/genetlink v1.0.0 // indirect
github.com/mdlayher/netlink v1.4.1 // indirect
github.com/mdlayher/socket v0.0.0-20210307095302-262dc9984e00 // indirect
github.com/mdlayher/wifi v0.0.0-20200527114002-84f0b9457fdd // indirect
github.com/mdlayher/ethtool v0.0.0-20220830195143-0e16326d06d1 // indirect
github.com/mdlayher/genetlink v1.2.0 // indirect
github.com/mdlayher/netlink v1.7.0 // indirect
github.com/mdlayher/socket v0.4.0 // indirect
github.com/mdlayher/wifi v0.0.0-20220330172155-a44c70b6d3c8 // indirect
github.com/miekg/pkcs11 v1.1.1 // indirect
github.com/mindprince/gonvml v0.0.0-20190828220739-9ebdce4bb989 // indirect
github.com/mistifyio/go-zfs v2.1.2-0.20190413222219-f784269be439+incompatible // indirect
Expand Down Expand Up @@ -443,7 +446,7 @@ require (
github.com/opencontainers/image-spec v1.0.3-0.20211202183452-c5a74bcca799 // indirect
github.com/opencontainers/runc v1.1.2 // indirect
github.com/opencontainers/runtime-spec v1.0.3-0.20210326190908-1c3f411f0417 // indirect
github.com/opencontainers/selinux v1.10.1 // indirect
github.com/opencontainers/selinux v1.10.2 // indirect
github.com/openzipkin/zipkin-go v0.4.1 // indirect
github.com/ovh/go-ovh v1.1.0 // indirect
github.com/packethost/packngo v0.1.1-0.20180711074735-b9cb5096f54c // indirect
Expand All @@ -464,7 +467,7 @@ require (
github.com/rs/zerolog v1.26.1 // indirect
github.com/ryanuber/go-glob v1.0.0 // indirect
github.com/ryszard/goskiplist v0.0.0-20150312221310-2dfbae5fcf46 // indirect
github.com/safchain/ethtool v0.1.0 // indirect
github.com/safchain/ethtool v0.2.0 // indirect
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da // indirect
github.com/satori/go.uuid v1.2.1-0.20181028125025-b2ce2384e17b // indirect
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.9 // indirect
Expand Down
Loading