changing default output message
This commit is contained in:
parent
cb863dca4a
commit
9854af6f05
@ -55,7 +55,7 @@ class Watcher(object):
|
|||||||
if self.has_errors():
|
if self.has_errors():
|
||||||
self.bad_checks = self.bad_checks + 1
|
self.bad_checks = self.bad_checks + 1
|
||||||
else:
|
else:
|
||||||
log.info("OK %s" % datetime.datetime.now())
|
log.info("OK temp=%0.2f target=%0.2f error=%0.2f" % (self.stats['ispoint'],self.stats['setpoint'],self.stats['err']))
|
||||||
|
|
||||||
if self.bad_checks >= self.bad_check_limit:
|
if self.bad_checks >= self.bad_check_limit:
|
||||||
msg = "error kiln needs help. %s" % json.dumps(self.stats,indent=2, sort_keys=True)
|
msg = "error kiln needs help. %s" % json.dumps(self.stats,indent=2, sort_keys=True)
|
||||||
@ -68,7 +68,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
watcher = Watcher(
|
watcher = Watcher(
|
||||||
kiln_url = "http://0.0.0.0:8082/api/stats",
|
kiln_url = "http://0.0.0.0:8082/api/stats",
|
||||||
slack_hook_url = "you must set this",
|
slack_hook_url = "you must add this"
|
||||||
bad_check_limit = 6,
|
bad_check_limit = 6,
|
||||||
temp_error_limit = 10,
|
temp_error_limit = 10,
|
||||||
sleepfor = 10 )
|
sleepfor = 10 )
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user