Commit graph

1624 commits

Author SHA1 Message Date
Julien Pivotto 2e20d668f2 Only iniate collectors once
When /metrics is called for specific collectors, the collectors are
initialed every time. Which means that we spend a lot of time
re-initiating the same collectors again and again. Especially, some
collectors make the assumptions that that are initiated once - e.g.
systemd collector generates info message upon initiation.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-06-04 11:20:56 +02:00
Ben Kochie e1db354611
Merge pull request #1887 from prometheus/superq/promhttp_errorlog
Add ErrorLog plumbing to promhttp
2021-06-03 16:38:30 +02:00
Ben Kochie 3bc9a93c20
Add ErrorLog plumbing to promhttp
Fix the error logging of the promhttp handler by connecting it to the
promlog setup.
* Switch to go-kit/log.
* Cleanup CHANGELOG.

Fixes: https://github.com/prometheus/node_exporter/issues/1886

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-06-03 10:47:41 +02:00
Ben Kochie f04d5569a2
Merge pull request #2045 from kcx2366425574/master
fix the uncorrect word
2021-05-26 09:12:14 +02:00
kcx2366425574 9eff6761df fix the uncorrect word
Signed-off-by: kcx2366425574 <18279911430@163.com>
2021-05-26 09:58:37 +08:00
Ben Kochie 220aa5b889
Merge pull request #2043 from luizluca/fixtures_readonly_files
Use rm -rf to remove fixtures
2021-05-20 23:12:33 +02:00
Luiz Angelo Daros de Luca f91a1ccc78 Use rm -rf to remove fixtures
rm interactively asks for confirmation while removing read-only
files and fixtures sys has dozens of them.

Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
2021-05-20 17:31:45 -03:00
David Leadbeater f29590e0a8
Merge pull request #2039 from dgl/usage-stdout 2021-05-12 21:08:27 +01:00
David Leadbeater 0387f55a9b Make node_exporter print usage to STDOUT
Matches updated behaviour in Prometheus and other tools.

Signed-off-by: David Leadbeater <dgl@dgl.cx>
2021-05-11 15:21:09 +01:00
Ben Kochie c3d8fc6051
Merge pull request #2038 from hs0210/work
Fix golint issue caused by typo
2021-05-11 07:29:59 +02:00
Hu Shuai 5ee20043a7 Fix golint issue caused by typo
Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
2021-05-11 09:55:52 +08:00
raviprasad_lr 504f9b785c fix interval in graphs panels of node dashboard
Signed-off-by: raviprasad_lr <raviprasad_lr@yahoo.com>
2021-04-26 11:14:30 +02:00
Ben Kochie 46cdf618c9
Merge pull request #2020 from prometheus/superq/darwin-arm64
Add Darwin arm64 build
2021-04-14 13:11:16 +02:00
Ben Kochie 7b5cc3e505
Add Darwin arm64 build
Add darwin/arm64 to the CGO crossbuilder list.
* Update Makefile.common to pick up new promu.
* Fix possible nil pointer caught by staticcheck.
* Update collector build tags.

https://github.com/prometheus/node_exporter/issues/1997

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-04-14 10:39:52 +02:00
Johannes 'fish' Ziemke a5908bf82b Make interval configurable
Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
2021-04-07 09:37:04 +02:00
Johannes 'fish' Ziemke 772335caa8 Use 5m rate in mixins
The default scrape interval of Prometheus is 60s, so we can't use a 1m
rate.

Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
2021-04-07 09:37:04 +02:00
Julien Pivotto 7717702c96
Merge pull request #2012 from fhemberger/filesystem-flag
Rename filesystem collector flags to match netdev and systemd collectors
2021-03-26 22:02:37 +01:00
Ben Kochie e972957494
Merge pull request #2006 from prometheus/superq/promu_filter
Update build
2021-03-26 14:20:40 +01:00
Frederic Hemberger 39124626cd Rename collector.filesystem flags to match other collectors
Ref: #1743
Fixes: #1994

