fix some stuff

This commit is contained in:
Cyberes 2023-11-26 23:46:09 -07:00
parent 17d3fb9fa0
commit 6d7174ad63
4 changed files with 7 additions and 6 deletions

View File

@ -35,7 +35,7 @@ def main(args):
if __name__ == "__main__": if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Validate Hauk tracking functionality.') parser = argparse.ArgumentParser()
parser.add_argument('--ip', required=True, help='The iDRAC IP to query.') parser.add_argument('--ip', required=True, help='The iDRAC IP to query.')
parser.add_argument('--community', default='public', help='Your SNMP community. Default: public') parser.add_argument('--community', default='public', help='Your SNMP community. Default: public')
parser.add_argument('--fan-num', type=int, default=1, help='Number of fans. Default: 1') parser.add_argument('--fan-num', type=int, default=1, help='Number of fans. Default: 1')

View File

@ -40,7 +40,7 @@ def main(args):
if __name__ == "__main__": if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Validate Hauk tracking functionality.') parser = argparse.ArgumentParser()
parser.add_argument('--ip', required=True, help='The iDRAC IP to query.') parser.add_argument('--ip', required=True, help='The iDRAC IP to query.')
parser.add_argument('--community', default='public', help='Your SNMP community. Default: public') parser.add_argument('--community', default='public', help='Your SNMP community. Default: public')
args = parser.parse_args() args = parser.parse_args()

View File

@ -17,7 +17,7 @@ CPU2_TEMP_OID = '.1.3.6.1.4.1.674.10892.5.4.700.20.1.6.1.4'
def get_snmp_temp(oid, ip, community): def get_snmp_temp(oid, ip, community):
value = get_snmp_value(oid, ip, community) value = str(get_snmp_value(oid, ip, community))
return c_to_f(float(value[0] + value[1] + '.' + value[2])) return c_to_f(float(value[0] + value[1] + '.' + value[2]))
@ -70,7 +70,7 @@ def main(args):
if __name__ == "__main__": if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Validate Hauk tracking functionality.') parser = argparse.ArgumentParser()
parser.add_argument('--ip', required=True, help='The iDRAC IP to query.') parser.add_argument('--ip', required=True, help='The iDRAC IP to query.')
parser.add_argument('--community', default='public', help='Your SNMP community. Default: public') parser.add_argument('--community', default='public', help='Your SNMP community. Default: public')
parser.add_argument('--cpu-num', type=int, default=1, help='Number of CPU nodes. Default: 1') parser.add_argument('--cpu-num', type=int, default=1, help='Number of CPU nodes. Default: 1')
@ -78,7 +78,7 @@ if __name__ == "__main__":
parser.add_argument('--inlet-crit', type=int, default=116, help='System Board Inlet Temp critical level in F. Default: 116') parser.add_argument('--inlet-crit', type=int, default=116, help='System Board Inlet Temp critical level in F. Default: 116')
parser.add_argument('--exhaust-warn', type=int, default=158, help='System Board Exhaust Temp warning level in F. Default: 158') parser.add_argument('--exhaust-warn', type=int, default=158, help='System Board Exhaust Temp warning level in F. Default: 158')
parser.add_argument('--exhaust-crit', type=int, default=167, help='System Board Exhaust Temp critical level in F. Default: 167') parser.add_argument('--exhaust-crit', type=int, default=167, help='System Board Exhaust Temp critical level in F. Default: 167')
parser.add_argument('--cpu-warn', type=int, default=186, help='CPU temp critical level in F. Default: 186') parser.add_argument('--cpu-warn', type=int, default=186, help='CPU temp warning level in F. Default: 186')
parser.add_argument('--cpu-crit', type=int, default=195, help='CPU temp critical level in F. Default: 195') parser.add_argument('--cpu-crit', type=int, default=195, help='CPU temp critical level in F. Default: 195')
args = parser.parse_args() args = parser.parse_args()
try: try:

View File

@ -22,3 +22,4 @@ proxmoxer==2.0.1
gunicorn gunicorn
redis redis
flask-caching flask-caching
pysnmp==4.4.12