node_exporter/collector
Leonid Evdokimov c169b4b1c5 Add metrics from SNTPv4 packet to ntp collector & add ntpd sanity check (#655)
* 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
2017-09-19 10:36:14 +02:00
..
fixtures cpu: Metric 'package_throttles_total' is per package. (#657) 2017-09-07 23:24:18 +02:00
ganglia Fix all open go lint and vet issues 2017-02-28 13:05:38 -04:00
arp_linux.go Add ARP collector for Linux (#540) 2017-04-11 17:45:19 +02:00
bcache_linux.go Add bcache collector (#597) 2017-07-07 07:20:18 +02:00
bonding_linux.go Handle nonexisting bonding_masters file (#569) 2017-04-24 23:19:17 +04:00
bonding_linux_test.go Rearrange fixtures to match "real" proc and sys. 2015-09-28 13:56:22 +00:00
buddyinfo.go Remove Windows support 2017-04-10 23:27:23 -03:00
collector.go Remove unnecessarily named return variables 2017-02-28 16:04:25 -04:00
conntrack_linux.go Remove unnecessarily named return variables 2017-02-28 16:04:25 -04:00
cpu_darwin.go cpu_darwin.go: s/cpu_ticks/cpuTicks/g 2017-05-14 13:51:42 +02:00
cpu_dragonfly.go golint: Fix NewStatCollector() doc string. 2017-05-14 13:51:47 +02:00
cpu_dragonfly_test.go Add test 2016-09-28 09:10:05 +02:00
cpu_freebsd.go golint: Fix NewStatCollector() doc string. 2017-05-14 13:51:47 +02:00
cpu_linux.go cpu: Metric 'package_throttles_total' is per package. (#657) 2017-09-07 23:24:18 +02:00
devstat_dragonfly.go golint: Fix comment on exported function NewDevstatCollector. 2017-05-14 13:21:39 +02:00
devstat_freebsd.c Add missing license headers 2017-01-05 06:18:34 +01:00
devstat_freebsd.go Remove unused devstatCollector struct member 'bytes_total'. 2017-05-14 19:51:53 +02:00
devstat_freebsd.h Add missing license headers 2017-01-05 06:18:34 +01:00
diskstats_darwin.go add diskstats on Darwin (#593) 2017-07-06 13:51:24 +02:00
diskstats_linux.go Switch to kingpin flags (#639) 2017-08-12 15:07:24 +02:00
diskstats_linux_test.go Calculate Linux disk bytes read/written based on sector size (512B) 2015-12-27 22:00:02 +11:00
drbd_linux.go Remove unnecessarily named return variables 2017-02-28 16:04:25 -04:00
edac_linux.go edac: Fix typo in csrow label of node_edac_csrow_uncorrectable_errors_total metric. 2017-04-18 12:45:06 +02:00
entropy_linux.go Remove unnecessarily named return variables 2017-02-28 16:04:25 -04:00
exec_bsd.go Fix metric name per review. 2017-04-21 16:25:31 -04:00
filefd_linux.go Fix scanner usage without error handling 2017-02-28 16:04:25 -04:00
filefd_linux_test.go Fix scanner usage without error handling 2017-02-28 16:04:25 -04:00
filesystem_bsd.go Fix lint issues on filesystem BSD implementation 2017-03-22 21:48:12 -03:00
filesystem_common.go Switch to kingpin flags (#639) 2017-08-12 15:07:24 +02:00
filesystem_freebsd.go Remove unnecessarily named return variables 2017-02-28 16:04:25 -04:00
filesystem_linux.go Fix export of stale device error metrics for unmounted filesystems 2017-03-22 21:48:18 -03:00
gmond.go Remove unnecessarily named return variables 2017-02-28 16:04:25 -04:00
helper.go Delete unused code 2017-02-28 17:20:16 -04:00
hwmon_linux.go Remove more unnecessarily named return values 2017-02-28 17:33:46 -04:00
infiniband_linux.go Multiply port data XMIT/RCV metrics by 4 (#579) 2017-05-12 07:28:53 +02:00
infiniband_linux_test.go Fix all open go lint and vet issues 2017-02-28 13:05:38 -04:00
interrupts_common.go Fix all open go lint and vet issues 2017-02-28 13:05:38 -04:00
interrupts_linux.go Fix scanner usage without error handling 2017-02-28 16:04:25 -04:00
interrupts_linux_test.go Rearrange fixtures to match "real" proc and sys. 2015-09-28 13:56:22 +00:00
interrupts_openbsd.go Convert remaining collectors to use ConstMetrics 2017-01-03 14:11:10 +01:00
ipvs_linux.go Enable IPVS collector by default (#623) 2017-07-26 15:20:28 +02:00
ipvs_linux_test.go Switch to kingpin flags (#639) 2017-08-12 15:07:24 +02:00
ksmd_linux.go Remove unnecessarily named return variables 2017-02-28 16:04:25 -04:00
loadavg.go Fix build tags of loadavg collector 2017-07-20 15:13:58 -04:00
loadavg_freebsd.go Fix build tags of loadavg collector 2017-07-20 15:13:58 -04:00
loadavg_linux.go collector: support 1,5,15m load averages for all unices 2015-10-31 06:04:24 -07:00
loadavg_linux_test.go Add load5 and load15 to linux load metric 2015-10-17 13:07:39 +00:00
loadavg_solaris.go Fix build tags of loadavg collector 2017-07-20 15:13:58 -04:00
loadavg_unix.go Explicitly check for the rc 3 in call to getloadavg(). Reorder logic. 2017-05-14 13:07:54 +02:00
logind_linux.go Fix all open go lint and vet issues 2017-02-28 13:05:38 -04:00
logind_linux_test.go Fix all open go lint and vet issues 2017-02-28 13:05:38 -04:00
mdadm_linux.go Change raid0 status line regexp for mdadm collector (#619) 2017-07-20 17:04:33 +02:00
mdadm_linux_test.go Change raid0 status line regexp for mdadm collector (#619) 2017-07-20 17:04:33 +02:00
megacli.go Switch to kingpin flags (#639) 2017-08-12 15:07:24 +02:00
megacli_test.go Switch to kingpin flags (#639) 2017-08-12 15:07:24 +02:00
meminfo.go Fix build tags of meminfo collector 2017-07-20 14:37:10 -04:00
meminfo_bsd.go Add exec_boot_time for freebsd, dragonfly 2017-04-21 10:23:19 -04:00
meminfo_darwin.go Add meminfo stats for Darwin 2017-01-03 11:22:46 +01:00
meminfo_linux.go Fix scanner usage without error handling 2017-02-28 16:04:25 -04:00
meminfo_linux_test.go Rearrange fixtures to match "real" proc and sys. 2015-09-28 13:56:22 +00:00
meminfo_numa_linux.go Remove unnecessarily named return variables 2017-02-28 16:04:25 -04:00
meminfo_numa_linux_test.go Add Linux NUMA "numastat" metrics (#249) 2016-10-12 13:07:49 +02:00
mountstats_linux.go Fix gofmt -s and spelling issues 2017-02-28 14:01:28 -04:00
netdev_bsd.go Compile netdev on dragonfly (#314) 2016-09-27 21:44:13 +01:00
netdev_bsd_test.go Compile netdev on dragonfly (#314) 2016-09-27 21:44:13 +01:00
netdev_common.go Switch to kingpin flags (#639) 2017-08-12 15:07:24 +02:00
netdev_darwin.go Add netdev collector for darwin 2016-12-29 19:17:15 +01:00
netdev_linux.go Remove unnecessary conversions 2017-02-28 13:57:49 -04:00
netdev_linux_test.go Simplify code 2017-02-28 13:54:27 -04:00
netdev_openbsd.go Do a make format run. 2015-12-18 14:08:52 +00:00
netstat_linux.go Add parsing /proc/net/snmp6 file for netstat-linux (#615) 2017-07-08 20:16:35 +02:00
netstat_linux_test.go Add parsing /proc/net/snmp6 file for netstat-linux (#615) 2017-07-08 20:16:35 +02:00
nfs_linux.go Remove unnecessarily named return variables 2017-02-28 16:04:25 -04:00
ntp.go Add metrics from SNTPv4 packet to ntp collector & add ntpd sanity check (#655) 2017-09-19 10:36:14 +02:00
paths.go Switch to kingpin flags (#639) 2017-08-12 15:07:24 +02:00
paths_test.go Switch to kingpin flags (#639) 2017-08-12 15:07:24 +02:00
qdisc_linux.go Switch to kingpin flags (#639) 2017-08-12 15:07:24 +02:00
runit.go Switch to kingpin flags (#639) 2017-08-12 15:07:24 +02:00
sockstat_linux.go Remove unnecessarily named return variables 2017-02-28 16:04:25 -04:00
sockstat_linux_test.go Add parsing /proc/net/snmp6 file for netstat-linux (#615) 2017-07-08 20:16:35 +02:00
stat_linux.go Move stat_linux to cpu_linux and add cpufreq stats (#548) 2017-06-13 11:21:53 +02:00
supervisord.go Switch to kingpin flags (#639) 2017-08-12 15:07:24 +02:00
sysctl_bsd.go sysctl_bsd.go: golint fixes. Typo fix. 2017-05-14 12:51:57 +02:00
systemd_linux.go Switch to kingpin flags (#639) 2017-08-12 15:07:24 +02:00
systemd_linux_test.go Fix gofmt -s and spelling issues 2017-02-28 14:01:28 -04:00
tcpstat_linux.go Fix NewTCPStatCollector doc string. 2017-05-14 13:23:57 +02:00
tcpstat_linux_test.go Fix all open go lint and vet issues 2017-02-28 13:05:38 -04:00
textfile.go Switch to kingpin flags (#639) 2017-08-12 15:07:24 +02:00
textfile_test.go Switch to kingpin flags (#639) 2017-08-12 15:07:24 +02:00
time.go Get full resolution for node_time (#555) 2017-04-19 18:31:21 +01:00
uname_linux.go Fix uname collector for arm/ppc64/ppc64le architectures 2015-10-03 16:17:15 -04:00
uname_linux_int8.go uname_linux: Build for 32bit MIPS too 2017-04-20 13:30:40 +02:00
uname_linux_uint8.go add s390x support 2016-08-24 08:06:04 -04:00
vmstat_linux.go Remove unnecessarily named return variables 2017-02-28 16:04:25 -04:00
wifi_linux.go Ignore wifi collector permission errors (#646) 2017-08-18 10:19:48 +02:00
xfs_linux.go Add XFS block mapping and block map B-tree stats (#575) 2017-07-07 07:27:52 +02:00
zfs.go Use int64 throughout the ZFS collector. 2017-08-21 16:40:16 +00:00
zfs_linux.go Use int64 throughout the ZFS collector. 2017-08-21 16:40:16 +00:00
zfs_linux_test.go Use int64 throughout the ZFS collector. 2017-08-21 16:40:16 +00:00