Setting up email alerts from Dell Openmanage (OMSA)
ByDell Openmanage Server Administrator is a really useful tool for configuring and monitoring server hardware but it lacks built in E-Mail alerting or notifications.
The software is capable of calling external programs or scripts when a server alert is triggered so I have written a simple script that provides E-Mail alert functionality.
There are a couple of scripts out there that do similar, but I wanted something self contained and capable of using SMTP Authentication with an external relay.
The other problem with OMSA is that you need to go into each individual alert to configure the settings which can be very time consuming, I wanted a way to add them all automatically as I am going to install the script on a number of servers.
Once you have downloaded and extracted the zip file you will need to edit the variables at the top of the script to make them appropriate for your environment:
The variables at the top define the e-mail settings and are hopefully self explanatory. If a remote SMTP server is not specified the local machine will be used to send the E-Mail.
Below these you can to decide what events you want to be notified of, just comment out any that you aren’t interested in, e.g:
AlertConfig(0)="powersupply|Power supply failure"
AlertConfig(1)="powersupplywarn|Power supply warning"
'AlertConfig(2)="tempwarn|Temperature warning"
'AlertConfig(3)="tempfail|Temperature failure"
I have included every alert available in OMSA 6.2 on a PE T710, some of these alerts won’t be available on older versions or machines.
After you have configured the script, I suggest you test that the E-Mail options by running:
cscript dellalert.vbs testemail
You should receive a test e-mail, if not something isn’t working properly.
When you have successfully tested e-mail, configure OMSA to send alerts by running:
cscript dellalert.vbs setup
You will then see the script go through and setup all the appropriate alerts as per your settings. This process can take a couple of minutes as the “omconfig” command takes a while. This step will not work if you do not have OMSA installed.
Once this is done you should be able to see that the script has been added into OMSA:
Now you need to generate some real alerts to test the script properly. How you do this will depend on the capabilities of your server, I was able to disconnect the redundant power supply and have an alert generated almost immediately. I think opening the case will also generate an event, but I am not sure as I didn’t test. Hopefully you should get something like this in your Inbox:
Update: There is a new version of this script which is written entirely in Powershell and will work with Windows Server Core etc. Please visit :
Download both versions by following the PayPal link.



