208 | | if request == "volt" and dataset[1] == "Battery Status": |
---|
209 | | continue |
---|
210 | | print request + dataset[0] + ".label", dataset[1] |
---|
| 206 | if request == "volt": |
---|
| 207 | if dataset[1] == "Battery Status": |
---|
| 208 | continue |
---|
| 209 | else: |
---|
| 210 | print request + dataset[0] + ".label", dataset[1] |
---|
| 211 | ref_val = float(dataset[1].split()[-1][:-1]) |
---|
| 212 | print request + dataset[0] + ".warning", str(ref_val * 0.95) + ":" + str(ref_val * 1.05) |
---|
| 213 | print request + dataset[0] + ".critical", str(ref_val * 0.80) + ":" + str(ref_val * 1.20) |
---|
| 214 | if request == "temp": |
---|
| 215 | print request + dataset[0] + ".label", dataset[1] |
---|
| 216 | if dataset[1].startswith("CPU"): |
---|
| 217 | print request + dataset[0] + ".warning", 55 |
---|
| 218 | print request + dataset[0] + ".critical", 60 |
---|
| 219 | if dataset[1].startswith("System"): |
---|
| 220 | print request + dataset[0] + ".warning", 40 |
---|
| 221 | print request + dataset[0] + ".critical", 45 |
---|
| 222 | if request == "fan": |
---|
| 223 | print request + dataset[0] + ".label", dataset[1] |
---|
| 224 | print request + dataset[0] + ".warning", 2400 |
---|
| 225 | print request + dataset[0] + ".critical", 2000 |
---|
| 226 | |
---|