Signed-off-by: Frederic Hemberger <mail@frederic-hemberger.de>
2021-03-24 21:01:10 +01:00
Ben Kochie 7b895d8970
Update build
* Use new promu regexp matching for platforms.
* Bump to Go 1.16.
* Use uclibc for Dockerfile since we don't use CGO for Linux.
* Use CircleCI build parallelism.
* Split Docker image test to separate CI step.

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-03-24 13:34:29 +01:00
Ben Kochie 1dfd858e4a
Merge pull request #2010 from prometheus/repo_sync
Synchronize common files from prometheus/prometheus
2021-03-22 10:59:34 +01:00
prombot 677406b5ed Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2021-03-22 00:02:04 +00:00
Ben Kochie 81caeb6a1b
Merge pull request #2000 from prometheus/fixpanic-systemd-backwards-compat
Fix panix when using backwards compatible flags
2021-03-19 16:22:42 +01:00
Ben Kochie 857a91cad3
Merge pull request #1989 from prometheus/superq/net_speed
Add flag to ignore network speed if it is unknown
2021-03-18 22:58:52 +01:00
Ben Kochie 9893fca77e
Add flag to ignore network speed if it is unknown
Some devices (ex virtual) don't have a speed and report `-1` as the
speed value. Add a flag to allow ignoring speed on these devices.

Fixes: https://github.com/prometheus/node_exporter/issues/1967

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-03-18 11:36:31 +01:00
Ben Kochie f32216f263
Merge pull request #2003 from prometheus/repo_sync
Synchronize common files from prometheus/prometheus
2021-03-18 10:48:04 +01:00
prombot abc6cb205c Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2021-03-18 00:02:13 +00:00
Ben Kochie a6bd720719
Merge pull request #2001 from prometheus/repo_sync
Synchronize common files from prometheus/prometheus
2021-03-17 13:38:25 +01:00
prombot 502197d93b Update common Prometheus files
Signed-off-by: prombot <prometheus-team@googlegroups.com>
2021-03-17 00:01:59 +00:00
Julien Pivotto e7649ba48e Fix panix when using backwards compatible flags
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2021-03-15 14:59:49 +01:00
Ben Kochie e57f30736c
Merge pull request #1990 from prometheus/superq/1.1.2
Release version 1.1.2
2021-03-05 09:43:43 +01:00
Ben Kochie 378d7b46bf
Release version 1.1.2
* [BUGFIX] Handle errors from disabled PSI subsystem #1983
* [BUGFIX] Sanitize strings from /sys/class/power_supply #1984
* [BUGFIX] Silence missing netclass errors #1986

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-03-05 08:30:29 +01:00
Ben Kochie d462d5c5d2
Merge pull request #1986 from prometheus/superq/fix_netclass_error
Silence missing netclass errors
2021-03-04 19:34:54 +01:00
Ben Kochie 3b3ef7357f
Silence missing netclass errors
* Handle no such file and permission denied errors.
* Reduce excessive error wrapping.

Fixes: https://github.com/prometheus/node_exporter/issues/1840

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-03-03 20:40:08 +01:00
Ben Kochie 40e9d294be
Merge pull request #1984 from prometheus/superq/power_supply_panic
Sanitize strings from /sys/class/power_supply
2021-03-03 20:38:58 +01:00
Ben Kochie 23e5b245a4
Sanitize strings from /sys/class/power_supply
Avoid panic on invalid UTF-8 from /sys/class/power_supply by
sanitizing strings parsed from the kernel.
* Add a broken string to the test fixtures.

Fixes: https://github.com/prometheus/node_exporter/issues/1979

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-03-03 18:05:51 +01:00
Ben Kochie dd99513e37
Merge pull request #1983 from prometheus/superq/ENOTSUP
Handle errors from disabled PSI subsystem
2021-03-03 12:58:55 +01:00
Ben Kochie 46d0a0813f
Handle errors from disabled PSI subsystem
When CONFIG_PSI_DEFAULT_DISABLED=y, the pressure system returns
"operation not supported", rather than permission denied or not
exposing the /proc/pressure files.

Fixes: https://github.com/prometheus/node_exporter/issues/1961

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-03-03 11:02:28 +01:00
Mark Frost e80863f69d fix formatting
Signed-off-by: Mark Frost <mark@markfrost.co.uk>
2021-02-28 11:30:07 +01:00
Ben Kochie 41c003d5f8
Merge pull request #1968 from prometheus/superq/1.1.1
Release 1.1.1
2021-02-13 08:20:10 +01:00
Ben Kochie d1a791b1af
Release 1.1.1
* [BUGFIX] Fix ineffassign issue #1957
* [BUGFIX] Fix some noisy log lines #1962

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-02-12 16:47:01 +01:00
Ben Kochie acccda9668
Merge pull request #1962 from prometheus/superq/more_quiet_logs
Fix some noisy log lines
2021-02-12 11:17:14 +01:00
Ben Kochie 9cf6a8e56a
Merge pull request #1966 from nickatsegment/patch-1
Mention `--collector.disable-defaults` in the README
2021-02-12 10:37:56 +01:00
Nick Irvine 8c40ba6e82 Mention --collector.disable-defaults in the README
Took me ages to find this thing since there's literally nearly 100 other options that look almost the same.

