node_exporter/collector
Sami Kerola 3762191e66 Add timex collector (#664)
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
2017-09-19 07:54:06 -07: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
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
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
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
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
loadavg_linux_test.go
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
meminfo_numa_linux.go Remove unnecessarily named return variables 2017-02-28 16:04:25 -04:00
meminfo_numa_linux_test.go
mountstats_linux.go Fix gofmt -s and spelling issues 2017-02-28 14:01:28 -04:00
netdev_bsd.go
netdev_bsd_test.go
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
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
timex.go Add timex collector (#664) 2017-09-19 07:54:06 -07:00
uname_linux.go
uname_linux_int8.go uname_linux: Build for 32bit MIPS too 2017-04-20 13:30:40 +02:00
uname_linux_uint8.go
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