This commit is contained in:
Cyberes 2024-10-21 15:46:19 -06:00
parent 83ac54fa73
commit 1866d23dd4
1 changed files with 2 additions and 2 deletions

View File

@ -211,7 +211,7 @@ def main(args):
'unit': 'C' 'unit': 'C'
} }
}) })
elif args.choice == 'disk': elif args.choice == 'disks':
data = walk_snmp(args.host, args.community, SnmpDisk.disk.value) data = walk_snmp(args.host, args.community, SnmpDisk.disk.value)
disk_indices = set(key.split('.')[-1] for key in data.keys()) disk_indices = set(key.split('.')[-1] for key in data.keys())
disk_data = [] disk_data = []
@ -251,7 +251,7 @@ if __name__ == '__main__':
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()
parser.add_argument('-H', '--host', required=True, help='The host to connect to.') parser.add_argument('-H', '--host', required=True, help='The host to connect to.')
parser.add_argument('-c', '--community', required=True, help='The community name.') parser.add_argument('-c', '--community', required=True, help='The community name.')
parser.add_argument('-C', '--choice', required=True, choices=['mem', 'load', 'status', 'disk', 'storage', 'network'], help='What to check.') parser.add_argument('-C', '--choice', required=True, choices=['mem', 'load', 'status', 'disks', 'storage', 'network'], help='What to check.')
parser.add_argument('--warn-mem', type=int, default=75, help='Memory usage percent to warn at. Default: 75%') parser.add_argument('--warn-mem', type=int, default=75, help='Memory usage percent to warn at. Default: 75%')
parser.add_argument('--crit-mem', type=int, default=90, help='Memory usage percent to crit at. Default: 90%') parser.add_argument('--crit-mem', type=int, default=90, help='Memory usage percent to crit at. Default: 90%')