orteko / megaclisas-status Goto Github PK
View Code? Open in Web Editor NEWThis project forked from ksonney/megaclisas-status
SNMP and Nagios MegaRaid Check
This project forked from ksonney/megaclisas-status
SNMP and Nagios MegaRaid Check
# python megaclisas-status.py
Traceback (most recent call last):
File "megaclisas-status.py", line 295, in <module>
data, good_arrays, bad_arrays, good_disks, bad_disks = get_raid_status()
File "megaclisas-status.py", line 237, in get_raid_status
array_details = get_array_info(controller_id, array_id)
File "megaclisas-status.py", line 144, in get_array_info
return (_id, raid_type, size, state, in_progress, cachecade_info)
UnboundLocalError: local variable 'raid_type' referenced before assignment
The initial cause is that get_array_info doesn't handle errors. Underlying that is the assumption that the LDs will run sequentially from 0 to ((megacli -LdGetNum -aN) - 1). On my controller the first two LDs were removed so the count runs from 2 to ((megacli -LdGetNum -aN) + 1).
# megacli -LdGetNum -a0
Number of Virtual Drives Configured on Adapter 0: 11
Exit Code: 0x0b
# megacli -LDInfo -l0 -a0
Adapter 0 -- Virtual Drive Information:
Adapter 0: Virtual Drive 0 Does not Exist.
Exit Code: 0x01
# megacli -LDInfo -Lall -aAll -NoLog|grep 'Virtual Drive:'
Virtual Drive: 2 (Target Id: 2)
Virtual Drive: 3 (Target Id: 3)
Virtual Drive: 4 (Target Id: 4)
Virtual Drive: 5 (Target Id: 5)
Virtual Drive: 6 (Target Id: 6)
Virtual Drive: 7 (Target Id: 7)
Virtual Drive: 8 (Target Id: 8)
Virtual Drive: 9 (Target Id: 9)
Virtual Drive: 10 (Target Id: 10)
Virtual Drive: 11 (Target Id: 11)
Virtual Drive: 12 (Target Id: 12)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.