Skip to main content

Scan OMSA's omreport tool's output for issues

Project description

Overview

The Dell OMSA (OpenManage Server Administrator) command-line tools are a suite of stateless tools for querying or reconfiguring your Dell server hardware, including PERC controllers, virtual disks, and physical disks. This tool is able to take “omreport vdisk” and “omreport pdisk” output, check for the existence of problems (non-OK statuses on your physical disks or virtual disks), and take action if it finds anything.

It can send one or more emails or call one or more commands. You can also choose to forward information about the problematic device to one or more commands.

Feel free to submit pull-requests with any missing features that might increase usefulness.

Install

Use PyPI:

$ pip install omsa-alert

Example

If there’s an error:

$ omreport storage pdisk controller=1 -fmt ssv | oa_check pdisk -e root@localhost -e dustin@localhost
Notifying: ['root@localhost', 'dustin@localhost']

An example of such an email:

Return-Path: <omsaalert@localhost>
X-Original-To: root@localhost
Delivered-To: root@localhost
Received: from mlll2664.magicleap.ds (mlll2664.magicleap.ds [IPv6:::1])
    by mlll2664.magicleap.ds (Postfix) with ESMTP id CC8E71720D2C
    for <root@localhost>; Fri, 26 Jan 2018 05:40:48 -0500 (EST)
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Subject: OMSA Reported a Problem
From: omsaalert@localhost
To: root@localhost, dustin@localhost
Message-Id: <20180126104048.CC8E71720D2C@mlll2664.magicleap.ds>
Date: Fri, 26 Jan 2018 05:40:48 -0500 (EST)

[
    {
        "Available RAID Disk Space": "0.00 GB (0 bytes)",
        "Bus Protocol": "SAS",
        "Capable Speed": "Not Available",
        "Capacity": "1,862.50 GB (1999844147200 bytes)",
        "Certified": "Not Applicable",
        "Device Write Cache": "Not Applicable",
        "Disk Cache Policy": "Not Applicable",
        "Driver Version": "Not Applicable",
        "Encrypted": "Not Applicable",
        "Encryption Capable": "No",
        "Failure Predicted": "No",
        "Form Factor ": "Not Available",
        "Hot Spare": "No",
        "ID": "0:0:2",
        "ISE Capable": "No",
        "Manufacture Day": "Not Available",
        "Manufacture Week": "Not Available",
        "Manufacture Year": "Not Available",
        "Media": "HDD",
        "Mirror Set ID": "Not Applicable",
        "Model Number": "Not Applicable",
        "Name": "Physical Disk 0:0:2",
        "Negotiated Speed": "Not Available",
        "Non-RAID HDD Disk Cache Policy": "Not Applicable",
        "PCIe Maximum Link Width": "Not Applicable",
        "PCIe Negotiated Link Width": "Not Applicable",
        "Part Number": "Not Available",
        "Part of Cache Pool": "Not Applicable",
        "Power Status": "Not Applicable",
        "Product ID": "WD2001FYYG-01SL3",
        "Progress": "Not Applicable",
        "Remaining Rated Write Endurance": "Not Applicable",
        "Revision": "VR02",
        "SAS Address": "50014EE5AAACA923",
        "Sector Size": "512B",
        "Serial No.": "60012383",
        "State": "Online",
        "Status": "NOT-OK",
        "Sub Vendor": "Not Available",
        "T10 PI Capable": "No",
        "Used RAID Disk Space": "1,862.50 GB (1999844147200 bytes)",
        "Vendor ID": "WD"
    }
]

NOTE: This is a contrived example. The disk information is based on a perfectly healthy disk. Real failures will look different.

See the command-line help for full documentation on parameters.

Features

  • May send messages to many email recipients.

  • May call many separate commands and optionally pass the information for the problematic devices via STDIN.

  • Turn on verbosity to print the problem information to the screen (useful with Crontab).

  • Will fail with a return-code of (5) when it encounters a problem (by default) unless you tell it not to.

Tests

There is a complete testing suite:

$ ./test.sh

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

omsa-alert-0.2.1.tar.gz (6.9 kB view details)

Uploaded Source

File details

Details for the file omsa-alert-0.2.1.tar.gz.

File metadata

  • Download URL: omsa-alert-0.2.1.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/2.7.12

File hashes

Hashes for omsa-alert-0.2.1.tar.gz
Algorithm Hash digest
SHA256 74834bce873fc34b2b92fb0f11ec19eb68ac1fb382197778424ecf1fafe403ab
MD5 459040f74984a8359d6632f2450812b0
BLAKE2b-256 ed01474d7c6c4373be103497cbdb1cc6cc84a8a77413f48ed8e0343c1c53a538

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page