Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add StorCli text collector example script #320

Merged
merged 2 commits into from
Dec 26, 2016

Commits on Dec 22, 2016

  1. Add StorCli text collector example script

    Collect metrics from the StorCLI utility on the health of MegaRAID
    hardware RAID controllers and write them to stdout so that they can be
    used by the textfile collector.
    
    We parse the JSON output that StorCLI provides.
    
    Script must be run as root or with appropriate capabilities for storcli
    to access the RAID card.
    
    Designed to run under Python 2.7, using the system Python provided with
    many Linux distributions.
    
    The metrics look like this:
    
        mbostock@host:~$ sudo ./storcli.py
        megaraid_status_code 0
        megaraid_controllers_count 1
        megaraid_emergency_hot_spare{controller="0"} 1
        megaraid_scheduled_patrol_read{controller="0"} 1
        megaraid_virtual_drives{controller="0"} 1
        megaraid_drive_groups{controller="0"} 1
        megaraid_virtual_drives_optimal{controller="0"} 1
        megaraid_degraded{controller="0"} 0
        megaraid_battery_backup_healthy{controller="0"} 1
        megaraid_ports{controller="0"} 8
        megaraid_failed{controller="0"} 0
        megaraid_drive_groups_optimal{controller="0"} 1
        megaraid_healthy{controller="0"} 1
        megaraid_physical_drives{controller="0"} 24
        megaraid_controller_info{controller="0", model="AVAGOMegaRAIDSASPCIExpressROMB"} 1
        mbostock@host:~$
    mattbostock committed Dec 22, 2016
    Configuration menu
    Copy the full SHA
    2c02571 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    004bdca View commit details
    Browse the repository at this point in the history