Browse Source

check_shelly - wifi correction

master
Dirk Alders 1 year ago
parent
commit
6aedd63627
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      check_shelly

+ 4
- 4
check_shelly View File

8
 
8
 
9
 CHECKS = ['wifi', 'mqtt', 'memory', 'filesystem', 'temperature']
9
 CHECKS = ['wifi', 'mqtt', 'memory', 'filesystem', 'temperature']
10
 #
10
 #
11
-WIFI_QUALITY_ERROR = -30
12
-WIFI_QUALITY_WARNING = -50
11
+WIFI_QUALITY_ERROR = -90
12
+WIFI_QUALITY_WARNING = -85
13
 #
13
 #
14
 RAM_ERROR = .15
14
 RAM_ERROR = .15
15
 RAM_WARNING = .30
15
 RAM_WARNING = .30
41
     if args.check == 'wifi':
41
     if args.check == 'wifi':
42
         connected = data['wifi_sta']['connected']
42
         connected = data['wifi_sta']['connected']
43
         quality = data['wifi_sta']['rssi']
43
         quality = data['wifi_sta']['rssi']
44
-        if not connected or quality > WIFI_QUALITY_ERROR:
44
+        if not connected or quality <= WIFI_QUALITY_ERROR:
45
             status = n.ERROR
45
             status = n.ERROR
46
-        elif quality > WIFI_QUALITY_WARNING:
46
+        elif quality <= WIFI_QUALITY_WARNING:
47
             status = n.WARNING
47
             status = n.WARNING
48
         else:
48
         else:
49
             status = n.OK
49
             status = n.OK

Loading…
Cancel
Save