NTP设置不正确,监控乱报警

这几天不停的收到报警,但一看服务器都是正常运行的,还是一步一步的排查问题吧,最终还是找到了NTP同步的服务器,时间差15S造成乱报警,之后,还是自己弄一个NTP服务吧。

建立一个NTP服务,红色的为修改部份:

vim /etc/ntp.conf

#允许你同步,但不能查询,不能修改,等等
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery

#允许本地回环线路,对NTP进行操作
restrict 127.0.0.1
restrict -6 ::1

#定义你的本地网络同步权限,不能修改,不能跟踪
restrict 172.16.3.0 mask 255.255.255.0 nomodify notrap

#设置同步的外部NTP,这里我使用的是FUDAN大学的,还是比较稳定的
server ntp.fudan.edu.cn

#下面的没用上,也没设置,全是默认的
#broadcast 192.168.1.255 key 42         # broadcast server
#broadcastclient                        # broadcast client
#broadcast 224.0.1.1 key 42             # multicast server
#multicastclient 224.0.1.1              # multicast client
#manycastserver 239.255.254.254         # manycast server
#manycastclient 239.255.254.254 key 42  # manycast client

# Undisciplined Local Clock. This is a fake driver intended for backup
# and when no outside source of synchronized time is available.
server  127.127.1.0     # local clock
fudge   127.127.1.0 stratum 10

# Drift file.  Put this in a directory which the daemon can write to.
# No symbolic links allowed, either, since the daemon updates the file
# by creating a temporary in the same directory and then rename()'ing
# it to the file.
driftfile /var/lib/ntp/drift

# Key file containing the keys and key identifiers used when operating
# with symmetric key cryptography.
keys /etc/ntp/keys

# Specify the key identifiers which are trusted.
#trustedkey 4 8 42

# Specify the key identifier to use with the ntpdc utility.
#requestkey 8

# Specify the key identifier to use with the ntpq utility.
#controlkey 8