Cameron's profileCameron Fuller’s T2R2PhotosBlogLists Tools Help

Blog


    October 25

    How to forward an Alert to an email address within the OpsMgr console

    How to forward an Alert to an email address within the OpsMgr console

     

    Want a quick way to forward alerts in the OpsMgr console to someone in your organization via email? I created a small MP that contains an alert task which forwards the alert name and description to an email address that you specify (it prompts you for the address).

     

    The management pack is available for download at: http://systemcenterforum.org/wp-content/uploads/AlertForward.zip

     

    To configure this management pack, import the management pack and then make a copy of the email_alert.vbs script to the c:\scripts directory on the system that you want this task to work on. Within this script change the values for the OPSMGREMAIL to the name of the email to send from (example: OpsMgr@abcco.com), and change the SMTPFQDN to the fully qualified name of the smtp server (example: smtp.abcco.com).

     

    To use this task, right-click on an alert and choose Alert Tasks, Forward Alert via Email. The script will prompt you for the name of the email address to forward the alert to.

    In our environment this worked like a champ to forward alerts to people who didn’t have subscriptions but needed to be aware of a specific alert that OpsMgr had created!

    Comments (19)

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.
    Cameron Fuller has turned off comments on this page.
    The ability to right-click and choose this option was removed with SP1 I believe. It sounds like you are right-clicking and choosing forward an alert to a connector which is a different function. For this, highlalert, open the actions pane and it appears under the Alert Tasks with the "Forward Alert via Email" option. Please let me know if I'm misinterpreting your situation!
    May 27
    Hi done this! When I try to forward the alert, i got the following: "a connector used by mom services to insert discovery data,please create your own connector do not use this connector"

    Any idea what I make wrong?
    May 27
    You may want to hold one week on this. Ron's new version (updated heavily to include use of the Outlook client if it's available) will be available on SystemCenterForum by the end of the week.
    June 18
    Picture of Anonymous
    minkus Clarke wrote:
    Ok...so I finally checked out the blog by Ron and i am hitting the same thing although i haven't changed anything.  I will go through his steps to see if I can get it working.
    June 18
    Minkuswrote:
    I've been testing this out with SCOM SP1 and I can't seem to get it working correctly.
     
    When it sends the email all I am getting is the subject as First word in the Alert heading and The Body contains the second word.
     
    for instance, and exchange alert shows Ending backup of the database.  not all data in the file has been read.  My alert is subject Ending with a body of Backup.
     
    Any idea's?
     
     
    June 18
    Nice extension! I'll see if we can get this integrated when we do a next rev!
    Apr. 25
    CHARLIEwrote:
    When you forward an alert, I noticed that there's no field to enter additional comments, which I think would be a nice touch if you wanted to forward the alert to someone and at the beginning of the e-mail, include an optional message. So I dimmed a new variable, oOptionalMessage, and added an additional InputBox. I then added this variable to the sBodyText portion, so that it looks like this:
     
    sBodyText = _
        oOptionalMessage & vbNewLine & vbNewLine & vbNewLine & vbNewLine & _
        oArgs.Item(1) & vbNewLine & vbNewLine & _
        oArgs.Item(2) & vbNewLine & vbNewLine & _
        "The alert occurred: " & oArgs.Item(3) & vbNewLine & vbNewLine & _
        "The severity was: " & oArgs.Item(4)
     
    Only "bad" thing with such a simple modification to the script is that if I don't enter any message, it alert is sent with a few blank lines.
    Apr. 24
    Ron Williams has taken this to the next level/details are availalble on his blog at: http://r0nwilliams.spaces.live.com/blog/cns!62A0019E9E556103!134.entry and an updated version of this management pack is getting ready to be put out for download.
    Mar. 26
    No namewrote:
    Great script, it comes in handy automating ticket creations. I have been looking at the script and by no means am I a great programmer but I am an excellent search engine monkey =)  but where can I find more information regarding the parameters that are being passed to extract the items like source name and path to include it in the email?
    Feb. 28
    Been thinking about it, just haven't had the time to put forth to make that happen. If you want to update the MP and the script just let me know and we'll update the version available for download!
    Dec. 5
    David Clappwrote:
    Okay. That did the trick. Any thoughts on expanding the sBodyText property to include more information like Alert Creation date, Alert resolution state....etc?
     
    sBodyText = oArgs.Item(1)
     
    Nov. 28
    Pete Zerger and the SystemCenterForum have updated the download (available at: http://systemcenterforum.org/wp-content/uploads/AlertForward.zip) to have a SP1 version within it.
    Nov. 28
    No namewrote:
    I see the same thing with my SP1 install. 
    Thanks....
    Nov. 27
    Haven't tried it on RC0 SP1 but I'll put it through a test on one of my environments and see how it reacts. Thanks for the information!
    Nov. 26
    David Clappwrote:
    Well, I got the script to function although it doesn't produce the correct results.  When I right click an Alert and select the Alert Task>Forward Alert via Email it sends an email no problem. However, the content of the email contains the first word in the "name" column as the subject and the second word in the "name" column as the body of the email.  I am currently running SCOM 2007 SP1 RC0.  Any thoughts?
    Nov. 21
    Just checked the code, and it looks like I did update this to work on a workstation. There was a line in the vbs which needed to be commented and was not required for the script to function. Try to re-download it from the link and it should work on a system with the OpsMgr console installed now.
    Nov. 16
    David Clappwrote:
    Was the tweak to this script to enable it to work on a SCOM 2007 console installed on a workstation ever completed?
    Nov. 15
    GhostJump,
     
    It was designed to run on the OpsMgr server/hadn't thought about running it elsewhere but that is the next logical step. In terms of tweaking the vbs script, go for it! I am far from being a coder, this was just a quick script put together to make this possible. Please let me know if you make updates/I'll coordinate with you on how to get it over to SystemCenterForum and get the downloadable version updated.
    Oct. 26

    Nice job, Cameron.

     

    It works like a dream on our SCOM server. But on our clients it doesn’t. We get "ActiveX component Can't Create object: 'MOM.ScriptAPI'".

    I guess we need to have the opsmgr SDK on the clients but how?

    Anyway, do you mind if we try to tweak the email_alert.vbs a little bit?

     

    Best regards

    Thomas Friis Poulsen

    Oct. 26

    Trackbacks

    The trackback URL for this entry is:
    http://cameronfuller.spaces.live.com/blog/cns!A231E4EB0417CB76!1038.trak
    Weblogs that reference this entry
    • None