Script: Notification Logfile

I have seen a number of questions regarding notification log on the root management server (RMS). Unfortunately this is not a standard function, instead you have to look in the logfile of the mailserver, if it is SMTP notification. But there is a lot of operations manager administrators who don´t have access to the mailserver or the SMTP logfiles. I have written a script to show you a solution to this, a script that will create a local notification logfile on the RMS.



Recipient – Configure your recipients with a notification device that use this channel. When you setup the notification channel, you input a name, use this as channel for the notification device. Input the recipient e-mail address as delivery address for the selected channel.

Notifiation Channel – Setup a new command notification channel. This is the settings I use in my lab

Notification command channel name: VBLogFile
Full path to file: c:\windows\system32\cmd.exe
Command line parameters: /c C:\send_mail.vbs “$Data/Context/DataItem/AlertName$” “$Data/Context/DataItem/ManagedEntityPath$\$Data/Context/DataItem
/ManagedEntityDisplayName$” “$Data/Context/DataItem/AlertDescription$” “$Data/Context/DataItem/LastModifiedBy$” “$Data/Context/DataItem/Severity$” “$Data/Context/DataItem/Priority$” “$Data/Context/DataItem/ResolutionStateName$” “$Data/Recipients/To/Address/Address$”
Intial directory: C:\

Note that all Ops Mgr parameters are between ” “, else the script will not work if the parameter includes a blank space. With my example settings the script has to be C:\send_mail.vbs and the logfile will be created in the same directory.

The script , send_mail.vbs, will get a number of parameters from the command notification channel. It will then translate severity and priority into words and send the mail. After that it output some data variables to the logfile, psmgr_notification_logfile.txt.

You should change strFROM and strSMTP. strFROM is the sender e-mail address and strSMTP is the FQDN of your mailserver.

You can download the script here.

If you want to add more parameters, there are a lot of them at Kevin Holman’s webpage, here.

2 thoughts on “Script: Notification Logfile

Comments are closed.