chrony_status: fix reboot-workaround, value is str not int

After reboot stratum is 0, convert it to U. Include unknown_limit to
config to not send warning email.

I finally found a server where this workaround was needed.
This commit is contained in:
Kim B. Heino 2023-12-12 23:21:29 +02:00
parent e77bb30d37
commit 24f0fee044
1 changed files with 1 additions and 1 deletions

View File

@ -177,7 +177,7 @@ def fetch():
values = get_values()
for graph in GRAPHS:
print('multigraph chrony_{}'.format(graph))
if graph == 'stratum' and values[graph] == 0:
if graph == 'stratum' and values[graph] == '0':
print('{}.value U'.format(graph))
elif graph == 'serverstats':
for stat in SERVERSTATS: