Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

zephyr: Write out unix timestamp in check, as check_cron_file expects.

Alex Vandiver120de1dca902
diff --git a/puppet/zulip_ops/files/nagios_plugins/zulip_zephyr_mirror/check_user_zephyr_mirror_liveness b/puppet/zulip_ops/files/nagios_plugins/zulip_zephyr_mirror/check_user_zephyr_mirror_liveness
index df81332774e..7cb50392d6f 100755
--- a/puppet/zulip_ops/files/nagios_plugins/zulip_zephyr_mirror/check_user_zephyr_mirror_liveness
+++ b/puppet/zulip_ops/files/nagios_plugins/zulip_zephyr_mirror/check_user_zephyr_mirror_liveness
@@ -51,7 +51,7 @@ def report(state: str, short_msg: str, too_old: AbstractSet[Any] = set()) -> Non
)
with open(state_file_path + ".tmp", "w") as f:
- f.write(f"{now}|{states[state]}|{state}|{short_msg}{too_old_data}")
+ f.write(f"{int(now.timestamp())}|{states[state]}|{state}|{short_msg}{too_old_data}")
os.rename(state_file_path + ".tmp", state_file_path)
print(f"{state}: {short_msg}{too_old_data}")
exit(states[state])