Giter Club home page Giter Club logo

dell-omsa-email-alerts's Introduction

Dell OMSA Email Alerts

This PowerShell script will configure OMSA to send out emails when an alert is generated.

It will include the following:

  • System information from omreport chassis info
  • Storage information from omreport storage vdisk
  • Attach the system alert log from omreport system alertlog

This script is based on this script by Paul Murana.

How to use

  • Place the OMAlert.ps1 in a folder on your system, mine is under C:\Scripts\.
  • Edit the variables under $mailArgs to match your settings:

    โš ๏ธ It's best to use an encrypted file instead of a plaintext password in a script, the below is just a simple example.

    # Default mail arguments
    $mailArgs = @{
    To = "[email protected]"
    From = "[email protected]"
    Credential = New-Object System.Management.Automation.PSCredential ("[email protected]", ("password" | ConvertTo-SecureString -AsPlainText -Force ))
    SmtpServer = "smtp.example.com"
    Port = "587"
    UseSsl = $true
    }

Send a test email

  • Execute the script with the param testemail.
    PS C:\Scripts> .\OMAlert.ps1 testemail

Configure OMSA

  • Execute the script with the param configure, this will both configure OMSA and create a bunch of .bat scripts in the same directory.

    These scripts are called by OMSA once an alert is generated.

    PS C:\Scripts> .\OMAlert.ps1 configure
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    Alert action(s) configured successfully.
    PS C:\Scripts>

Test functionality

You can test if the script did it's job by temporarily lowering the Temperature Threshold settings.

This should generate an alert and send out an email.

Clear configuration

To clear all alert configurations, execute the script with the param clearall.

dell-omsa-email-alerts's People

Contributors

larsstoker avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.