Skip to content

brentil/OMSA-Notify

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

OMSA-notify

Synopsis

Dell OpenManager Server Administrator (OMSA) Notification Script.

This script updates your Dell OMSA Alert Management settings to call this script when alerts happen performing three actions; sending SMTP email of the alert, logging the alert to the Windows System event logs, and writes a local log file of alerts and errors.

"Forked" from https://github.com/ncouraud/OMSA-Notify "Re-Forked" https://github.com/GMartinez-Sisti/OMSA-Notify

Version

1.0.0

Installation

  1. Copy OMSANotify.ps1 to a folder on the server (Example: C:\Scripts)
  2. Update the setup variables in the script to match your environment
  • $EmailSmtpServer = "smtp.domain.local" #Your SMTP server
  • $EmailDomainSender = "domain.local" #The domain portion of your email address
  • $EmailTo = "recipient@domain.local" #Email to send to
  • $EmailReplyTo = "no-reply@domain.local" #Email to send as
  • $LogLocation = "D:\Logs" #Location to store OMSANotify event and error logs
  • $EnableExecutionPolicy = $true #Enable usage of setting -ExecutionPolicy RemoteSigned
  1. From an Admin PowerShell run the script with the setup switch .\OMSANotify.ps1 -Setup (see Note below)
  2. The script will update each alert type in OMSA to use the OMSANotify.ps1 script
  3. Check in OMSA to verify the changes were made successfully OMSA -> Alert Management -> All Alerts -> Execute Application = Enabled + Script

NOTE - On Windows 2012, 2012 R2, or 2016 you may have to alter the ExecutionPolicy to get the scripts to run.

  • Example - powershell.exe -ExecutionPolicy RemoteSigned .\OMSANotify.ps1 -Setup

Tests

Testing the script setup.

  1. From an Admin PowerShell run the script with the test switch .\OMSANotify.ps1 -Test (see Note below)
  2. This will send a test email to the $EmailTo in the script

NOTE - On Windows 2012, 2012 R2, or 2016 you may have to alter the ExecutionPolicy to get the scripts to run. Example - powershell.exe -ExecutionPolicy RemoteSigned .\OMSANotify.ps1 -Test

Testing OMSA integration. You can alter a thermal probe to think it's outside of it's range to trigger and alert.

  1. Login into OMSA and navigate to Shutdown -> Thermal Shutdown -> Thermal Protection Shutdown Severity = Disabled
  • If it is enabled it is up to your discretion to disable it for testing.
  1. Navigate to Main System Chassis -> Temperatures -> Choose a Probe -> Set to Values = Minimum Warning Threshold = Current Reading + 1
  2. When you apply the setting you should instantly get an alert
  3. While on the same page either choose Set to Default or Set to Values of your original value
  4. If you altered the Thermal Protection Shutdown Severity set it back to your desired configuration

Debugging

If the script errors during the email sending action it will write the error to a local file named OMSANotify-error.log to help in debugging.

The Dell OMSA path must be in your system path or the calls to update OMSA will fail.

The current version of OMSA-Notify does not work with SMTP credentials.

Dell OMSA 9.1 when installed disables the Alert Actions for Storage devices so you must run OMSA-Notify again to re-enable them.

About

Dell OpenManager Notification Script

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PowerShell 100.0%