chrony does not log anything on my ec2 instance
I just verified chrony logging by doing the following:
- created a default Ubuntu 18.04 LTS EC2 instance - AMI id: ubuntu/images/hvm-ssd/ubuntu-bionic-18.04-amd64-server-20180912 (ami-07a3bd4944eb120a0)
- installed chrony:
sudo apt install chrony
- edited the default configuration in
/etc/chrony/chronyd.conf
to- add the AWS NTP source shown in your configuration above
- uncomment the
log tracking ...
line
- restarted chrony:
sudo service chrony restart
- confirmed that logging is working:
root@ip-172-31-1-97:~# ls -la /var/log/chrony/ total 32 drwxr-xr-x 2 _chrony _chrony 4096 Mar 7 22:20 . drwxrwxr-x 10 root syslog 4096 Mar 7 22:19 .. -rw-r--r-- 1 _chrony _chrony 10686 Mar 7 22:22 measurements.log -rw-r--r-- 1 _chrony _chrony 4797 Mar 7 22:22 statistics.log -rw-r--r-- 1 _chrony _chrony 1854 Mar 7 22:21 tracking.log
- Confirmed that chrony is contacting its sources:
root@ip-172-31-1-97:~# chronyc -n sources 210 Number of sources = 9 MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^* 169.254.169.123 3 6 377 48 +16us[ +46us] +/- 300us ^- 91.189.94.4 2 7 241 103 +934us[ +957us] +/- 161ms ^- 91.189.91.157 2 6 35 39 +2471us[+2471us] +/- 153ms ^- 91.189.89.199 2 7 41 167 +1194us[+1203us] +/- 169ms ^? 2001:67c:1560:8003::c8 0 6 0 - +0ns[ +0ns] +/- 0ns ^- 129.250.35.250 2 6 377 49 +914us[ +944us] +/- 93ms ^- 61.68.38.238 3 6 377 49 -1395us[-1366us] +/- 59ms ^- 203.23.237.200 2 6 377 48 +2176us[+2176us] +/- 41ms ^- 150.101.217.196 2 6 377 48 -5039us[-5009us] +/- 76ms
So, my best guesses at the differences between your test and mine are:
You've used a non-official Ubuntu 18.04 AMI
You've used a non-official chrony package instead of just installing the one from the Ubuntu archives
You've forgotten to restart chrony after changing the configuration