Commit Graph

1279 Commits (fc73586c971225037aa09b5462031b9694278c74)

Author SHA1 Message Date
Paul Gier e0d6d11859 netclass_linux: remove varying labels from the 'up' metric (#1243)
* netclass_linux: remove varying labels from the 'up' metric

This moves the variable label values such as 'operstate' out of
the 'network_up' metric and into a separate metric called '_info'.
This allows the 'up' metric to remain continous over state changes.
Fixes #1236

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-02-07 15:59:32 +01:00
Johannes 'fish' Ziemke 6ea0aa73e4 Rename interface to device in netclass collector (#1224)
* Rename interface to device in netclass collector

This makes it consistent with other networking metrics like node_network_receive_bytes_total

This closes #1223 

Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
2019-02-06 20:02:48 +01:00
Ralf Horstmann 3867ad5ab0 Add diskstats collector for OpenBSD (#1250)
* Add diskstats collector for OpenBSD

Tested on i386 and amd64, OpenBSD 6.4 and -current.

* Refactor diskstats collectors

This moves common descriptors from Linux, Darwin, OpenBSD
diskstats collectors into diskstats_common.go

Signed-off-by: Ralf Horstmann <ralf+github@ackstorm.de>
2019-02-06 11:36:22 +01:00
David O'Rourke d442108d7a collector: Implement uname collector for FreeBSD (#1239)
* collector: Implement uname collector for FreeBSD

Signed-off-by: David O'Rourke <david.orourke@gmail.com>
2019-02-05 17:39:24 +01:00
Paul Gier 2b81bff518 collector: use path/filepath for handling file paths (#1245)
Similar to #1228.  Update the remaining collectors to use
'path/filepath' intead of 'path' for manipulating file paths.

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-02-05 16:37:27 +01:00
Ralf Horstmann dda51ad06a Fix staticcheck ST1003 warnings (#1249)
This fixes a few staticcheck ST1003 warnings in OpenBSD CPU
collector. No functional change.

Signed-off-by: Ralf Horstmann <ralf+github@ackstorm.de>
2019-02-05 07:46:50 +01:00
James Hartig 62e87ca00c Fixed capitalization of linux in Makefile (#1252)
Signed-off-by: James Hartig <james@getadmiral.com>
2019-02-04 20:10:26 +01:00
mknapphrt 7fbdd0ae93 Update procfs vendor (#1248)
Signed-off-by: Mark Knapp <mknapp@hudson-trading.com>
2019-02-04 16:54:41 +01:00
mpursley 7d150d5782 add physical disk "state" to megaraid_pd_info metric (#1226)
Signed-off-by: Matt Pursley <mpursley@gmail.com>
2019-01-31 12:40:37 +01:00
Paul Gier 40dce45d8d collector/systemd: add new label "type" for systemd_unit_state (#1229)
Adds a new label called "type" systemd_unit_state which contains the
Type field from the unit file.  This applies only to the .service and
.mount unit types.  The other unit types do not include the optional
type field.

Fixes #1210

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-01-29 23:54:47 +01:00
Paul Gier 6a3b92ce57 cleanup makefile (#1232)
The recent updates to Makefile.common make some of the stuff in
Makefile unnecessary.

Signed-off-by: Paul Gier <pgier@redhat.com>
2019-01-23 21:44:12 +01:00
Matt Layher 3b5c2f6463 collector: use path/filepath for handling file paths (#1228)
Signed-off-by: Matt Layher <mdlayher@gmail.com>
2019-01-21 17:44:55 +01:00
Jon Davies e766485286 Add kstat-based Solaris metrics (#1197)
* collector/loadavg_solaris.go: Use libkstat to gather load averages.
* go.mod: Added go-kstat.
* boot_time_solaris.go: Added.
* cpu_solaris.go: Added.
* README.md: Updated entries for Solaris.
* collector/zfs_solaris.go: Added.
* CHANGELOG.md: Added note about kstat-based Solaris metrics.

Signed-off-by: Jonathan Davies <jpds@protonmail.com>
2019-01-12 13:33:56 +01:00
Mateusz Piotrowski a616953b9a Do not use .PHONY for $(PROMTOOL) (#1216)
Adding $(PROMTOOL) to .PHONY makes it impossible to provide an alternative path
to promtool.

Signed-off-by: Mateusz Piotrowski <0mp@FreeBSD.org>
2019-01-10 17:44:10 +01:00
Johannes 'fish' Ziemke 8a6a464b7e
Add staticcheck.conf to enable ST1003 (#1214)
> ST1003 – Poorly chosen identifier (non-default)
> Identifiers, such as variable and package names, follow certain rules.

Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
2019-01-04 16:36:49 +00:00
Ben Kochie 070e4b2e17 Update Makefile.common (#1220)
* Update Makefile.common

Update to new staticcheck method[0].

[0]: https://github.com/prometheus/prometheus/pull/5057

Signed-off-by: Ben Kochie <superq@gmail.com>

* Fix staticcheck errors.

Signed-off-by: Ben Kochie <superq@gmail.com>
2019-01-04 15:58:53 +00:00
Dai Dang Van 085d872aaf Add S.M.A.R.T metrics (#1209)
Update metrics following SMART attributes in [1][2]
- Seek_Error_Rate - ID: 7
- Reallocated_Event_Count - ID: 196

[1] https://en.wikipedia.org/wiki/S.M.A.R.T.#Known_ATA_S.M.A.R.T._attributes
[2] https://en.wikibooks.org/wiki/Minimizing_Hard_Disk_Drive_Failure_and_Data_Loss/Self-Monitoring,_Analysis,_and_Reporting_Technology

Signed-off-by: Dai, Dang Van <daikk115@gmail.com>
2019-01-03 18:12:28 +01:00
Anton Tolchanov cf8b29d1fb Add a sample btrfs stats collector script (#1200)
Signed-off-by: Anton Tolchanov <commits@knyar.net>
2018-12-21 14:10:03 +01:00
Simon Pasquier 97dab59e18 Fix go.sum after Go1.11.4 bump (#1202)
Signed-off-by: Simon Pasquier <spasquie@redhat.com>
2018-12-19 11:41:27 +00:00
dhewg 7c960fd683 smartmon.sh: add metric for active/low-power mode (#1192)
Add this new metric (where sda is active and sdb is in standby mode):
smartmon_device_active{disk="/dev/sda",type="sat"} 1
smartmon_device_active{disk="/dev/sdb",type="sat"} 0

Also skip further metrics if the drive is in a low-power mode. This
prevents spinning up disks just to get the metrics (which matches e.g.
debian's default behavior for smartd).

Signed-off-by: Andre Heider <a.heider@gmail.com>
2018-12-13 16:11:23 +01:00
Paul Gier 03bb276deb Makefile.common: fix promu download path for arm32 (#1196)
Signed-off-by: Paul Gier <pgier@redhat.com>
2018-12-13 16:07:22 +01:00
Paul Gier 614b815e00 Makefile.common: fix format rule (#1195)
Signed-off-by: Paul Gier <pgier@redhat.com>
2018-12-11 17:47:09 +01:00
Ben Kochie 73ddf5f1f7 netstat: Add TCP In/Out Segs (#1185)
* netstat: Add TCP In/Out Segs

In order to get a better idea of TCP packet loss, we need to know how
many `node_netstat_Tcp_OutSegs` there are so we can compare this to
`node_netstat_Tcp_RetransSegs`.

Signed-off-by: Ben Kochie <superq@gmail.com>

* Update fixtures

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-12-08 12:16:02 +01:00
Tariq Ibrahim 6bd51269b7 update to host_statistics64 for Darwin meminfo (#1183)
Signed-off-by: tariqibrahim <tariq181290@gmail.com>
2018-12-06 16:47:20 +01:00
Ben Kochie f9dd8e9b8c
Release v0.17.0 (#1168)
* Update CHANGELOG
* Update VERSION

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-11-30 15:18:48 +01:00
Ben Kochie 4abc6fba7d
Add fallback for missing /proc/1/mounts (#1172)
* Add fallback for missing /proc/1/mounts

On some systems, `/proc/1/mounts` is hidden from non-root users due to
the `hidepid` procfs feature. Attempt to fallback to `/proc/mounts` if
`/proc/1/mounts` is not found.

Signed-off-by: Ben Kochie <superq@gmail.com>

* Add tests.

Signed-off-by: Ben Kochie <superq@gmail.com>

* Add CHANGELOG entry.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-11-30 14:01:55 +01:00
Jerome Froelich 0cb0c4d911 Remove unused variable readOnly from filesystem_linux.go. (#1173)
The pull request #1002 changed the logic used on Linux servers to determine if a filesystem is
read-only. As a result of this change, the variable `readOnly` is now unused and can be removed.

Signed-off-by: Jerome Froelich <jeromefroelich@hotmail.com>
2018-11-30 14:01:39 +01:00
Ben Kochie becca1275c
Convert to Go modules (#1178)
* Convert to Go modules

* Update promu config.
* Convert to Go modules.
* Update vendoring.
* Update Makefile.common.
* Update circleci config.
* Use Prometheus release tar for promtool.
* Fixup unpack

* Use temp dir for unpacking tools.
* Use BSD compatible tar command.
* OpenBSD mkdir doesn't support `-v`.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-11-30 14:01:20 +01:00
Ben Kochie 1732478361
circleci: switch to 2.1 config
Signed-off-by: Ben Kochie <superq@gmail.com>
2018-11-29 12:06:34 +01:00
Andreas Wirooks 9c9e17aba7 Handle 'Unknown' as measurement value. (#1113)
We use the output-compatible perccli and storcli.py does not handle 'Unknown' as a result:
```
sg="Error parsing \"/var/lib/node_exporter/perccli.prom\": text format parsing error in line 222: expected float as value, got \"Unknown\"" source="textfile.go:212"
```
I know, the perccli should not return 'Unknown' but this error breaks all other useful measurements because the prom file is not parsable. My if condition fixes this.

Signed-off-by: Andreas Wirooks <andreas.wirooks@1und1.de>
2018-11-23 16:29:56 +01:00
ioriveur ea8e1373f7 Change Dfly's CPU counting frequency (#1140)
* Change Dfly's CPU counting frequency, see: https://github.com/prometheus/node_exporter/issues/1129

* Convert Dfly's CPU unit into second

Signed-off-by: iori-yja <fivo.11235813@gmail.com>
2018-11-21 13:45:22 +01:00
Ben Kochie ffefc8e74d Add a limit to the number of in-flight requests (#1166)
In order to avoid stuck collectors using up all system resources, add a
limit to the number of parallel in-flight scrape requests. This will
return a 503 error.

Default to 40 requests, this seems like a reasonable number based on:
* Two Prometheus servers scraping every 15 seconds.
* Failing scrapes after 5 minutes of stuckness.

Signed-off-by: Ben Kochie <superq@gmail.com>
2018-11-20 18:11:40 +01:00
Johannes 'fish' Ziemke bcec99e0aa Add link to prometheus-dcgm (#1164)
Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
2018-11-19 19:35:01 +01:00
Nemikolh 62f99f95f0 Add receive/transmit bytes total metric (wifi collector). (#1150)
Signed-off-by: Nemikolh <Nemikolh@users.noreply.github.com>
2018-11-19 19:15:54 +01:00
Matthias Loibl 0bcded8d2b
node-mixin: Update dashboards to v0.16
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
2018-11-19 17:40:30 +01:00
Matthias Loibl 61bc03adbe
node-mixin: Ignore jsonnetfile.lock.json and vendor folder
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
2018-11-19 16:56:05 +01:00
Matthias Loibl 53e4093b64
node-mixin: Update alerts to node_exporter v0.16
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
2018-11-19 16:46:51 +01:00
Matthias Loibl 619e23e5df
node-mixin: Update rules to node_exporter v0.16
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
2018-11-19 16:46:48 +01:00
Matthias Loibl 961aa67701
Append .rules to node_exporter.rules group name
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
2018-11-19 16:46:45 +01:00
Matthias Loibl 1482cc0309
Rename group names to node-exporter to avoid naming collisions
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
2018-11-19 16:46:41 +01:00
Matthias Loibl ff0a13d900
Fix multiline strings
Signed-off-by: Matthias Loibl <mail@matthiasloibl.com>
2018-11-19 16:46:27 +01:00
Tom Wilkie bd648827fe
Remove k8s from dashboard title, make gauges use datasource variable.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2018-11-19 16:46:25 +01:00
Tom Wilkie 642f67ffa1
Fix up some of the USE metrics.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2018-11-19 16:46:23 +01:00
Tom Wilkie c34275d6e5
Switch gauges to percentunit.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2018-11-19 16:46:22 +01:00
Tom Wilkie 417316b0e4
Switch to irate[1m] for node dashboard.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2018-11-19 16:46:20 +01:00
Tom Wilkie 9303cf78ff
Lower case binary operators and fix indentation.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2018-11-19 16:46:18 +01:00
Tom Wilkie bafe1707f1
Beginnings of a node-exporter monitoring mixin.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2018-11-19 16:46:10 +01:00
ioriveur 17fee8081f Check BSD's mib which accounts for swap size (#1149)
* Change Dfly's CPU counting frequency, see: https://github.com/prometheus/node_exporter/issues/1129

Signed-off-by: iori-yja <fivio.11235813@gmail.com>

* Convert Dfly's CPU unit into second

Signed-off-by: iori-yja <fivio.11235813@gmail.com>

* Check BSD's mib which accounts for swap size; see #1127

Signed-off-by: iori-yja <fivo.11235813@gmail.com>

* fix swap check code

Signed-off-by: iori-yja <fivo.11235813@gmail.com>
2018-11-17 11:02:54 +01:00
Paul Gier 3cf5b006fb examples/init.d: fix web.listen-address flag (#1157)
CLI flags use two dashes instead of one since v0.15.0
Also, use default port number
Fixes #1156

Signed-off-by: Paul Gier <pgier@redhat.com>
2018-11-16 00:50:09 +01:00
Ben Kochie ab19e0c831
Add changelog entry for #1148 (#1154)
Signed-off-by: Ben Kochie <superq@gmail.com>
2018-11-15 04:22:02 +01:00