Thank you for your effort!!!
Installed on Dell R815 and works just fine!
hi!
Just tryed your script but get an error using Gmail and Hotmail smtp servers.
C:\dellalert.vbs(101, 3) CDO.Message.1: The transport failed to connect to the server.
For hotmail :
smtpserver smtp.live.com
port 25 and 587 tryed
username : xxx@hotmail.com
no idea whats wrong ?
[...] the easiest way to receive the alert emails from Dell OpenManage on Windows server. See this good article. Since I have email setup in OM so the only things I need add to the script are [...]
Worked very well on my Dell PE2800 servers with Windows 2003. I wonder anyway to set up something similar on VMware box.
Thanks!!
Fantastic!! I’ve been thinking about writing something like this to make up for the MAJOR shortcoming on Dell’s part (what kind of modern monitoring service *doesn’t* allow email?!)
You’ve just saved me a fair bit of work — thanks a ton!
Hi Paulie,
Thanks a lot for this post.
Amazing that Dell does not include this functionnality in its software ! This script is very useful to achieve a good monitoring of dell servers.
It works very well. Tested and adopted.
A beautiful solution to a tedious problem! Thank you!
To generalize it a bit, I also added:
Set objNetwork = WScript.CreateObject(“WScript.Network”)
And used:
MailSubject = “Server ” & objNetwork.ComputerName & ” Alert – ”
So I could use the same script for each server. Thanks, again.
Hi,
It doesn’t run on my 2008 R2 (x64) server. Disabled firewall, but i never receive the message. The smtp server is on local lan and no problem with it…
Any idea?
Ok problem is solved :
The problem was that i’ve put the vbs in c:\windows\system32, if i move it to c:\ it works fine, there must be an acl or a security feature restricting vbs in system32 folder…
Thanks for the script !
Thank you!!! Very, very good and easy! It works fine and without problems on my Dell T710 with Windows 2008 SBS x64.
Thanks! I’ll use it for all my servers.
Great script! I’ve been looking for something like this for a while. I rolled it out to all my boxen, and it works great on all of them except one. I’m getting the following error when i run setup:
C:\OpenManageEmailAlerts\DellAlert.vbs(107, 2) (null): The system cannot find the file specified.
Any ideas?
Hi,
It cannot find the omconfig command required to let the script run. It sounds like you don’t have openmanage installed on the server with the problem, or that the PATH environment variable does not include the location to the omconfig command.
Paulie
Man! That’s what i call service! I double checked the path, and that was indeed the issue.
Thanks again for the great script! You’re the man!
This worked well for me.. Thanks for the help.
I’m not crazy about the idea of SMTP authenication password being stored in a vbs script. I suppose if it’s stored in a secure admin folder it’s probably okay. c:\ won’t cover this. C:\Users\Administrator\dellalert.vbs seems okay though.
Sure am surprised that Dell’s Open Manage doesn’t support email.
Great job, can’t wait to do some tests but seems to be working correctly. Agreed storing SMTP pw in a script is not ideal. I avoided this by setting up an internal relay and just using IPsec to secure it. That way you just allow the server IP through and it does not require a pw but will not allow others to connect to your relay.
Great script! But in Windows 2008 server core does not work. When I try to send email I get error message: ActiveX component can’t create object: CDO.Message
with error code 800A01AD
This was excellent. Solved my problem only thing is if you get a Library not Registered error when performing the setup step then use this link to fix it and then re-run setup.
http://support.microsoft.com/kb/949140#LetMeFixItMyself
Once I performed these steps then everything worked great.
What an excellent script, thank you so much.
Works perfectly, we are running Server 2008 Standard Edition 64 Bit.
I can’t believe Dell doesn’t allow configurable email alerts through OMSA.
Thank you for this! Works great! You rock!
Thank you SO MUCH. I agree that it’s absurd that Dell has not built in this functionality to OMSA.
**A QUESTION** Is there a way to use an outgoing server that requires TLS or SSL? I would like to send through a gmail account from a clients location where no one knows the account info to use their ISP smtp server.
Yes, it is possible and if you look through all the comments I think you will find that others have already done this.
I am working on an updated version of this script which will offer than functionality in an easy to use format, plus some extra features.
Thanks so much!! Works like a charm on my PE1900 with Win2003R2.
Hi, i have configured the script, just not sure how to test? do I type cscript dellalert.vbs testemail in to the run box?
Thanks.
Rob.
ok worked out how to run the test… but no message….
Rob,
Not sure what problem you are having, but I am working on a newer version of the script with easier configuration and greater troubleshooting. Should be released this week….
But you should be able to get this one working no problems.
Paulie
This script worked fine, but when I tested a failure, I recd’ approx 38 alerts for power failure. How can I receive just 1 alert for each failure ?
Thanks in advance.
Normally this is fixed by installing a more recent verison of Dell Openmanage
Ok,
Can I update it within Openmanage or do I have to uninstall the current version and install a newer version ? I see the most recent is 6.4, does it have email alerts built in ?
Thanks in advance.
You can install a newer version over the one that you have right now.
New verison does not have email alerting built it.
Another thanks! Much appreciated.
Can i ask a dumb ass question?
The execute application > absolute path, is that fine being a Windows path? Open Manage is installed on an vmware box for us, i get to it through a browser. The C:\applicationrahrahrahrah shouldn’t work as an absolute path should it?
I think i just answered my own question… re read it and OMSA has to be installed on the machine its running from, which means no ESX
What a great tool/script!
Thank you very much!
Is there anyway to adjust the time that Openmanage or the script sends the email alert? I set it on a slew of server and it works great but they start emailing me at 3:00 am and I cant find where to change it..
Thanks Again!!
It sends the alerts as and when they occur, there are no time settings or scheduling.
Thanks Paulie!
thanks for putting this together
Thank you for this great piece of work, you made my day!
For ESXi, free version, you need to install OM-SrvAdmin-Dell-Web-6.5.0-2247.VIB-ESX41i_A01.zip.
Download it from Dell and follow the instructions to install. Maybe there is a newer version by now.
REMEMBER: the free version have SMTP disabled.
You can not setup email alerts coming up from the host.
Thank you VMWare!.
[...] right now im using http://www.tachytelic.net/2010/03/setting-up-e-mail-alerts-from-dell-openmanage-omsa/ [...]
There was a post from Abrahem (1/18/11) concerning CDO problems with the script when running on ServerCore. I have the same problem. Is there anything you can suggest to make it work? Thanks. BTW – excellent script – I have it running on about 10 servers.
just simple and excellent !
thx
Excellent Script! Great work!
Thank you very much!
Great script, I did a tweak to the setup to allow omconfig to provide all the alert values to the script and set them up.
But I’m running into the same problem as Abrahem and Davey on 2008 R2 x64 core systems, doesn’t want to create the CDO.Message object. I’ve tried installing the CDO objects, copying/registering CDOSYS.dll from a GUI build, running out of ideas.
Sorry guys, I just dont have access to a machine running server core to try this out and find out what the issue is. Probably an easier method would be to change the script so that it does not use CDO anymore.
If anyone wants to give me remote access to their server core machine, I will try and figure it out.
I too kept getting errors of type…
C:\dellalert.vbs(101, 3) CDO.Message.1: The transport failed to connect to the server.
… regardless of which SMTP server (or combination of settings) I used.
It turns out it was a Anti-Virus settings (thank you McAfee) that was blocking SMTP traffic to ‘Prevent Mass Mailing Worms’ from sending email.
Added an exception and it’s working a treat!
i found the same error as Douglas Morrison and the McAfee exception worked. Thank you Paulie!
To use GMail, I simply added the following lines at the top:
SMTPPort=”465″
SMTPUseSSL=”False”
…and the following ‘if’ to the ‘SendAlert’ sub before the config update:
‘Use SSL for the connection (False or True)
If SMTPUseSSL = “True” Then
objMessage.Configuration.Fields.Item(“http://schemas.microsoft.com/cdo/configuration/smtpusessl”) = True
End If
Anyone know of the steps in getting this to work on CentOS 5.6? Works beautifully on W2k3 Paulie, great job.
Just what i was looking for. Thanks!
Thank you so much!!! Fantastic!
Hi all, i need this script too but cant see it or a link to it !
can anyone help ?
Thanks
@Douglas Morrison
I’m running into the exact same problem and we run McAfee, what did you exclude specifically?
Thanks!
I installed the script and unplugged one power cable to test the alerts, i got 168 emails “Dell Server Alert on XXX.XXX.XXX.XXX – Redundancy lost” and one mail “Dell Server Alert on XXX.XXX.XXX.XXX – Power supply failure”
any idea why ? how i can config it to send only one mail
thanx
You just need to upgrade to a more recent version of open manage. That fixes the problem.
you were right. i upgraded the open manage to 6.5.0 yesterday and it solved the multi-emails problem
thanks
Thank you, this made it painless to configure my PowerEdge R710, Windows Server 2003
Hi,
Thank you for this script en clear explanation of it.
i would like to use the script on core systems and as far as i understand this is not possible. i’ll try to edit it so that it will work.
I am getting the email issue using gmail, I have adjusted and added the gmail settings recommended here. I am still encountering problems
I’ve got a solution for people who are using the core 2008 version of windows.
you need 2 scripts.
DellAlert.vbs
DellAlert.ps1
I use the powershell script to send the email because vbs can’t do because missing support for CDO.Message
pay attention, if you just installed the Dell openmanage software, the path isn’t set. you have to log on and log off before the setup works!
DellAlert.vbs:
‘==========================================================================
‘ NAME: Dell Openmanage E-Mail Alerts
‘
‘ AUTHOR: Paul Murana
‘ DATE : 11/03/2010
‘
‘ The Script can be called with three different options:
‘ DellAlerts.vbs setup – Will automatically add alerts to OMSA
‘ DellAlerts.vbs testemail – Will send a test e-mail so you can check if mail config is correct.
‘ DellAlerts.vbs email X – Where X is a number that corresponds to a Dell alert, this is how OMSA will send its alert.
‘==========================================================================
Dim oShell, appCmd
MailSubject = “Dell Server Alert on SERVERNAME – ”
‘Comment out any alerts that you are not interested in
Dim AlertConfig(38)
AlertConfig(0)=”powersupply|Power supply failure”
AlertConfig(1)=”powersupplywarn|Power supply warning”
AlertConfig(2)=”tempwarn|Temperature warning”
AlertConfig(3)=”tempfail|Temperature failure”
AlertConfig(4)=”fanwarn|Fan speed warning”
AlertConfig(5)=”fanfail|Fan speed failure”
AlertConfig(6)=”voltwarn|Voltage warning”
AlertConfig(7)=”voltfail|Voltage failure”
AlertConfig(8)=”intrusion|Chassis intrusion”
AlertConfig(9)=”redundegrad|Redundancy degraded”
AlertConfig(10)=”redunlost|Redundancy lost”
AlertConfig(11)=”memprefail|Nemory pre-failure”
AlertConfig(12)=”memfail|Memory failure”
AlertConfig(13)=”hardwarelogwarn|Hardware log warning”
AlertConfig(14)=”hardwarelogfull|Hardware log full”
AlertConfig(15)=”processorwarn|Processor warning”
AlertConfig(16)=”processorfail|Processor failure”
AlertConfig(17)=”watchdogasr|Watchdog asr”
AlertConfig(18)=”batterywarn|Battery warning”
AlertConfig(19)=”batteryfail|Battery failure”
AlertConfig(20)=”systempowerwarn|Power warning”
AlertConfig(21)=”systempowerfail|Power failure”
AlertConfig(22)=”systempeakpower|Peak power”
AlertConfig(23)=”removableflashmediapresent|Removable flash media present”
AlertConfig(24)=”removableflashmediaremoved|Removable flash media removed”
AlertConfig(25)=”removableflashmediafail|Removable flash media failure”
AlertConfig(26)=”storagesyswarn|Storage System warning”
AlertConfig(27)=”storagesysfail|Storage System failure”
AlertConfig(28)=”storagectrlwarn|Storage Controller warning”
AlertConfig(29)=”storagectrlfail|Storage Controller failure”
AlertConfig(30)=”pdiskwarn|Physical Disk warning”
AlertConfig(31)=”pdiskfail|Physical Disk failure”
AlertConfig(32)=”vdiskwarn|Virtual Disk warning”
AlertConfig(33)=”vdiskfail|Virtual Disk failure”
AlertConfig(34)=”enclosurewarn|Enclosure warning”
AlertConfig(35)=”enclosurefail|Enclosure failure”
AlertConfig(36)=”storagectrlbatterywarn|Storage Controller Battery warning”
AlertConfig(37)=”storagectrlbatteryfail|Storage Controller Battery failure”
Args=WScript.Arguments.Count
If Args > 0 Then
Action = trim(lcase(WScript.Arguments.Item(0)))
Select Case Action
Case “setup”
For i = 0 To ubound(AlertConfig)
If AlertConfig(i) “” then
AlertDetails=Split(AlertConfig(i),”|”)
SetDellAlert AlertDetails(0), i
End If
Next
Case “email”
AlertDetails=Split(AlertConfig(WScript.Arguments.Item(1)), “|”)
MailSubject = Mailsubject & AlertDetails(1)
SendAlert
Case “testemail”
MailSubject = Mailsubject & “Test Alert”
SendAlert
End select
End If
Sub SendAlert
Set oShell = CreateObject(“WScript.Shell”)
appCmd = “powershell &’” & Replace(WScript.ScriptFullName, “.vbs”, “.ps1″) & “‘” & ” ‘” & (MailSubject) & “‘”
oShell.Run appCmd, 4, false
End Sub
Sub SetDellAlert(DellEvent, EventID)
cmd=”omconfig system alertaction event=” & DellEvent & ” execappath=” & Chr(34) & WScript.FullName & ” \” & chr(34) & WScript.ScriptFullName & “\” & chr(34) & ” email ” & EventID & Chr(34)
Set WshShell = WScript.CreateObject(“WScript.Shell”)
WshShell.run cmd,1,true
End Sub
DellAlert.ps1:
param([string]$Param1 = 0)
Write-Host $Param1
$EmailFrom = “”
$EmailTo = “”
$EmailSubject = ($Param1)
$SMTPServer = “smtp.na.na”
$SMTPAuthUsername = “na@na.na”
$SMTPAuthPassword = “na”
function send_email {
$mailmessage = New-Object system.net.mail.mailmessage
$mailmessage.from = ($emailfrom)
$mailmessage.To.add($emailto)
$mailmessage.Subject = $emailsubject
$mailmessage.Body = $emailbody
#$mailmessage.IsBodyHTML = $true
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 25)
$SMTPClient.Credentials = New-Object System.Net.NetworkCredential(“$SMTPAuthUsername”, “$SMTPAuthPassword”)
$SMTPClient.Send($mailmessage)
}
send_email
Thank you so much for this and the person who included how to use SSL. I can’t believe the Open Manage does not have this capability built into this. This is a lifesaver.
I just wanted to know if anyone has been able to test the functions? I have it working alongside with IT Assistant to do the email checks and email if any issues occur.
As someone already post, thank you for your job. Easy to install, work like a charm …
I have converted the VBScript to pure Powershell. It can send the e-mails and can set up the alerts – but when I generate an alert, e.g. by pulling one of the powerleads out of a server that is set up by this, nothing happens. But when I execute a command line that is set up by my Powershell script, it works fine.
An example of one of the command lines that is set up by my script is:
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe C:\bin\domalerts.ps1 email 0
The “email 0″ are arguments to my Powershell script. This line e-mails me about a power supply failure, and my script also logs to a local text file.
I am convinced that there is no problem with my script, because nothing appears in the local text file, either. I think DSM is just not executing the line at all.
If I run omreport.exe system alertaction, I get:
Execute Application : On
as well as the line to execute.
When I try to run the VisualBasic script, it does the setup all right, but won’t e-mail me – don’t know why and I don’t know enough about VBScript. The VBScript sets up similar stuff to Powershell, e.g.:
Execute Application : On
Absolute path to the application : C:\Windows\System32\WScript.exe “C:\bin\domalerts.vbs” email 0
I really want to make this work as pure PowerShell. Anyone have any thoughts??
jj
PS – I also changed the action for the Powershell version to quote the PowerShell script path – no difference.
Weird – I have also rewritten the script in pure powershell this week. The powershell version is so much nicer.
My rewrite works OK so not sure why you are having a problem. I will be posting it very soon, maybe even today.
Maximum Kudos and many thanks to the author of this script. I installed it on two servers:
Dell PowerEdge 4600 running OMSA 5.5.0 Windows Server 2003 (32 bit)
Dell PowerEdge R515 running OSMA 6.5.0 Windows Server 2008 R2 (64 Bit)
I have tested both and they work perfectly. The script is elegant, transparent and hides no little nasties that will come back and bite you later.
If I’d written this script, I’dbe well pleased with myself.
Paul
[...] year I posted a script written in VBScript which enables email alerts from Dell OMSA without the need for IT Assistant. [...]
I have installed this script on my server and it’s working great. It is possible to send alerts to multiple email addresses? What would the seperator be between addresses if there is one?
Thanks
Ross
Hi,
I’ve never actually tried it, but I think that a semi-colon would work and that you should not have a problem sending to multiple addresses. Please try it and let me know.
Paulie
I’m not a Dell OpenManage expert, and I’m not speaking for Dell, but I’ll guess on an answer for why they didn’t include the e-mail functionality in OMSA.
OMSA is the 1 to 1 server management software. It also works as an “agent” that talks to other systems management software, such as ITA, DMC, SCOM, etc.
OMSA is installed on all servers. The central management point (let’s just say ITA as an example) is where you would discover and manage your servers from. It would be easier to manage e-mail alerts from one system than on all systems individually. If a change needs to be made in the alert type, or e-mail address that the alerts need to be sent to, you can make the change in one location (ITA) instead of changing each script.
Just my 2 cents
hello,
i buy the script and use vbs version.
All is ok (testemail, setup..) but when i tested alert by dos command c:\winodws\system32\cscript.exe “c:\windows\dellalert.vbs” email 10 p.ex the script work but no mail is received.
i teste it on two server Dell One PE2900 Windows 2003 and other T610 Windows 2008.. it’s same.
can you help me ?
Thank’s
very strange….
Since yesterday night i read all post but not find a solution.
I add — Set WshShell = WScript.CreateObject(“WScript.Shell”)
WshShell.LogEvent 4, Subject –
just after Sub SendAlert(subject)
I test the script with email 0 and 31 and check on windows event and i see the two Alerts but not mail received.
If i comment — MailSubject = Mailsubject & AlertDetails(1) — in Case “email” and replace AlertDetails(1) by “test alert mail”, the mail is received…
Dear Paulie,
i buy the script and i actually test it on a PowerEdge 2850 server with OMSA 6.5 installed with VBS script. Now i placed a bad disk, to simulate a disk failure and i receive a lot of email !!! One every 5 minutes !!
Last August you wrote “You just need to upgrade to a more recent version of open manage. That fixes the problem.”….. I have the LAST version of OMSA….WHY ?
Thanks. Ciao
Hi,
Just bought and installed your script. Test email works very well. Unfortunately I am getting the following error when running the setup command. What could be wrong? We are running open manage in a virtualized environment and it works well.
The term ‘omconfig’ is not recognized as the name of a cmdlet, function, s
elling of the name, or if a path was included, verify that the path is cor
At line:1 char:9
+ omconfig <<<< system alertaction event=powersupply execappath="C:\Windo
.exe -executionpolicy unrestricted C:\scripts\POWERS~1\DELLAL~1.PS1 email
+ CategoryInfo : ObjectNotFound: (omconfig:String) [], Comman
+ FullyQualifiedErrorId : CommandNotFoundException
It sounds like you don’t have Openmanage installed. Are you running the script on a Windows guest within a virtual environment or running OpenManage on the parent itself?
If you are running Hyper-V then you will need to be running this script on the Hyper-V server. If you are running VMWare and trying to run this script on a Windows VM within, then it will not work.
What is your setup?
Thank you for getting back to me. We have ESXi 4.1 installed with the OpenManage VIB installed on the hyper visor itself. OpenManage works very well. Do you think your script will work with this set up?
Thanks!
No, it won’t work. But I have a Dell server here running EXSi 4.1 I will install it and see what I can put together!
Thanks, I really appreciate it. We need this functionality.