Commit Graph

1442 Commits

Author SHA1 Message Date
Ben Kochie
5fed4f01e9
Handle no data from powersupplyclass
Handle the case when /sys/class/power_supply doesn't exist. Fixes
logging error spam.

Requires https://github.com/prometheus/procfs/pull/308

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-06-13 11:09:16 +02:00
Julien Pivotto
594f417bdf
Adapt https/web-config.yml (#1734)
Currently web-config is not a valid yaml and is an incomplete reference.

Keep the reference in README.md and create a minimalist web-config.yml
that acts as an exemple.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-06-04 17:49:37 +02:00
David O'Rourke
217bbdd6b9 helper_test: Fix copyright year
Signed-off-by: David O'Rourke <david.orourke@gmail.com>
2020-06-03 11:33:10 +02:00
David O'Rourke
03450a4d7d filesystem_freebsd: Use bytesToString to get label values
Signed-off-by: David O'Rourke <david.orourke@gmail.com>
2020-06-03 11:33:10 +02:00
David O'Rourke
d6fbce1529 helper: Add new bytesToString function and tests
Signed-off-by: David O'Rourke <david.orourke@gmail.com>
2020-06-03 11:33:10 +02:00
David O'Rourke
4c06e33c23 filesystem_freebsd: Fix label values
We must know the length of the various filesystem C strings before
turning them from a byte array into a Go string, otherwise our Go
strings could contain null bytes, corrupting the label values.

Signed-off-by: David O'Rourke <david.orourke@gmail.com>
2020-06-03 11:33:10 +02:00
Tobias Schmidt
2c433cdac3
Fix and simplify checkmetrics make target (#1731)
The checkmetrics target currently uses promtool v2.5.0 which doesn't
include many improvements done over the time. This change also
simplifies the promtool installation, avoiding a temporary directory by
extracting the file directly to the target destination.

Signed-off-by: Tobias Schmidt <tobidt@gmail.com>
2020-06-02 23:45:24 +02:00
Wei He
0253277121
Add flag to aggr ipvs metrics to avoid high cardinality metrics (#1709)
Fixes #1708

Signed-off-by: Wing924 <weihe924stephen@gmail.com>
2020-06-02 10:52:00 +02:00
Ben Kochie
b7cb72adeb
Merge pull request #1729 from carlpett/update-windows-exporter-reference
Update windows_exporter reference
2020-06-01 21:34:03 +02:00
Calle Pettersson
ba20f5e061 Update windows_exporter reference
Signed-off-by: Calle Pettersson <calle@cape.nu>
2020-06-01 21:07:42 +02:00
Brian Brazil
e92c7b5bbf Use our standard config doc format.
Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
2020-05-30 12:49:26 +02:00
Ben Kochie
b9c96706a7
Merge pull request #1714 from prometheus/superq/1.0
Release 1.0.0
2020-05-26 06:41:01 +02:00
Ben Kochie
11a0aaaa0a
Release 1.0.0
* 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>
2020-05-25 14:03:04 +02:00
Ben Kochie
2aef188bc8
Merge pull request #1679 from alexnoz/ntp-usage-str-fix
Use clearer usage string for `collector.ntp.server-is-local` option
2020-05-25 13:58:01 +02:00
Ben Kochie
f3073755a3
Merge pull request #1690 from shapor/patch-1
Move regexp to global in meminfo_linux.go
2020-05-25 13:57:24 +02:00
Ben Kochie
7e7845a29f
Merge pull request #1711 from prometheus/superq/cpu_cache
Linux CPU: Cache CPU metrics
2020-05-25 13:51:50 +02:00
Ben Kochie
3565316d7e
Linux CPU: Cache CPU metrics
Cache CPU metrics to avoid counters (ie iowait) jumping backwards.

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

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-05-24 16:31:26 +02:00
Ben Kochie
b8847b5b32
Merge pull request #1707 from roidelapluie/doc
https: Fix htpasswd command
2020-05-18 13:58:19 +02:00
Julien Pivotto
f43190760a https: Fix htpasswd command
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-05-18 12:19:31 +02:00
Ben Kochie
73aec06ea6
Merge pull request #1705 from prometheus/bjk/update_mod
Update Go modules
2020-05-15 12:42:38 +02:00
Ben Kochie
b532c81da7
Update filesystem freebsd
Upstream x/sys/unix changed types.

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-05-14 21:02:21 +02:00
Ben Kochie
cdb9e7d2b8
Update vendor/
Signed-off-by: Ben Kochie <superq@gmail.com>
2020-05-14 19:47:23 +02:00
Ben Kochie
a582b3335a
Update Go modules
* Bump to Go 1.14 minimum version.
* Update vendoring

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

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-05-14 19:46:18 +02:00
Ben Kochie
3cedd344fd Release 1.0.0-rc.1
* Update CHANGELOG with fixes and improvements from rc.0

Signed-off-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Richard Hartmann <richih@richih.org>
2020-05-14 16:41:37 +02:00
Sudhar287
6807e5319b
read contents of objset file (#1632)
* added objread functionality

Signed-off-by: Sudharshann D <sudhar287@gmail.com>
2020-05-13 21:06:00 +02:00
Julien Pivotto
f87e566df9
tls: enable the selection of more TLS settings (#1695)
tls: enable the selection of more TLS settings
* Rename `tls_config` to `tls_server_config`.
* Add new http server config with HTTP/2 enabled by default.

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-05-13 20:26:01 +02:00
Julien Pivotto
0c532984b7
Finish the update to go 1.14 (#1696)
* Finish the update to go 1.14

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-05-03 21:48:28 +02:00
Julien Pivotto
202ecf9c9d
Add basic authentication (#1683)
* Add basic authentication

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-05-01 14:26:51 +02:00
Frederic Branczyk
b42819b69d
Merge pull request #1657 from povilasv/NodeTextFileCollectorScrapeError
Add NodeTextFileCollectorScrapeError alert to mixin
2020-04-30 17:54:06 +02:00
Tom Wilkie
53e3418e5f Add init.d script for OpenWrt.
Signed-off-by: Tom Wilkie <tom@grafana.com>
2020-04-28 16:14:19 +02:00
Julien Pivotto
01054558c2
Update go to 1.14 (#1692)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-04-28 11:18:18 +02:00
Julien Pivotto
70a77aefc0 Add tls versions
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-04-28 00:33:08 +02:00
Julien Pivotto
0ef1d4dc15 TLS: only support TLS 1.2
TLS 1.0 and 1.1 are deprecated by major vendors (e.g. browsers).

Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-04-28 00:33:08 +02:00
Shapor Naghibzadeh
a1a3633d89 Move regexp to global in meminfo_linux.go
Compile regexp outside of parsing function in meminfo_linux.go

Signed-off-by: Shapor Naghibzadeh <shapor@google.com>
2020-04-26 01:13:25 -07:00
Julien Pivotto
091bed01b0
Make TLS config consistent with Prometheus (#1685)
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
2020-04-25 13:42:45 +02:00
Alex Nozdriukhin
744e334ef9 Use clearer usage string for collector.ntp.server-is-local option
Signed-off-by: Alex Nozdriukhin <alex-nozzz@mail.ru>
fixes #1662
2020-04-18 00:53:57 +03:00
alpaca
fa4edd700e
Fix accidently empty lines in meminfo_linux (#1671)
* Fix accidently empty lines in meminfo_linux

Signed-off-by: qwertysun <qwertysun@tencent.com>
2020-04-17 12:07:35 +02:00
Goutham Veeramachaneni
bd0918f29a Expose the function to generate tls.Config
We're looking to reuse this in Cortex to client side encrypt our
connections and not having this exposed is making us copy this entire
function.

Signed-off-by: Goutham Veeramachaneni <gouthamve@gmail.com>
2020-04-17 12:02:31 +02:00
Daniel Hodges
b14168cf6a
Add perf tracepoint collection flag (#1664)
* Add tracepoint collector option for perf collector

Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
2020-04-17 12:02:08 +02:00
Daniel Hodges
44357ed677
Fix initialization in perf collector when using multiple CPUs (#1665)
* Fix initialization in perf collector when using multiple CPUs

Signed-off-by: Daniel Hodges <hodges.daniel.scott@gmail.com>
2020-04-17 11:59:07 +02:00
Michael Vorburger ⛑️
4135c00d33 minor README doc fix re. collector.perf.cpus
Signed-off-by: Michael Vorburger <mike@vorburger.ch>
2020-04-17 11:02:26 +02:00
jangdm
d4d2e1db98
fix typo in TIME.md (#1670)
fix typo in TIME.md

Signed-off-by: jangdm <jamin4@naver.com>
2020-04-09 09:00:00 +02:00
WOO CHANG HO
612ea0cd12 Add more compatible rules
Signed-off-by: zodiac12k <zodiac12k@gmail.com>
2020-04-08 10:19:44 +02:00
J0WI
674ddfa35c Fix typo in README.md
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2020-04-08 10:18:22 +02:00
Fatih Degirmenci
a78c5d3cd8
Update systemd example readme file (#1663)
The readme file does not mention the need to create a folder named
/var/lib/node_exporter/textfile_collector as a step. Lack of this
folder results errors for node_exporter service which is visible
in systemd status output. These errors possibly harmless but it is
not good to have them still.

$ sudo systemctl status node_exporter
--- snipped ---
Apr 04 14:51:35 ubuntu node_exporter[14713]: level=info ts=2020-04-04T14:51:35.584Z caller=node_exporter.go:190 msg="Listening on" address=:9100
Apr 04 15:05:34 ubuntu node_exporter[14876]: level=error ts=2020-04-04T15:05:34.464Z caller=textfile.go:197 collector=textfile msg="failed to read textfile collector directory" path=/var/lib/node_exporter/textfile_collector=textfile msg="failed to read textfile collector directory" path=/var/lib/node_exporter/textfile_collector err="open /var/lib/node_exporter/textfile_collector: no such file or directory"
--- snipped ---

Signed-off-by: Fatih Degirmenci <fdegir@gmail.com>
2020-04-06 15:32:02 +02:00
Povilas Versockas
bd3e6d224c
Add NodeTextFileCollectorScrapeError alert to mixin
Signed-off-by: Povilas Versockas <p.versockas@gmail.com>
2020-03-31 18:12:36 +03:00
Peter Bueschel
da5972b539
Add gauges for allocated memory for queued UDP and TCP packages (#1503)
* Two new states will be added to the tcpstat collector called rx_queued_bytes and tx_queued_bytes.

For UDP datagrams an additional collector 'udp_queues' can be used to expose the total lengths of the tx_queue and rx_queue.
@SuperQ and @discordianfish this changes gives us the option to check for overloaded UDP + TCP processing.
The names of the new TCP states and the UDP metric can be discussed.
The current reasons are just:

I don't want to add another collector for the same exposed file, so I just added the new states to the tcpstat collector.
I chose the name 'udp_queue' instead of 'udpstat' as UDP has no state.


Signed-off-by: Peter Bueschel <peter.bueschel@logmein.com>
2020-03-31 10:46:32 +02:00
Ben Kochie
4891b01b6c
Add changelog entry for #1647
Signed-off-by: Ben Kochie <superq@gmail.com>
2020-03-27 21:36:39 +01:00
Paweł Krupa
1771fc87d9
collector/systemd: use regexp to extract systemd version (#1647)
Signed-off-by: paulfantom <pawel@krupa.net.pl>
2020-03-27 21:35:56 +01:00
Björn Rabenstein
a57f246579
Merge pull request #1649 from prometheus/beorn7/mixin
Fix sign error in `NodeClockSkewDetected`
2020-03-25 14:44:11 +01:00