Révision 409e8896
Change if conditions to please the linter.
| plugins/disk/btrfs_device_stats | ||
|---|---|---|
| 106 | 106 |
print("corruption_errs.label Corruption Errors")
|
| 107 | 107 |
print("corruption_errs.warning " + os.getenv('corruption_errs_warning',
|
| 108 | 108 |
default = str(warning))) |
| 109 |
if os.getenv('corruption_errs_critical', default = critical) != False:
|
|
| 109 |
if os.getenv('corruption_errs_critical', default = critical):
|
|
| 110 | 110 |
print("corruption_errs.critical " +
|
| 111 | 111 |
os.getenv('corruption_errs_critical',
|
| 112 | 112 |
default = str(critical))) |
| ... | ... | |
| 114 | 114 |
print("flush_errs.label Flush Errors")
|
| 115 | 115 |
print("flush_errs.warning " + os.getenv('flush_errs_warning',
|
| 116 | 116 |
default = str(warning))) |
| 117 |
if os.getenv('flush_errs_critical', default = critical) != False:
|
|
| 117 |
if os.getenv('flush_errs_critical', default = critical):
|
|
| 118 | 118 |
print("flush_errs.critical " + os.getenv('flush_errs_critical',
|
| 119 | 119 |
default = str(critical))) |
| 120 | 120 |
|
| 121 | 121 |
print("generation_errs.label Generation Errors")
|
| 122 | 122 |
print("generation_errs.warning " + os.getenv('generation_errs_warning',
|
| 123 | 123 |
default = str(warning))) |
| 124 |
if os.getenv('generation_errs_critical', default = critical) != False:
|
|
| 124 |
if os.getenv('generation_errs_critical', default = critical):
|
|
| 125 | 125 |
print("generation_errs.critical " +
|
| 126 | 126 |
os.getenv('generation_errs_critical',
|
| 127 | 127 |
default = str(critical))) |
| ... | ... | |
| 129 | 129 |
print("read_errs.label Read Errors")
|
| 130 | 130 |
print("read_errs.warning " + os.getenv('read_errs_warning',
|
| 131 | 131 |
default = str(warning))) |
| 132 |
if os.getenv('read_errs_critical', default = critical) != False:
|
|
| 132 |
if os.getenv('read_errs_critical', default = critical):
|
|
| 133 | 133 |
print("read_errs.critical " + os.getenv('read_errs_critical',
|
| 134 | 134 |
default = str(critical))) |
| 135 | 135 |
|
| 136 | 136 |
print("write_errs.label Write Errors")
|
| 137 | 137 |
print("write_errs.warning " + os.getenv('write_errs_warning',
|
| 138 | 138 |
default = str(warning))) |
| 139 |
if os.getenv('write_errs_critical', default = critical) != False:
|
|
| 139 |
if os.getenv('write_errs_critical', default = critical):
|
|
| 140 | 140 |
print("write_errs.critical " + os.getenv('write_errs_critical',
|
| 141 | 141 |
default = str(critical))) |
| 142 | 142 |
|
| ... | ... | |
| 145 | 145 |
print("flags.label Nr. of Flags")
|
| 146 | 146 |
print("flags.warning " + os.getenv('flags_warning',
|
| 147 | 147 |
default = str(warning))) |
| 148 |
if os.getenv('flags_critical', default = critical) != False:
|
|
| 148 |
if os.getenv('flags_critical', default = critical):
|
|
| 149 | 149 |
print("flags.critical " + os.getenv('flags_critical',
|
| 150 | 150 |
default = str(critical))) |
| 151 | 151 |
|
| plugins/disk/btrfs_device_usage | ||
|---|---|---|
| 103 | 103 |
this_dev_name = this_dev_info.path.replace('/dev/', '')
|
| 104 | 104 |
print("btrfs_bytes_" + fsid + "_" + str(this_device.devid) +
|
| 105 | 105 |
".label " + this_dev_name) |
| 106 |
if byte_warning != False:
|
|
| 106 |
if byte_warning: |
|
| 107 | 107 |
print("btrfs_bytes_" + fsid + "_" + str(this_device.devid) +
|
| 108 | 108 |
".warning " + str(byte_warning)) |
| 109 |
if byte_critical != False:
|
|
| 109 |
if byte_critical: |
|
| 110 | 110 |
print("btrfs_bytes_" + fsid + "_" + str(this_device.devid) +
|
| 111 | 111 |
".critical " + str(byte_critical)) |
| 112 | 112 |
|
Formats disponibles : Unified diff