SCOM enhanced email notification script V2.1

Hi
I have tested this scripts and it works great. But when I get alerts from network monitoring some informastion is missing. Does anyone know how to add "Full Path Name" and "Description" from Entity Properties. For Network Port monitor
"Full Path Name" display name/scom portname and description display information like Ethernet1/31.
Please advice
Jon

email notification script V2.1 is using powershell get-alert
you may use
$alert=Get-Alert-Id$alertID
$alert.description: Description
$alert.MonitoringObjectPath: Full Path Name
Roger

Similar Messages

  • Email Notification Script is Not Working in Windows Server 2012..

    Dears
    I have Server 2012 and I wants to make new task seclude for email notification, while any user is login to the
    server the server will send notification email about user name and IP address for the user, I have script it is working fine in windows 2008 and it is xml file, but the script is not working in 2012 because in task schedule in windows 2008 there is an option
    called send email but in windows 2012 this option is deprecated, I’m using start program to run the script in PowerShell instead of send email and I configured as an
     end-MailMessage
    -From [email protected]
    -Subject "Email Notification"
    -To [email protected]
    -SmtpServer mail.domainName.com
    But when I use this PowerShell I only receive email notification without any name and IP address, kindly I need
    your support and help, I’m using below script.
    <?xml version="1.0" encoding="UTF-16"?>
    < Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
      <RegistrationInfo>
        <Date>2013-11-27T11:16:32.3962177</Date>
        <Author>Company Name\User Name</Author>
        <Description>RDP Login V1</Description>
      </RegistrationInfo>
      <Triggers>
        <EventTrigger>
          <Enabled>true</Enabled>
          <Subscription>&lt;QueryList&gt;&lt;Query Id="0" Path="Security"&gt;&lt;Select Path="Security"&gt;*[System[(EventID=4624)]] and *[EventData[Data[@Name='LogonType'] and (Data=10)]]&lt;/Select&gt;&lt;/Query&gt;&lt;/QueryList&gt;</Subscription>
          <ValueQueries>
            <Value name="IpAddress">Event/EventData/Data[@Name="IpAddress"]</Value>
            <Value name="TargetUserName">Event/EventData/Data[@Name="TargetUserName"]</Value>
          </ValueQueries>
        </EventTrigger>
      </Triggers>
      <Principals>
        <Principal id="Author">
          <UserId>Company Name\User Name</UserId>
          <LogonType>Password</LogonType>
          <RunLevel>HighestAvailable</RunLevel>
        </Principal>
      </Principals>
      <Settings>
        <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
        <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
        <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
        <AllowHardTerminate>true</AllowHardTerminate>
        <StartWhenAvailable>false</StartWhenAvailable>
        <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
        <IdleSettings>
          <StopOnIdleEnd>true</StopOnIdleEnd>
          <RestartOnIdle>false</RestartOnIdle>
        </IdleSettings>
        <AllowStartOnDemand>true</AllowStartOnDemand>
        <Enabled>true</Enabled>
        <Hidden>false</Hidden>
        <RunOnlyIfIdle>false</RunOnlyIfIdle>
        <WakeToRun>false</WakeToRun>
        <ExecutionTimeLimit>P3D</ExecutionTimeLimit>
        <Priority>7</Priority>
      </Settings>
      <Actions Context="Author">
        <SendEmail>
          <Server>Name of the Server.com</Server>
          <Subject>RDP Login V1</Subject>
          <To>Sender Name</To>
          <From>Any Email.com</From>
          <Body>Login Alert on ServerName IP : $(IpAddress)  User: $(TargetUserName). Please take necessary action</Body>
          <HeaderFields />
        </SendEmail>
      </Actions>
    < /Task>

    Dears
    I have Server 2012 and I wants to make new task seclude for email notification, while any user is login to the
    server the server will send notification email about user name and IP address for the user, I have script it is working fine in windows 2008 and it is xml file, but the script is not working in 2012 because in task schedule in windows 2008 there is an option
    called send email but in windows 2012 this option is deprecated, I’m using start program to run the script in PowerShell instead of send email and I configured as an
     end-MailMessage
    -From [email protected]
    -Subject "Email Notification"
    -To [email protected]
    -SmtpServer mail.domainName.com
    But when I use this PowerShell I only receive email notification without any name and IP address, kindly I need
    your support and help, I’m using below script.
    <?xml version="1.0" encoding="UTF-16"?>
    < Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
      <RegistrationInfo>
        <Date>2013-11-27T11:16:32.3962177</Date>
        <Author>Company Name\User Name</Author>
        <Description>RDP Login V1</Description>
      </RegistrationInfo>
      <Triggers>
        <EventTrigger>
          <Enabled>true</Enabled>
          <Subscription>&lt;QueryList&gt;&lt;Query Id="0" Path="Security"&gt;&lt;Select Path="Security"&gt;*[System[(EventID=4624)]] and *[EventData[Data[@Name='LogonType'] and (Data=10)]]&lt;/Select&gt;&lt;/Query&gt;&lt;/QueryList&gt;</Subscription>
          <ValueQueries>
            <Value name="IpAddress">Event/EventData/Data[@Name="IpAddress"]</Value>
            <Value name="TargetUserName">Event/EventData/Data[@Name="TargetUserName"]</Value>
          </ValueQueries>
        </EventTrigger>
      </Triggers>
      <Principals>
        <Principal id="Author">
          <UserId>Company Name\User Name</UserId>
          <LogonType>Password</LogonType>
          <RunLevel>HighestAvailable</RunLevel>
        </Principal>
      </Principals>
      <Settings>
        <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
        <DisallowStartIfOnBatteries>true</DisallowStartIfOnBatteries>
        <StopIfGoingOnBatteries>true</StopIfGoingOnBatteries>
        <AllowHardTerminate>true</AllowHardTerminate>
        <StartWhenAvailable>false</StartWhenAvailable>
        <RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable>
        <IdleSettings>
          <StopOnIdleEnd>true</StopOnIdleEnd>
          <RestartOnIdle>false</RestartOnIdle>
        </IdleSettings>
        <AllowStartOnDemand>true</AllowStartOnDemand>
        <Enabled>true</Enabled>
        <Hidden>false</Hidden>
        <RunOnlyIfIdle>false</RunOnlyIfIdle>
        <WakeToRun>false</WakeToRun>
        <ExecutionTimeLimit>P3D</ExecutionTimeLimit>
        <Priority>7</Priority>
      </Settings>
      <Actions Context="Author">
        <SendEmail>
          <Server>Name of the Server.com</Server>
          <Subject>RDP Login V1</Subject>
          <To>Sender Name</To>
          <From>Any Email.com</From>
          <Body>Login Alert on ServerName IP : $(IpAddress)  User: $(TargetUserName). Please take necessary action</Body>
          <HeaderFields />
        </SendEmail>
      </Actions>
    < /Task>

  • Offlineimap "New Email" notification scripts

    I recently started using offlineimap/mutt to keep track of three email accounts. I wanted notifications when new email arrived so I tried some notification programs that worked with Maildir but didn't find any that I liked. So I came up with this script:
    #!/bin/sh
    MAILDIR1=$HOME/Email/maildir1/INBOX/new
    MAILDIR2=$HOME/Email/maildir2/INBOX/new
    MAILDIR3=$HOME/Email/maildir3/Inbox/new
    echo "Watching $MAILDIR1"
    while MAILNAME1=$(inotifywait -qe MOVED_TO --format '%f' $MAILDIR1)
    do
    echo $MAILNAME1
    mailpop $MAILDIR1/$MAILNAME1
    done&
    echo "Watching $MAILDIR2"
    while MAILNAME2=$(inotifywait -qe MOVED_TO --format '%f' $MAILDIR2)
    do
    echo $MAILNAME2
    mailpop $MAILDIR2/$MAILNAME2
    done&
    echo "Watching $MAILDIR3"
    while MAILNAME3=$(inotifywait -qe MOVED_TO --format '%f' $MAILDIR3)
    do
    echo $MAILNAME3
    mailpop $MAILDIR3/$MAILNAME3
    done
    I modified a script for procmail notifications I found here http://miek.nl/posts/2008/Jun/09/a-popu … rocmailrc/ for nicely formatted notifications and added two lines to speak the notification as well.
    mailpop
    #!/bin/bash
    # popup a small notification with 'notify-send'
    from=`formail -X From: < $1`
    sub=`formail -X Subject: < $1`
    # tweaks < > are special
    from=${from//</\(}
    from=${from//>/\)}
    from=${from//&/\.}
    sub=${sub//</\(}
    sub=${sub//>/\)}
    sub=${sub//&/\.}
    sub=${sub:0:200}
    from=${from:0:75}
    TM=2000
    /usr/bin/notify-send -u normal -t $TM "$from" "$sub"
    while pgrep speech2 > /dev/null; do sleep 1; done
    speech2 New Email ${from%(*}, With $sub, has arrived
    #echo "New Email $from, With $sub has arrived" | festival --tts
    At first I used festival for speech, but Google's voice sounded so much better. This script will speak up to 100 characters, just requires mplayer:
    speech2
    #!/bin/bash
    say() { local IFS=+;/usr/bin/mplayer -ao alsa -really-quiet -noconsolecontrols "http://translate.google.com/translate_tts?tl=en&q=$*"; }
    say $*
    For messages with longer subjects: http://danfountain.com/2013/03/raspberr … to-speech/
    Anyone else have a script/program they like for maildir notifications? Also I would be interested in making these work as a systemd user service.

    For any other i3 users, jasonwryan script works great with i3status and i3bar useing the example from i3status manual:
    i3status | while :
    do
    read line
    echo "Email: $(eml) | $line" || exit 1
    done
    Edit: This is better, works with colors:
    i3status | (read line && echo $line && read line && echo $line && while :
    do
    read line
    dat=$(eml)
    dat="[{ \"full_text\": \"Email: ${dat}\" },"
    echo "${line/[/$dat}" || exit 1
    done)
    Last edited by kristopher004 (2015-03-01 18:19:00)

  • Email notification setup using scripts

    Hi,
    Anybody knows email notification setup using script.
    I want setup space monitoring alerts through scripts.

    http://usalug.com/phpBB3/viewtopic.php?t=9752
    http://www.cyberciti.biz/tips/howto-write-perl-script-to-monitor-disk-space.html
    http://bash.cyberciti.biz/monitoring/shell-script-monitor-unix-linux-diskspace/
    http://www.cyberciti.biz/tips/shell-script-to-watch-the-disk-space.html
    Use these links for code and edit for your case.
    Thanks

  • Approval Email Notification needs to be sent by scripting

    Hi
    We have a requirement - when one particular Rfx approver presses the approve button , one email notification needs to be sent to some particular email ID .
    Is it possible by scripting ? Can anyone help me with the code ?
    Regards
    Sudipta
    Edited by: Sudipta62 on Nov 14, 2011 3:39 PM

    Hi,
    Refer this thread for bean script email code!
    Re: Issue with JAVA Mail API
    Regards,
    Uday

  • SCOM Add Timezone to Email Notification

    Hello,
    Is it possible, and if so, how, can I add the Timezone parameter within the SCOM Email notification body?
    Thanks.

    To add time zone to email notification, you can refer below link
    http://blogs.technet.com/b/kevinholman/archive/2008/10/12/creating-granular-alert-notifications-rule-by-rule-monitor-by-monitor.aspx
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question, please click "Mark As Answer"
    Mai Ali | My blog: Technical

  • Java Script error in email sent using extended email notification

    We are implementing the extended email notifications for workflow.  We have the workflows being sent to Lotus Notes.  However, when we open the email, we receive the message 'A JavaScript error was encountered while loading a page.  Error on line 35: CallError: window.attachEvent is not a function'.  We are running ECC 5.0.  We get the error in both Lotus Notes 7 and Lotus Notes 8.  If we continue loading the page, the message and attachments are there and we are able to launch the workflow without any problems.  I have searched the OSS Notes, but did not find anything regarding this error.  Has anyone experienced this error, and if so, what did you do to fix it?
    Thanks
    Rochelle

    We had it set up for HTML messages.  The HTML messages don't work with Lotus Notes.  Changed to plain text messages and everything is working now.

  • Alert Email notification for Log file alerts

    Hi,
    Scenario: SCOM 2012 R2 UR4.
    There are created unix/linux log file monitoring objects. In SCOM console I can view alerts related to unix/linux log file monitoring. Email notification is: Warning or Critical for severity, and, Medium or High for priority. The alerts for unix/linux log
    file are severity warning and priority medium.
    In my inbox there are emails for alerts (Warning or Critical for severity, and, Medium or High for priority) except for unix/linux monitoring.
    The question is:
    How to enable email notification for unix/linux log file monitoring?
    Thanks in advance!

    Hello,
    If you go into the "Subscription" in the Notifications section of the Operations Console\Administration, you should be able to see the Description of the subscription criteria.  Could you copy paste that in a reply?
    Thanks,
    Kris
    www.operatingquadrant.com

  • Email notification was sent out twice

    I created two jobs using DBMS_SCHEDULER.CREATE_JOB. The first job was to update the table and the second job was to check the status of the first job in dba_scheduler_job_run_details. I also add email notification on the second job by using DBMS_SCHEDULER.ADD_JOB_EMAIL_NOTIFICATION which sends the email to myself. The problem was the email notification was sent to me twice everytime when I do that. My script is as the follows.
    DBMS_SCHEDULER.ADD_JOB_EMAIL_NOTIFICATION (
    job_name => 'KUDSJ_ENOT_ADBD_ENDPROC'
    ,recipients => '[email protected]'
    ,sender => '[email protected]'
    ,subject => 'Company Schedule Job - %job_owner%.%job_name% - %event_type%'
    ,body => '%event_type% occurred at %event_timestamp%. %error_message%'
    ,events => 'JOB_SUCCEEDED');
    DBMS_SCHEDULER.SET_ATTRIBUTE(
    'KUDSJ_ENOT_ADBD_ENDPROC', 'logging_level', DBMS_SCHEDULER.LOGGING_FULL);
    I am not sure where the problem is. Please help. Thanks.
    cy

    You meant that I should set recipients to null when I do the remove_job_email_notification. I did drop_job and remove_job_email_notification a couple of times already. Could you tell me more specific? Thanks.
    This is what I did.
    DBMS_SCHEDULER.DROP_JOB(job_name => 'KUDSJ_ENOT_ADB_XXXXX');
    DBMS_SCHEDULER.REMOVE_JOB_EMAIL_NOTIFICATION(job_name => 'KUDSJ_ENOT_ADB_XXXXX', events => 'JOB_STARTED, JOB_SUCCEEDED');
    cy

  • Email notifications from Verification and Validation routines

    I am trying to generate an email notification after we run a Verification or Validation routine once we make some changes in the DRM? Is it possibe? If so how can it be implemented and what versions of DRM supports the same?

    DRM does not suppor this feature. Nowhere in the documentation does this exist. If you want to do it on demand you have 2 options:
    1) use mdm-connect to run the verification/validation process saving the output to a file and write a script to take the file and mail it
    or
    2) create a custom API workflow process
    Those are your options.

  • Email Notifications for Switches and Routers

    Dear All,
    How may I configure switches and routers to send email notifications when link is UP/Down.
    We have Switches - ((C3750-IPBASE-M), Version 12.2(25)SEB4) & Routers - (C2900-UNIVERSALK9-M), Version 15.1(4)M3.
    Thanks in Advance,
    Best Regards,
    Taufeeq.

    You can use EEM scrip to achieve the same. Just check EEM scripting in the community directory for some examples.
    Regards,
    Sathvik 

  • Variable to get instance failure error message in Email Notification

    Hi All,
    I  send email notifications on insatnce failure of Scheduled reports by configuring notification option in CMC.
    I would like to send the Error message for insatnce failure in the message content.
    Is there any way to achieve this ?Any dynamic system variable like %SI_STARTTIME%  available for this  ?
    I am looking for error message as we see when click status in Instance History of a report.
    "Error Message: The date for the prompt 'Enter Issue Start Date:' is invalid. (WIS 10706)  "
    Thanks in Advance
    Bilahari

    Hi Bilahari,
    It is not possible at present with the product as it stands out of the XI3.1 or BI4.0 to email the error message with the schedule email notification.
    I would suggest that you log this requirement in the SAP Ideas Place:
    Idea Place (https://ideas.sap.com) allows customers to log Enhancement request themselves without the need to contact Support and work more closely with Product Management.
    Here your idea can be evaluated by other customers and voted upon, prior to our Product Group organization deciding on the idea as a possible enhancement.
    I hope this is a very helpful answer to you.
    Kind regards,
    John

  • Email notifications stuck in Mail status

    Hi,
    The notification mailer is up and running and we receive emails when we run the test. However, when a user goes through the application, lets say the Purchase requisition process, the process completes successfully, we see the notification in his worklist, we see the notification in the wf_notifications table with status of MAIL, but the user does not get the email notification. The email address is defined both on the employee record and on the user record. The background process is running but it doesn't pick up the notification. After a while the notification gets expired.
    does anyone have any clue as to why the test notification from the mailer works but we don't get an email when we go thru the requisition process although it completes successfully ?
    Any help is appreciated.
    Regards
    Preeti

    There are various aspects to troubleshooting this issue.
    Let me explain the mailer architecture in a nutshell and then troubleshooting tips.
    1. Notification activity in a workflow process is executed by the engine. The activity makes an entry in WF_NOTIFICATIONS table with appropriate values for RECIPIENT_ROLE, SUBJECT and MAIL_STATUS based on recipient's notification preference.
    2. At the same time, an business event is raised for that notification and enqueued on to the WF_DEFERRED queue.
    3. The Workflow Deferred Agent Listener dequeues the event, builds a XML message for that notification and enqueues it again to WF_NOTIFICATION_OUT queue.
    4. Workflow Notification Mailer polls the WF_NOTIFICATION_OUT queue and when a message arrives, it dequeues it, parses the XML for that notification and builds a MIME message. Sends the MIME message to the intended recipient_role's e-mail address.
    In summary the message for e-mail goes like this...
    Ntf Activity -> WF_DEFERRED -> WF_NOTIFICATION_OUT -> Notification Mailer Now things to check.
    1. Is the Deferred Agent Listener or Deferred Notification Agent Listener running?
    2. Is the Notification Mailer running with Correlation ID parameter set to null? Because the mailer could be configured to only process e-mail notifications from a specific Item Type.
    3. Is the intended RECIPIENT_ROLE's e-mail address and notification_preference values in WF_ROLES view correct? The email address should be valid and notification preference should be MAIL%.
    There is a debug script $FND_TOP/sql/wfmlrdbg.sql. Run this for the given notification id and you will be able to see in which queue the message is stuck.
    Hope this helps.

  • Email notification or remedy ticket creation if BI services fails

    Hi All,
    we are using OBIEE 10.1.3.4.X version as our production instance.
    we want to set up email notification for a group if any of the BI services fails ( presentation services, Javahost service, Scheduler service etc ). We have 2 unix servers where we check the current status of above services.
    Can anybody provide me information to do the same in Unix. I heard like we can write Unix script and that can be placed in Unix box to meet above requirement. Was any body faced similar issue, any body have successfully implemented to your projects.
    How will you get notified if you are suing obiee 10g in your projects
    Please let me know your thoughts.
    Regards,
    Yuva

    Hi ..
    Above mentioned weblinks gives information on OBIEE 11g. We are using OBIEE10g.
    It would be helpful, if anybody provides information on getting email notification if any of BI services fails. I guess, as all the BI services are maintained by Unixbox, we need to write Unix script for the same.
    Thanks and Regards,
    Yuva

  • Email notification User Input property

      I have query results from service request as part of user input into Service Request and processing them in Orchestrator.
      As a part of email notification, I would like to display the same query results as part of body of email notification.
      Query results are displayed as part of User Input in Service Request
      In email notification I am able to display all fields of service requests except User Input maybe because its inturn a XML value.
      Any suggestion to come across this ?
    Shahid Roofi

    I am assuming that you are sending the email notification as HTML, in that case the "User Input" will be filtered as it starts with < and ends with > (HTML notification will filter the context between <...>)
    You have to use a PS script in Orchestrator to get the query results only from the "User Input" without all the junk info between <...> then return that using Published Data tab so you will be able to use it in the runbook activities such
    as the email activity.
    Do you have a working example of how to do what you describe?  I am trying to accomplish the same thing and having alot of difficulty coming up with a proper solution.  Any help is appreciated!

Maybe you are looking for