default verify_ntp_servers to true and/or nagios warning for Not Sychronized
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NTP Charm |
Invalid
|
Undecided
|
Unassigned |
Bug Description
We should default to a setup that will alert in some way that the setup is not working.
1. Deploy ntp charm with invalid ntp servers
2. Note: Juju / Nagios say everything is great
Setting verify_
Setup:
juju deploy ubuntu --series xenial u16
juju deploy ubuntu --series bionic u18
juju deploy ubuntu --series focal u20 --force
juju deploy cs:ntp
juju add-relation ntp u16
juju add-relation ntp u18
juju add-relation ntp u20
juju config ntp pools=""
juju config ntp source="1.1.1.1" #Something that doesn't work
Juju status show everything is awesome:
...
Unit Workload Agent Machine Public address Ports Message
u16/0* active idle 0 10.5.0.4 ready
ntp/0* active idle 10.5.0.4 123/udp ntp: Ready
u18/0* active idle 1 10.5.0.31 ready
ntp/1 active idle 10.5.0.31 123/udp chrony: Ready
u20/0* active idle 2 10.5.0.7 ready
ntp/2 active idle 10.5.0.7 123/udp chrony: Ready
If you go ahead and set juju config ntp verify_
They all report NTP servers are not reachable: 1.1.1.1. Instead of that option it looks we just need to expose the following commands:
Apparently commands from comment#1 mostly show it's failing.:
juju run --all -- /opt/ntpmon-
- MachineId: "0" Stdout: | OK: reachability is nan% | frequency= offset=nan peers=0 reach=nan result=0 rootdelay= rootdisp= runtime= stratum= sync=0.000000 sysjitter= sysoffset= tracehosts= traceloops= tracetime=
- MachineId: "1" ReturnCode: 2 Stdout: | CRITICAL: reachability is too low (0.00%) - must be greater than 50.00% | frequency= offset=nan peers=1 reach=0.000000 result=2 rootdelay= rootdisp= runtime= stratum= sync=0.000000 sysjitter= sysoffset= tracehosts= traceloops= tracetime=
- MachineId: "2" ReturnCode: 2 Stdout: | CRITICAL: reachability is too low (0.00%) - must be greater than 50.00% | frequency= offset=nan peers=1 reach=0.000000 result=2 rootdelay= rootdisp= runtime= stratum= sync=0.000000 sysjitter= sysoffset= tracehosts= traceloops= tracetime=
- MachineId: "0" ReturnCode: 2 Stdout: | CRITICAL: No sync peer selected | frequency= offset=nan peers=0 reach=nan result=2 rootdelay= rootdisp= runtime= stratum= sync=0.000000 sysjitter= sysoffset= tracehosts= traceloops= tracetime=
- MachineId: "1" ReturnCode: 2 Stdout: | CRITICAL: No sync peer selected | frequency= offset=nan peers=1 reach=0.000000 result=2 rootdelay= rootdisp= runtime= stratum= sync=0.000000 sysjitter= sysoffset= tracehosts= traceloops= tracetime=
- MachineId: "2" ReturnCode: 2 Stdout: | CRITICAL: No sync peer selected | frequency= offset=nan peers=1 reach=0.000000 result=2 rootdelay= rootdisp= runtime= stratum= sync=0.000000 sysjitter= sysoffset= tracehosts= traceloops= tracetime=
tags: | added: sts |
tags: |
added: seg removed: sts |
tags: | added: sts |
Changed in ntp-charm: | |
status: | New → Invalid |
Can you please provide information regarding the 'chronyc sources' or 'ntpq -p' output from the environment where you're seeing this issue. It appears that the validate_reach function is enabled by default.
Also please provide the output of: ntp-charm/ check_ntpmon. py --check reach ntp-charm/ check_ntpmon. py --check sync
/opt/ntpmon-
/opt/ntpmon-