aboutsummaryrefslogtreecommitdiff
path: root/node_exporter.go
Commit message (Collapse)AuthorAge
* Add basic authentication (#1683)Julien Pivotto2020-05-01
| | | | | * Add basic authentication Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
* Release 1.0.0-rc.0 (#1614)v1.0.0-rc.0Ben Kochie2020-02-20
| | | | | | | Update CHANGELOG/VERSION for 1.0.0-rc.0 release. * Add a note about new https settings to top-level README. * Mark --web.config flag as experimental. Signed-off-by: Ben Kochie <superq@gmail.com>
* new flag to disable all default collectors (#1460)Paul Gier2020-02-20
| | | | | | | | * new flag to disable all default collectors Signed-off-by: Paul Gier <pgier@redhat.com> Co-authored-by: Ben Kochie <superq@gmail.com>
* switch to go-kit/log (#1575)Ben Ye2019-12-31
| | | Signed-off-by: yeya24 <yb532204897@gmail.com>
* Adding TLS to node exporter - cleaner version (#1277)ksherryBAE2019-11-16
| | | | | | | | | Add support for https connections. Signed-off-by: ksherryBAE <kieran.sherry@baesystems.com> Signed-off-by: James Ritchie <james.g.ritchie@baesystems.com> Signed-off-by: Simon Pasquier <spasquie@redhat.com> Signed-off-by: Ben RIdley <benridley29@gmail.com>
* Report non-fatal collection errors in the exporter metric. (#1439)Matthias Rampke2019-07-28
| | | | | | | | | | As per prometheus/client_golang#543, pass the Registry for exporter metrics when setting up the /metrics HTTP handler. With this, the `promhttp_metric_handler_errors_total` metric will increment on (possibly non-fatal) collection-time errors, such as duplicate metrics from text files. Signed-off-by: Matthias Rampke <mr@soundcloud.com>
* Add a limit to the number of in-flight requests (#1166)Ben Kochie2018-11-20
| | | | | | | | | | | 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>
* Add --web.disable-exporter-metrics flagbeorn72018-11-13
| | | | | | | | | | | | | | If this flag is set, the metrics about the exporter itself (go_*, process_*, promhttp_*) will be excluded from /metrics. The Kingpin way of handling boolean flags makes the negative flag wording (_dis_able) the most reasonably one. This also refactors the flow in node_exporter.go quite a bit to avoid mixing up the global and a local registry and to avoid re-creating a registry even if no filtering is requested. Signed-off-by: beorn7 <beorn@soundcloud.com>
* Sort collector names in startup logs (#857)Brian Brazil2018-03-29
| | | Signed-off-by: Brian Brazil <brian.brazil@robustperception.io>
* Remove deprecated prometheus.InstrumentHandlerFunc (#831)Ben Kochie2018-02-19
| | | | Update Prometheus client golang use to use `promhttp.Handler()` instead of `prometheus.InstrumentHandlerFunc()`.
* Add `collect[]` parameter (#699)Siavash Safi2017-10-14
| | | | | | | | | | | | | | | | | | * Add `collect[]` parameter * Add TODo comment about staticcheck ignored * Restore promhttp.HandlerOpts * Log a warning and return HTTP error instead of failing * Check collector existence and status, cleanups * Fix warnings and error messages * Don't panic, return error if collector registration failed * Update README
* 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
* Add timex collector (#664)Sami Kerola2017-09-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This collector is based on adjtimex(2) system call. The collector returns three values, status if time is synchronised, offset to remote reference, and local clock frequency adjustment. Values are taken from kernel time keeping data structures to avoid getting involved how the synchronisation is implemented. By that I mean one should not care if time is update using ntpd, systemd.timesyncd, ptpd, and so on. Since all time sync implementation will always end up telling to kernel what is the status with time one can simply omit the software in between, and look results of the syncing. As a positive side effect this makes collector very quick and conceptually specific, this does not monitor availability of NTP server, or network in between, or dns resolution, and other unrelated but necessary things. Minimum set of values to keep eye on are the following three: The node_timex_sync_status tells if local clock is in sync with a remote clock. Value is set to zero when synchronisation to a reliable server is lost, or a time sync software is misconfigured. The node_timex_offset_seconds tells how much local clock is off when compared to reference. In case of multiple time references this value is outcome of RFC 5905 adjustment algorithm. Ideally offset should be close to zero, and it depends about use case how large value is acceptable. For example a typical web server is probably fine if offset is about 0.1 or less, but that would not be good enough for mobile phone base station operator. The node_timex_freq tells amount of adjustment to local clock tick frequency. For example if offset is one second and growing the local clock will need instruction to tick quicker. Number value itself is not very important, and occasional small adjustments are fine. When frequency is unusually in stable one can assume quality of time stamps will not be accurate to very far in sub second range. Obviously explaining why local clock frequency behaves like a passenger in roller coaster is different matter. Explanations can vary from system load, to environmental issues such as a machine being physically too hot. Rest of the measurements can help when debugging. If you run a clock server do probably want to collect and keep track of everything. Pull-request: https://github.com/prometheus/node_exporter/pull/664
* Switch to kingpin flags (#639)Calle Pettersson2017-08-12
| | | | | | | | | | * Switch to kingpin flags * Fix logrus vendoring * Fix flags in main tests * Fix vendoring versions
* Enable IPVS collector by default (#623)Ben Kochie2017-07-26
| | | | | | * Silence error output when no IPVS present. * Enable by default. * Update end-to-end fixture. * Update README.
* Add bcache collector (#597)ideaship2017-07-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add bcache collector for Linux This collector gathers metrics related to the Linux block cache (bcache) from sysfs. * Removed commented out code * Use project comment style * Add _sectors to metric name to indicate unit * Really use project comment style * Rename bcache.go to bcache_linux.go * Keep collector namespace clean Rename: - metric -> bcacheMetric - periodStatsToMetrics -> bcachePeriodStatsToMetric * Shorten slice initialization * Change label names to backing_device, cache_device * Remove five minute metrics (keep only total) * Include units in additional metric names * Enable bcache collector by default * Provide metrics in seconds, not nanoseconds * remove metrics with label "all" * Add fixtures, update end-to-end for bcache collector * Move fixtures/sys into tar.gz This changeset moves the collector/fixtures/sys directory into collector/fixtures/sys.tar.gz and tweaks the Makefile to unpack the tarball before tests are run. The reason for this change is that Windows does not allow colons in a path (colons are present in some of the bcache fixture files), nor can it (out of the box) deal with pathnames longer than 260 characters (which we would be increasingly likely to hit if we tried to replace colons with longer codes that are guaranteed not the turn up in regular file names). * Add ttar: plain text archive, replacement for tar This changeset adds ttar, a plain text replacement for tar, and uses it for the sysfs fixture archive. The syntax is loosely based on tar(1). Using a plain text archive makes it possible to review changes without downloading and extracting the archive. Also, when working on the repo, git diff and git log become useful again, allowing a committer to verify and track changes over time. The code is written in bash, because bash is available out of the box on all major flavors of Linux and on macOS. The feature set used is restricted to bash version 3.2 because that is what Apple is still shipping. The programm also works on Windows if bash is installed. Obviously, it does not solve the Windows limitations (path length limited to 260 characters, no symbolic links) that prompted the move to an archive format in the first place.
* Initial XFS collectorMatt Layher2017-04-22
|
* Add ARP collector for Linux (#540)Sam Kottler2017-04-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement commonalities and linux support for ARP collection * Add ARP collector to fixtures and run as part of e2e tests * Bubble up scanner errors * Use single return values where it makes sense * Add missing annotation * Move arp_common into arp_linux * Add license header to arp_linux.go * Address initial feedback * Use strings.Fields instead of strings.Split * Deal with scanner.Err() rather than throwing away errors * Check for scan errors in-line before interacting with the entries map * Don't interact with potentially empty text from scan * Check for scan errors outside the scan loop * Add comment about moving procfs parsing * Add more direct comment * Update initialism style to match go style guide * Put function args on the same line * Add TODO in front of comment about procfs extraction * Guard against strings.Fields returning an empty slice * Be more defensive about ARP table format and use upcase more broadly * Enable the ARP collector by default * Add ARP collector to the README * Remove 'entry'
* Report collector success/failure and duration per scrape. (#516)Brian Brazil2017-03-16
| | | | This is in line with best practices, and also saves us 63 timeseries on a default Linux setup.
* Continue scrape with duplicated metricsTobias Schmidt2017-03-14
| | | | | | Problems of a single collector, like duplicated metrics read via the textfile collector, should not fail the collection and export of other metrics.
* Add BSD exec statistics collector (#457)Derek Marcotte2017-02-28
| | | | | | | | | | * First pass of a sysctl_bsd source, exec_bsd + exec metrics * Incorportate PR feedback, including removing pre-build descriptions, unit conversion callback. * Remove redundant cached_description field, per PR feedback * Incorporate PR feedback
* Fix all open go lint and vet issuesTobias Schmidt2017-02-28
|
* Enable InfiniBand by defaultRobert Clark2017-02-07
| | | | Signed-Off-By: Robert Clark <robert.d.clark@hpe.com>
* Add wifi collector to default collectors (#447)Matt Layher2017-02-04
|
* Add collector for Linux EDACBen Kochie2017-01-10
| | | | | | | | Collect "Error detection and correction" metrics from memory controllers. * Supported on Linux only. * Add basic fixtures. * Enabled by default.
* Enable ZFS exporter by default and update README.Christian Schwarz2017-01-08
|
* Use promhttp and setup loggerJohannes 'fish' Ziemke2017-01-05
|
* Add hwmon /sensors support (#278)Rene Treffer2016-10-06
| | | | | | | | | | | | | | | | | | | | * Add hwmon support (mainly known from lm-sensors) This commit adds initial support for linux hardware sensors, exported through sysfs. Details of the interface can be found at https://www.kernel.org/doc/Documentation/hwmon/sysfs-interface * Add end-to-end test with some real life data * Cleanup comments on hwmon collector * Drop raw sensor name from hwmon output * Let the sensor label be "sensor" * Add hwmon short description to README.
* Make version informations consistent between prometheus componentsSteve Durrheimer2016-05-04
| | | | This also fixes #231 by adding the '-version' flag
* Add FreeBSD 'cpu' exporter to default collectors.Christian Schwarz2016-02-18
| | | | As of `1fc84e2fb69ee3d1f063399b00a6284fc8e27cb8` it does not require root anymore.
* Remove unused flag -debug.memprofile-fileTobias Schmidt2016-02-04
| | | | | | | The option to write out a memory profile to file was removed in a730cff. Declaring flags as local variable does not only result in cleaner, more testable code, but also ensures that the program won't compile anymore when unused flags are left in place.
* Introduce entropy collector for LinuxRichard Hartmann2016-01-13
|
* Add vmstat collector, enabled per defaultFlorian Koch2016-01-11
|
* Build cleanly under windows.Caskey L. Dickson2016-01-07
| | | | | | | Removes unused signal handlers left over from signal based collection and block the non windows-relevant collectors loadavg and interrupts. Signal based collection removed in 1c17481a4289a81b70e482fcf1d4a432da87c5de.
* Add build_info metric similar to the one of Prometheus itselfDaniel Bechler2016-01-06
|
* Add linux conntrack collector.Brian Brazil2015-12-20
|
* Filter list of collectors enabled by defaultPavel Borzenkov2015-11-13
| | | | | | | | | | | | | | Enabled by default collectors are chosen for Linux, which supports all of the implemented collectors. But for other OSes (OS X, for example) this list is not suitable, because they lack most of those collectors. Because of that, it is not possible to run node_exporter with default options on such OSes. Fix this by filtering list of enabled by default collectors based on their availability for current platform. Closes #149 Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
* Closes #100 by removing support for HTTP basic authTravis Truman2015-11-05
|
* switch to github.com/prometheus/common/log for loggingNick Owens2015-10-30
|
* Clean up lint errorsTobias Schmidt2015-10-16
|
* Add license headers to all code files.Matthias Rampke2015-09-26
|
* Add collector for metrics of linux software raidsJonas Große Sundrup2015-09-11
|
* Add Linux uname collector.Julius Volz2015-09-11
| | | | | | This creates a single metric like: node_uname_info{domainname="(none)",machine="x86_64",nodename="desktop",release="3.16.0-48-generic",sysname="Linux",version="#64~14.04.1-Ubuntu SMP Thu Aug 20 23:03:57 UTC 2015"} 1
* Initial implementation of file-nrKen Herner2015-09-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed file-nr update function Fixed file-nr test case Fixed file-nr test case again Fixed file-nr separator to tab Updated file-nr to filenr. Updated file-nr to filenr. Fixed file-nr test cases, added comments Remove reporting the second value from file-nr as it will alwasy be zero in linux 2.6 and greator Renaming file-nr to filefd Updated build constraint Updates and code cleanup for filefd. Updated enabledCollectors with the correct name for filefd Fixed filefd test wording
* Added sockstat test fileKen Herner2015-09-09
| | | | | | | | | | | | | | | | | | | | initial work on sockstat work Fixed package name Finished implementation of the sockstat plugin missed a return value Added sockstat to default plugins to start Fixed scanner read on sockstat fixed sockstat linux test for TCP alloc update sockstat test case Updated sockstat to return TCP and UDP memory in bytes instead of page count
* Make logging of collector executions less verbose.Julius Volz2015-06-22
| | | | This fixes https://github.com/prometheus/node_exporter/issues/86
* Switch logging from glog to github.com/prometheus/log.Julius Volz2015-05-28
|
* Use flags instead of config and remove attributesJohannes 'fish' Ziemke2015-05-21
|
* Sort collector names.Matthias Rampke2015-05-12
| | | | This makes the `-collectors.print` output easier to read.
* Log version at startupTobias Schmidt2015-04-16
|