https://github.com/prometheus/node_exporter/pull/1460#issuecomment-761816460 some other person wants this as well. :)
Signed-off-by: Nick Irvine <nick@segment.com>
2021-02-11 14:52:30 -05:00
Ben Kochie 5a6551e8ae
Fix some noisy log lines
* Bump procfs to include some fixes to error messages.
* Lower zpoolStatePaths log from Warn to Debug.

Fixes: https://github.com/prometheus/node_exporter/issues/1961
Fixes: https://github.com/prometheus/node_exporter/issues/1960

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-02-10 16:16:54 +01:00
Ben Kochie a4dfffbd77
Merge pull request #1957 from hs0210/work
Fix ineffassign issue
2021-02-08 11:37:44 +01:00
Hu Shuai 4109a5089f Fix ineffassign issue
Signed-off-by: Hu Shuai <hus.fnst@cn.fujitsu.com>
2021-02-08 10:53:12 +08:00
Ben Kochie 0e74fbcd5f
Merge pull request #1952 from prometheus/bjk/update_build_1.1.0
Release 1.1.0
2021-02-05 23:52:00 +01:00
Ben Kochie a37d3f659c
Release 1.1.0
* Update Build
  - Update CircleCI orb.
  - Update CIrcleCI Machine image.
  - Use golang-builder 1.15.
* Update Go modules.
* Fixup fixtures for XFS bug.

NOTE: We have improved some of the flag naming conventions (PR #1743). The old names are
      deprecated and will be removed in 2.0. They will continue to work for backwards
      compatibility.

* [CHANGE] Improve filter flag names #1743
* [CHANGE] Add btrfs and powersupplyclass to list of exporters enabled by default #1897
* [FEATURE] Add fibre channel collector #1786
* [FEATURE] Expose cpu bugs and flags as info metrics. #1788
* [FEATURE] Add network_route collector #1811
* [FEATURE] Add zoneinfo collector #1922
* [ENHANCEMENT] Add more InfiniBand counters #1694
* [ENHANCEMENT] Add flag to aggr ipvs metrics to avoid high cardinality metrics #1709
* [ENHANCEMENT] Adding backlog/current queue length to qdisc collector #1732
* [ENHANCEMENT] Include TCP OutRsts in netstat metrics #1733
* [ENHANCEMENT] Add pool size to entropy collector #1753
* [ENHANCEMENT] Remove CGO dependencies for OpenBSD amd64 #1774
* [ENHANCEMENT] bcache: add writeback_rate_debug stats #1658
* [ENHANCEMENT] Add check state for mdadm arrays via node_md_state metric #1810
* [ENHANCEMENT] Expose XFS inode statistics #1870
* [ENHANCEMENT] Expose zfs zpool state #1878
* [ENHANCEMENT] Added an ability to pass collector.supervisord.url via SUPERVISORD_URL environment variable #1947
* [BUGFIX] filesystem_freebsd: Fix label values #1728
* [BUGFIX] Fix various procfs parsing errors #1735
* [BUGFIX] Handle no data from powersupplyclass #1747
* [BUGFIX] udp_queues_linux.go: change upd to udp in two error strings #1769
* [BUGFIX] Fix node_scrape_collector_success behaviour #1816
* [BUGFIX] Fix NodeRAIDDegraded to not use a string rule expressions #1827
* [BUGFIX] Fix node_md_disks state label from fail to failed #1862
* [BUGFIX] Handle EPERM for syscall in timex collector #1938
* [BUGFIX] bcache: fix typo in a metric name #1943
* [BUGFIX] Fix XFS read/write stats (https://github.com/prometheus/procfs/pull/343)

Signed-off-by: Ben Kochie <superq@gmail.com>
2021-02-05 21:23:23 +01:00
Ben Kochie 43b91ac846
Merge pull request #1954 from prometheus/superq/noisy_rapl
Fix rapl collector log noise
2021-02-05 21:20:53 +01:00