aboutsummaryrefslogtreecommitdiff
path: root/collector/systemd_linux.go
Commit message (Collapse)AuthorAge
* Use Go 1.13 error featuresBen Kochie2020-06-16
| | | | | | | * Use `errors.Is()` for unwrapping errors. * Use `%w` error verb in internal error formatting. Signed-off-by: Ben Kochie <superq@gmail.com>
* Improve filter flag names.Ben Kochie2020-06-12
| | | | | | | | | | | | | | | Update netdev and systemd collectors to deprecate poorly chosen flag names. Old flag names to be removed in 2.0.0. https://github.com/prometheus/node_exporter/issues/1742 Add log messages for parsed flag values to help discover quoting isuses in supervisors. https://github.com/prometheus/node_exporter/issues/1737 Signed-off-by: Ben Kochie <superq@gmail.com>
* collector/systemd: use regexp to extract systemd version (#1647)Paweł Krupa2020-03-27
| | | Signed-off-by: paulfantom <pawel@krupa.net.pl>
* systemd: Clarify private flag description (#1587)Johannes 'fish' Ziemke2020-02-15
| | | | | | | This requires root, so it shouldn't be used. This closes #1246 Signed-off-by: Johannes 'fish' Ziemke <github@freigeist.org>
* switch to go-kit/log (#1575)Ben Ye2019-12-31
| | | Signed-off-by: yeya24 <yb532204897@gmail.com>
* systemd: check version for availability of properties (#1413)Paul Gier2019-09-04
| | | | | | | | | | | | | The dbus property 'SystemState' and the timer property 'LastTriggerUSec' were added in version 212 of systemd. Check that the version of systemd is higher than 212 before attempting to query these properties https://github.com/systemd/systemd/commit/f755e3b74b94296a534033dd6ae04d9506434210 https://github.com/systemd/systemd/commit/dedabea4b3d61a87cedb5c8d7ccce5b86ea84afe Resolves issue #291 Signed-off-by: Paul Gier <pgier@redhat.com>
* Fix systemd restart counter label from state to name (#1393)mknapphrt2019-06-25
| | | Signed-off-by: Mark Knapp <mknapp@hudson-trading.com>
* Update systemd blacklist (#1255)Ben Kochie2019-02-17
| | | | | | Include additional unit types in the default systemd collector blacklist. Signed-off-by: Ben Kochie <superq@gmail.com>
* Systemd refactor (#1254)Paul Gier2019-02-11
| | | | | | | | | | This reduces the system metric collection time by using a wait group and go routines to allow the systemd metric calls happen concurrently. Also, makes the start time, restarts, tasks_max, and tasks_current metrics disabled by default because these can be time consuming to gather. Signed-off-by: Paul Gier <pgier@redhat.com>
* collector/systemd: add new label "type" for systemd_unit_state (#1229)Paul Gier2019-01-29
| | | | | | | | | | 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>
* [systemd] collect taskCurrent, tasksMax per systemd unit (#1098)Arno Uhlig2018-11-14
| | | | | | * [systemd] collect taskCurrent, tasksMax per systemd unit Signed-off-by: Arno Uhlig <arno.uhlig@sap.com>
* Change systemd unit filtering (#1083)Ben Kochie2018-09-24
| | | | | | | | | | | * Change systemd unit filtering Get all units from systemd and filter in Go. * Improves compatibility with older versions of systemd. * Improve debugging by printing when units pass the filter. * Remove extraneous newlines from log messages. Signed-off-by: Ben Kochie <superq@gmail.com>
* NRestarts or NRefused aren't available on older systemd versions (#1039)James Hartig2018-08-14
| | | | | | * If NRestarts or NRefused are not available, don't ignore the unit itself * Don't report systemd metrics (NRestarts/NRefused) that are not available Signed-off-by: James Hartig <james@getadmiral.com>
* systemd: Remove unneeded/unhandled error returns (#1035)Julius Volz2018-08-05
| | | Signed-off-by: Julius Volz <julius.volz@gmail.com>
* Filter out uninstalled systemd units when collecting all units (#1011)xginn82018-07-22
| | | | | fixes #567 Signed-off-by: Matthew McGinn <mamcgi@gmail.com>
* Add systemd uptime metric collection (#952)Sven Lange2018-07-18
| | | | | * Add systemd uptime metric collection Signed-off-by: Sven Lange <tdl@hadiko.de>
* Add a counter for refused socket unit connections, available as of systemd ↵xginn82018-07-16
| | | | | 239 (#995) Signed-off-by: xginn8 <mamcgi@gmail.com>
* Adding socket stat collection for systemd socket units (#968)xginn82018-07-05
| | | Signed-off-by: xginn8 <mamcgi@gmail.com>
* Add support for NRestarts counter introduced in systemd 235 (#992)xginn82018-07-05
| | | | | | | | * 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>
* Only use one dbus connection, required some refactoring.Tom Wilkie2018-01-31
|
* Export systemd timer last trigger sec.Tom Wilkie2018-01-31
|
* Add summary metrics for systemd exporter (#765)Sevag Hanssian2018-01-04
|
* Replace --collectors.enabled with per-collector flags (#640)Calle Pettersson2017-09-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move NodeCollector into package collector * Refactor collector enabling * Update README with new collector enabled flags * Fix out-of-date inline flag reference syntax * Use new flags in end-to-end tests * Add flag to disable all default collectors * Track if a flag has been set explicitly * Add --collectors.disable-defaults to README * Revert disable-defaults flag * Shorten flags * Fixup timex collector registration * Fix end-to-end tests * Change procfs and sysfs path flags * Fix review comments
* Switch to kingpin flags (#639)Calle Pettersson2017-08-12
| | | | | | | | | | * Switch to kingpin flags * Fix logrus vendoring * Fix flags in main tests * Fix vendoring versions
* Blacklist systemd scope unitsBen Kochie2017-03-23
| | | | | | | | | Blacklist `scope` units from systemd collector by default. These units are created with unique IDs programatically[0]. This leads to huge cardinality problems. [0]: https://www.freedesktop.org/software/systemd/man/systemd.scope.html
* Remove unnecessarily named return variablesTobias Schmidt2017-02-28
| | | | | | Named return variables should only be used to describe the returned type further, e.g. `err error` doesn't add any new information and is just stutter.
* Fix all open go lint and vet issuesTobias Schmidt2017-02-28
|
* Add white/blacklisting of units for systemd collectorCalle Pettersson2016-08-20
|
* systemd-collector: support private/direct connections without dbusChristoph Hack2016-03-29
|
* collector: systemd: collect whether the system is operationalRémi Audebert2015-12-19
|
* collector: add systemdRémi Audebert2015-12-19