temperature skipped (OK) for shelly1 - no sensor
This commit is contained in:
parent
94546c8f80
commit
cfdef25501
@ -19,6 +19,7 @@ FS_WARNING = .30
|
|||||||
#
|
#
|
||||||
TMP_WARNING = 50
|
TMP_WARNING = 50
|
||||||
TMP_ERROR = 57
|
TMP_ERROR = 57
|
||||||
|
#
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(
|
||||||
@ -79,6 +80,8 @@ if __name__ == "__main__":
|
|||||||
elif args.check == 'temperature':
|
elif args.check == 'temperature':
|
||||||
temperature = data.get('tmp', {}).get('tC')
|
temperature = data.get('tmp', {}).get('tC')
|
||||||
if temperature is None:
|
if temperature is None:
|
||||||
|
if args.hostname.startswith('shelly1-'):
|
||||||
|
n.exit(n.OK, "Shelly1 has no temperature information")
|
||||||
status = n.UNKNOWN
|
status = n.UNKNOWN
|
||||||
elif temperature >= TMP_ERROR:
|
elif temperature >= TMP_ERROR:
|
||||||
status = n.ERROR
|
status = n.ERROR
|
||||||
|
Loading…
x
Reference in New Issue
Block a user