diff --git a/check-plugins/file-size/README.rst b/check-plugins/file-size/README.rst index 5d5a337f..68e87873 100644 --- a/check-plugins/file-size/README.rst +++ b/check-plugins/file-size/README.rst @@ -39,7 +39,7 @@ Help --always-ok Always returns OK. -c CRIT, --critical CRIT Threshold for the file size in Bytes. Supports Nagios - ranges. Default: :1073741824 + ranges. Default: 1073741824 --filename FILENAME File (or directory) name to check. Supports glob in accordance with https://docs.python.org/2.7/library/glob.html. Note @@ -58,7 +58,7 @@ Help --username USERNAME SMB Username. -w WARN, --warning WARN Threshold for the file size in Bytes. Supports Nagios - ranges. Default: :26214400 + ranges. Default: 26214400 Usage Examples diff --git a/check-plugins/file-size/file-size b/check-plugins/file-size/file-size index bc2d87ea..f34f637b 100755 --- a/check-plugins/file-size/file-size +++ b/check-plugins/file-size/file-size @@ -37,10 +37,10 @@ __version__ = '2024033002' DESCRIPTION = 'Checks the size for a file (in bytes).' -DEFAULT_CRIT = ':{}'.format(str(1024*1024*1024)) # 1G (Gibibyte) +DEFAULT_CRIT = str(1024*1024*1024) # 1G (Gibibyte) DEFAULT_PATTERN = '*' DEFAULT_TIMEOUT = 3 -DEFAULT_WARN = ':{}'.format(str(25*1024*1024))# 25M (Mebibyte) +DEFAULT_WARN = str(25*1024*1024) # 25M (Mebibyte) def parse_args(): @@ -219,10 +219,10 @@ def main(): ) if len(table_data) == 1: # show info on first line when there is only one hit - msg += 'Checked {}, {}{}'.format( + msg += ' Checked {}: {} {}'.format( table_data[0]['filename'], table_data[0]['size_hr'], - table_data[0]['state_hr'], + lib.base.state2str(table_data[0]['state'], prefix=' '), ) else: msg += '\n\n' + lib.base.get_table( diff --git a/check-plugins/file-size/icingaweb2-module-director/file-size.json b/check-plugins/file-size/icingaweb2-module-director/file-size.json index a414316d..1512d272 100644 --- a/check-plugins/file-size/icingaweb2-module-director/file-size.json +++ b/check-plugins/file-size/icingaweb2-module-director/file-size.json @@ -149,10 +149,10 @@ "vars": { "criticality": "C", "file_size_always_ok": false, - "file_size_critical": ":1073741824", + "file_size_critical": "1073741824", "file_size_pattern": "*", "file_size_timeout": 3, - "file_size_warning": ":26214400" + "file_size_warning": "26214400" }, "volatile": null, "zone": null,