aboutsummaryrefslogtreecommitdiff
path: root/collector/ntp.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>
* Use clearer usage string for `collector.ntp.server-is-local` optionAlex Nozdriukhin2020-04-18
| | | | | Signed-off-by: Alex Nozdriukhin <alex-nozzz@mail.ru> fixes #1662
* switch to go-kit/log (#1575)Ben Ye2019-12-31
| | | Signed-off-by: yeya24 <yb532204897@gmail.com>
* Update Makefile.common (#1220)Ben Kochie2019-01-04
| | | | | | | | | | | | | | * 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>
* Fix ntp collector thread safety (#1014)Ben Kochie2018-07-22
| | | | | | Make the ntp collector thread safe by wrapping a mutex lock around the leapMidnight variable. Signed-off-by: Ben Kochie <superq@gmail.com>
* Updated vendored ntp package (#681)Brett Vickers2017-10-04
| | | | | | The github.com/beevik/ntp package was recently updated with some API changes that broke node_exporter. This commit fetches the latest version of the ntp package and brings node_exporter in line with the latest API.
* 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 metrics from SNTPv4 packet to ntp collector & add ntpd sanity check (#655)Leonid Evdokimov2017-09-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add metrics from SNTPv4 packet to ntp collector & add ntpd sanity check 1. Checking local clock against remote NTP daemon is bad idea, local ntpd acting as a client should do it better and avoid excessive load on remote NTP server so the collector is refactored to query local NTP server. 2. Checking local clock against remote one does not check local ntpd itself. Local ntpd may be down or out of sync due to network issues, but clock will be OK. 3. Checking NTP server using sanity of it's response is tricky and depends on ntpd implementation, that's why common `node_ntp_sanity` variable is exported. * `govendor add golang.org/x/net/ipv4`, it is dependency of github.com/beevik/ntp * Update github.com/beevik/ntp to include boring SNTP fix * Use variable name from RFC5905 * ntp: move code to make export of raw metrics more explicit * Move NTP math to `github.com/beevik/ntp` * Make `golint` happy * Add some brief docs explaining `ntp` #655 and `timex` #664 modules * ntp: drop XXX comment that got its decision * ntp: add `_seconds` suffix to relevant metrics * Better `node_ntp_leap` comment * s/node_ntp_reftime/node_ntp_reference_timestamp_seconds/ as requested by @discordianfish * Extract subsystem name to const as suggested by @SuperQ
* Switch to kingpin flags (#639)Calle Pettersson2017-08-12
| | | | | | | | | | * Switch to kingpin flags * Fix logrus vendoring * Fix flags in main tests * Fix vendoring versions
* 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
|
* Convert remaining collectors to use ConstMetricsJohannes 'fish' Ziemke2017-01-03
|
* Limit node-exporter scope, deprecated collectorsJohannes 'fish' Ziemke2017-01-03
|
* Add NTP stratum to NTP collectorAnton Tolchanov2016-06-03
|
* Use the offset calculation that includes round trip time in the ntp collectorChris Batey2016-06-01
| | | | | | Previously the raw time difference was used which includes the network trip time between the node and the ntp server. This makes setting alerts off the value troublesome as it depends on the latency as well as the clock offset.
* Fix NTP server command line referenceChristian Svensson2016-02-20
| | | | --ntpServer is actually -collector.ntp.server
* Add missing argument to fmt.Errorf function in 'ntp' collectorPavel Borzenkov2015-11-13
| | | | Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
* Fix protocol version setting in NTP collector.Julius Volz2015-11-10
| | | | | | | The upstream library changed their interface - the global Version variable is gone: https://github.com/beevik/ntp/commit/283ed9d548825a1dae0994311560e8dbf8efac68
* Do not use flag before flag.Parse() was calledMikhail Salosin2015-11-06
|
* switch to github.com/prometheus/common/log for loggingNick Owens2015-10-30
|
* Add NTP protocol version flagMikhail Salosin2015-10-26
|
* Fix occurreneces of initial uppercase in error strings.Julius Volz2015-10-11
|
* Add license headers to all code files.Matthias Rampke2015-09-26
|
* 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
|
* Make collector-specific flags consistent with others.Julius Volz2015-02-18
| | | | | | This puts all collector-specific flags into their own namespace under "collector.<collector-name>", and moves from camel case to dashes, which is the standard in Prometheus land now.
* Reduce number of global variables usedTobias Schmidt2014-11-24
| | | | This is the first step to make the exporter more testable.
* Collect at every scrape, rather than at regular intervals.Brian Brazil2014-10-29
| | | | | | | | Switch to Update using the Collecter Collect interface, due to not knowing all metricnames in all modules beforehand we can't use Describe and thus the full Collecter interface. Remove 'updates', it's meaning varies by module and doesn't add much.
* Add NTP exporterJohannes 'fish' Ziemke2014-07-28
This exporter gets the time from a NTP server and exposes the offset between the remote and local system time.