Commit Graph

1062 Commits

Author SHA1 Message Date
neiledgar
7e4d9bd150 Update wifi stats to support multiple stations (#977) (#980)
Signed-off-by: neiledgar <neil.edgar@btinternet.com>
2018-07-16 16:02:25 +02:00
xginn8
9b97f44a70 Add a counter for refused socket unit connections, available as of systemd 239 (#995)
Signed-off-by: xginn8 <mamcgi@gmail.com>
2018-07-16 16:01:42 +02:00
Brandon Gilmore
76bbd8dd18 Use /proc/mounts instead of statfs(2) for ro state (#1002)
While the statfs(2) approach is reliable for normally mounted filesystems, the
flags returned can be inconsistent when filesystem has been remounted read-only
after encountering an error. The returned flags do accurately represent the
internal state of the filesystem, but they do not reflect whether the VFS layer
will accept writes. Instead, it makes sense to parse the current VFS mount
state from the options field in /proc/mounts since it takes precedence.

Signed-off-by: Brandon Gilmore <bgilmore@valvesoftware.com>
2018-07-16 15:56:27 +02:00
Jan Klat
c4102f1175 Add sys/class/net parsing from procfs and expose its metrics (#851)
* add sys/class/net parsing from procfs and expose its metrics

Signed-off-by: Jan Klat <jenik@klatys.cz>

* change code to use int pointers per procfs change, move netclass to separate collector, change metric naming

Signed-off-by: Jan Klat <jenik@klatys.cz>

* bump year in licence, remove redundant newline, correct fixtures

Signed-off-by: Jan Klat <jenik@klatys.cz>

* fix style

Signed-off-by: Jan Klat <jenik@klatys.cz>

* change carrier changes to counter type

Signed-off-by: Jan Klat <jenik@klatys.cz>

* fix e2e output

Signed-off-by: Jan Klat <jenik@klatys.cz>

* add fixtures

Signed-off-by: Jan Klat <jenik@klatys.cz>

* update vendor, use fixtures correctly

Signed-off-by: Jan Klat <jenik@klatys.cz>

* change fixtures (device in /sys/class/net should be symlinked)

Signed-off-by: Jan Klat <jenik@klatys.cz>

* correct fixtures for 64k page, updated readme

Signed-off-by: Jan Klat <jenik@klatys.cz>
2018-07-16 15:08:18 +02:00
mknapphrt
09b4305090 Changed the way that stuck mounts are handled. If a mount fails to return, it will stop being queried until it returns. (#997)
Fixed spelling mistakes.

Update transport_generic.go

Changed to a mutex approach instead of channels and added a timeout before declaring a mount stuck.

Removed unnecessary lock channel and clarified some var names.

Fixed style nits.

Signed-off-by: Mark Knapp <mknapp@hudson-trading.com>
2018-07-14 11:10:28 +02:00
xginn8
ac5a981761 Adding socket stat collection for systemd socket units (#968)
Signed-off-by: xginn8 <mamcgi@gmail.com>
2018-07-05 16:26:48 +02:00
xginn8
8af84a215d Add support for NRestarts counter introduced in systemd 235 (#992)
* Add support for NRestarts counter introduced in systemd 235

`.service` units increment this counter any time the Restart= condition is
triggered.

Signed-off-by: Matthew McGinn <mamcgi@gmail.com>
2018-07-05 13:31:45 +02:00
Bernd Müller
ee1e1997bc Add scsi smart data to prometheus exporter (#862)
Add scsi smart data to prometheus exporter

Signed-off-by: mueller <mueller@b1-systems.de>
2018-07-04 00:30:20 +02:00
Ivan Kiselev
ae90bac5b8 Add example of translating new metrics to old format in case of migration to 1.16 version (#982)
Add additional example of how to save old metrics

Signed-off-by: Ivan Kiselev <ivan@messagebird.com>
2018-07-02 12:39:32 +02:00
Ben Kochie
107e5dfecc
Fix mdadm collector issues (#985)
* Send "Personality unknown" to debug, not info, remove unnecessary newline.
* Add support for "linear" personality.
* Always set number of active disks to 0 when a device is inactive.
* Add total disks calculation to unknown personalites.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-07-02 12:38:20 +02:00
Roman Vynar
55c32fcf02 Add compat rules for filesystem collector. (#973)
Signed-off-by: Roman Vynar <roman.vynar@goquiq.com>
2018-06-13 18:32:07 +02:00
Matt Bostock
f56e8fcdf4 Fix spelling of celsius in IPMI example script (#967)
'Celsius' should be spelt with an 's':
https://en.wikipedia.org/wiki/Celsius

Signed-off-by: Matt Bostock <mbostock@cloudflare.com>
2018-06-08 19:21:19 +02:00
Derek Marcotte
2678d68dcc Fix for #945, cpu temperature is signed. (#965)
* Fix for #945, cpu temperature is signed.

Added a type conversion to cpu temperature sysctl.  Will still
collect/report -1 when the value is -1, this is because it should be up
to interpretation whether this is the correct value for the system or
not.

Some drivers will report -1 for cpu temperature.  Other sensors will
report "an input into the fan control algorithm", i.e. not the actual
temperature, but how much fan it wants.  Some people cool their machines
with liquid nitrogen.

Signed-off-by: Derek Marcotte <554b8425@razorfever.net>
2018-06-07 15:01:25 +02:00
Brad Beam
e3cf1d5187 Adding support for evaluating octal characters in mountpoint (#954)
Signed-off-by: Brad Beam <brad.beam@b-rad.info>
2018-06-06 16:49:19 +02:00
Matt Layher
cd217b77f5
Merge pull request #963 from prometheus/mdl-vendor-wifi
vendor: bump github.com/mdlayher/wifi
2018-06-05 16:44:19 -04:00
Pavlo Kutishchev
456bf5094a Add processes exporter (#950)
* Add processes exporter

Signed-off-by: Pavel Kutishchev <pavel.kutishchev@olx.com>
Signed-off-by: Ben Kochie <superq@gmail.com>
2018-06-05 19:38:32 +02:00
Matt Layher
0f7eba1dec
vendor: bump github.com/mdlayher/wifi
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2018-06-01 13:38:40 -04:00
Ben Kochie
278a98fee0
Merge pull request #960 from prometheus/fish-remove-travis-build-batch
Remove travis build badge
2018-05-30 21:46:00 +02:00
Johannes 'fish' Ziemke
a6a8ec3c1c Remove travis build badge
Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
2018-05-30 19:16:18 +02:00
Matt Bostock
516e5d4beb Add metric for outdated libraries (#957)
Add metrics that count how many running processes are linking to deleted
libraries on each machine. Deleted libraries are usually outdated
libraries, and outdated libraries may have known security
vulnerabilities.

The rationale behind storing these as metrics is allow the rollout of
security fixes to be tracked across a fleet of machines, ensuring that
all affected processes are restarted (e.g. via a reboot).

I'm parsing the output from `/proc/*/maps` because it's using `lsof -d
DEL` can be too slow, particularly if you have sockets that bind to
thousands of IP addresses.

The metric labels include the library path and the base filename, which
allows us to pinpoint the exact path of the deleted library but also
allows us to aggregate on the library name (or approximations of it)
even if library locations differ between operating system versions.

The metrics output and the CPU time consumed is as follows:

    user@host:~$ time sudo python processes.py
    # HELP node_processes_linking_deleted_libraries Count of running processes that link a deleted library
    # TYPE node_processes_linking_deleted_libraries gauge
    node_processes_linking_deleted_libraries{library_path="locale-archive", library_name="/usr/lib/locale"} 3
    node_processes_linking_deleted_libraries{library_path="libevent-2.0.so.5.1.9", library_name="/usr/lib/x86_64-linux-gnu"} 4

    real        0m0.071s
    user        0m0.030s
    sys 0m0.041s

Including the library filename and path will result in reasonably high
metrics cardinality, however I think the benefits when an urgent
security patch is being deployed outweigh concerns around cardinality.

This script assumes that library files do not contain spaces in their
path.

Signed-off-by: Matt Bostock <mbostock@cloudflare.com>
2018-05-25 18:20:42 +02:00
Ivan Voronchihin
606568314b Add Makefile.common (#940)
* Add Makefile.common

Signed-off-by: bege13mot <bege13mot@gmail.com>

* Change Makefile.common to initial Prometheus common

Signed-off-by: bege13mot <bege13mot@gmail.com>

* fix checkmetrics

Signed-off-by: bege13mot <bege13mot@gmail.com>

* fix promu

Signed-off-by: bege13mot <bege13mot@gmail.com>

* Add test to common

Signed-off-by: bege13mot <bege13mot@gmail.com>

* Fix GOPATH

Signed-off-by: bege13mot <bege13mot@gmail.com>

* Initial Makefile.common

Signed-off-by: bege13mot <bege13mot@gmail.com>

* original Makefile.common

Signed-off-by: bege13mot <bege13mot@gmail.com>

* delete promu

Signed-off-by: bege13mot <bege13mot@gmail.com>

* delete redundant .PRONY params

Signed-off-by: bege13mot <bege13mot@gmail.com>
2018-05-24 23:31:48 +02:00
Ben Kochie
04d69158b4
Merge pull request #949 from szeestraten/patch-1
Fix metric name in directory size text collector example
2018-05-19 23:53:32 +02:00
Sandor Zeestraten
578d814744 Fix metric name in directory size text collector example
The directory size text collector example uses the wrong metric name in the HELP and TYPE lines rendering the comments unusable.

This fixes that by using the same metric name.

Signed-off-by: Sandor Zeestraten <sandor@zeestrataca.com>
2018-05-19 21:11:46 +02:00
Ben Kochie
699b6d7f15
Merge pull request #948 from prometheus/superq/rules
Update example rules
2018-05-18 08:57:31 +02:00
Ben Kochie
ec28a8e9d4
Fix cpu utilization rule.
Signed-off-by: Ben Kochie <superq@gmail.com>
2018-05-17 18:15:07 +02:00
Ben Kochie
eb3f922c50
Update naming.
Signed-off-by: Ben Kochie <superq@gmail.com>
2018-05-17 17:52:07 +02:00
Ben Kochie
f00f3db08b
Add a CPU in-use recording example.
Signed-off-by: Ben Kochie <superq@gmail.com>
2018-05-17 17:49:07 +02:00
Ben Kochie
628b2db5bc
Update example rules
* Remove Prometheus 1.x example file.
* Update CPU rules for 0.16.0.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-05-17 17:44:39 +02:00
Ben Kochie
b8918c7d32
Merge pull request #947 from nicholascapo/add_v16_MemAvailable_rule
docs: Add example recording rule for node_memory_MemAvailable
2018-05-17 08:11:42 +02:00
Nicholas Capo
09d11817d0 docs: Add example recording rule for node_memory_MemAvailable
Signed-off-by: Nicholas Capo <nicholas.capo@gmail.com>
2018-05-16 17:01:51 -05:00
Ben Kochie
d42bd70f43
Merge pull request #939 from prometheus/superq/0.16
Release 0.16.0
2018-05-15 17:49:24 +02:00
Ben Kochie
1882a08041 Release 0.16.0
Changes since 0.16.0-rc.3

* [CHANGE] align Darwin disk stat names with Linux #930

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-05-15 16:16:05 +02:00
Ben Kochie
e48b0e9c6a
Merge pull request #942 from prometheus/superq/0.16-doc
Document upgrade options for v0.16.0
2018-05-15 16:13:40 +02:00
Alexey Kopytov
dd98a09bb2 A couple of ARM64-related fixes (#934)
* Do not rely on AArch64 CPUs to support 32-bit ARM for cross-testing.

Signed-off-by: Alexey Kopytov <akopytov@gmail.com>

* aarch64 like ppc64le reports 64k node_sockstat_TCP_mem_bytes due to 64k pages.

Signed-off-by: Alexey Kopytov <akopytov@gmail.com>
2018-05-14 15:55:49 +02:00
Ben Kochie
c5a74ce1a1
Add label mangling.
Signed-off-by: Ben Kochie <superq@gmail.com>
2018-05-14 12:24:05 +02:00
Ben Kochie
dc1972e9e3
Document upgrade options for v0.16.0
* Add an upgrade guide.
* Add an example recording rules.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-05-11 13:45:36 +02:00
Steve Kotsopoulos
84dc362b05 Align Darwin disk stat names with Linux (#930)
Signed-off-by: Steve Kotsopoulos <sk@fywss.com>
2018-05-02 11:32:55 +02:00
Mario Trangoni
24a28fcc9e Remove unused func, var, and const (#928)
Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
2018-04-29 14:35:43 +02:00
Mario Trangoni
c9f421d0dd Fix some golint issues (#927)
* collector/cpu_*: rename nodeCpuSecondsDesc to nodeCPUSecondsDesc

Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>

* collector/qdisc_linux.go: add NewQdiscStatCollector comment

Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>

* collector/cpu_linux.go: rename core_map to coreMap

Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
2018-04-29 14:34:47 +02:00
Ben Kochie
7073dcdcb5
Fix 0.16.0-rc.3 release date. 2018-04-27 17:50:15 +02:00
Ben Kochie
575d8950d3
Merge pull request #925 from prometheus/superq/rc.3
Release v0.16.0-rc.3
2018-04-27 17:46:44 +02:00
Ben Kochie
11b60ac32f
Release v0.16.0-rc.3
Chaneges since v0.16.0-rc.2
* Remove gmond collector #852
* Build with Go 1.9[0]
* Fix /proc/net/dev/ interface name handling #910

[0]: https://github.com/prometheus/node_exporter/issues/870

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-04-27 16:50:48 +02:00
Ben Kochie
361b5bf85d
Merge pull request #852 from prometheus/remove-gmond
Remove gmond collector
2018-04-27 10:02:16 +02:00
Ben Kochie
bab8445f8c
Merge pull request #922 from prometheus/superq/go_1.9
Use Go 1.9 for build.
2018-04-27 10:01:38 +02:00
Ben Kochie
315ec8d3bf
Use Go 1.9 for build.
Workaround CGO bugs in 1.10.1.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-04-24 16:22:35 +02:00
Ben Kochie
75561cb1fc
Merge pull request #910 from prometheus/superq/netdev_dot
Fix /proc/net/dev/ interface name handling
2018-04-18 13:50:30 +02:00
Ben Kochie
b10ca77680
Fix /proc/net/dev/ interface name handling
* Allow any character (UTF-8) for Linux interface names.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-04-18 12:53:59 +02:00
Ben Kochie
661427f2c1
Merge pull request #907 from prometheus/superq/ppc_e2e
Update ppc64le end-to-end fixture.
2018-04-18 12:33:30 +02:00
Ben Kochie
1ab4a460c7 Update ppc64le end-to-end fixture.
Signed-off-by: Ben Kochie <superq@gmail.com>
2018-04-18 09:12:21 +02:00
Johannes 'fish' Ziemke
fd66a86a30 Remove gmond collector
Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
2018-04-17 20:20:24 +02:00