<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Emailing alerts in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/emailing-alerts/m-p/2986529#M923302</link>
    <description>Something like the following will work:&lt;BR /&gt;&lt;BR /&gt;#!/path/to/your/perl&lt;BR /&gt;&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;&lt;BR /&gt;  if (/ORA-/) {&lt;BR /&gt;    open  $ML, "|/usr/bin/mailx -s 'ORACLE Alert' user@domain.com";&lt;BR /&gt;    print $ML $_;&lt;BR /&gt;    close $ML;&lt;BR /&gt;  }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Call it as:&lt;BR /&gt;&lt;BR /&gt;tail -f /path/to/oracle.log | perlscript.pl</description>
    <pubDate>Mon, 02 Jun 2003 17:04:43 GMT</pubDate>
    <dc:creator>Bill Douglass</dc:creator>
    <dc:date>2003-06-02T17:04:43Z</dc:date>
    <item>
      <title>Emailing alerts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/emailing-alerts/m-p/2986525#M923298</link>
      <description>Hello, &lt;BR /&gt;&lt;BR /&gt;     I'm trying to set up a background job that would email me when the alert.log received an error msg.  I've been trying to use tail -f |grep 'ORA-' but it appears the 'mail' command only works when an EOF is issued.  So I never get emails until the process is terminated.  I didn't want to have a process run each minute or so and email me the last 10-20 lines of the alert.log because on slow periods the alert.log might not grow enough.  Does anyone have any suggestions?&lt;BR /&gt;&lt;BR /&gt;thanks</description>
      <pubDate>Mon, 02 Jun 2003 14:07:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/emailing-alerts/m-p/2986525#M923298</guid>
      <dc:creator>Brian Gebhard_1</dc:creator>
      <dc:date>2003-06-02T14:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Emailing alerts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/emailing-alerts/m-p/2986526#M923299</link>
      <description>Hi,&lt;BR /&gt;You could write a script which &lt;BR /&gt;1) touch toto&lt;BR /&gt;2)does a tail ora.log&amp;gt;titi then compares titi with the previous toto and if different send you via email and renames titi to toto...&lt;BR /&gt;Then you execute your script as a cron job&lt;BR /&gt;&lt;BR /&gt;All the best&lt;BR /&gt;Victor</description>
      <pubDate>Mon, 02 Jun 2003 14:21:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/emailing-alerts/m-p/2986526#M923299</guid>
      <dc:creator>Victor BERRIDGE</dc:creator>
      <dc:date>2003-06-02T14:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Emailing alerts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/emailing-alerts/m-p/2986527#M923300</link>
      <description>hi, &lt;BR /&gt;&lt;BR /&gt;I use the following:&lt;BR /&gt;&lt;BR /&gt;Filename: alerts.ksh (attached)&lt;BR /&gt;Description: Automatic monitoring of the production database's ALERT LOG file for exceptions. &lt;BR /&gt;&lt;BR /&gt;Running it as the Oracle User, reschedules daily execution of script - morning, evening and night everyday (uses at) &lt;BR /&gt;&lt;BR /&gt;Makes monitoring of the Alert log easy task! &lt;BR /&gt;&lt;BR /&gt;Hope this helps! &lt;BR /&gt;&lt;BR /&gt;Best Regards &lt;BR /&gt;Yogeeraj &lt;BR /&gt;&lt;BR /&gt;PS. Don't forget to modify lines: &lt;BR /&gt;a. DBA1='myname@mymailserver.mu' &lt;BR /&gt;b. SID=pfs &lt;BR /&gt;&lt;BR /&gt;to suit your own enviroment</description>
      <pubDate>Mon, 02 Jun 2003 15:28:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/emailing-alerts/m-p/2986527#M923300</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2003-06-02T15:28:11Z</dc:date>
    </item>
    <item>
      <title>Re: Emailing alerts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/emailing-alerts/m-p/2986528#M923301</link>
      <description>Well thank you both but it's not exactly what I'm looking for.  I'm trying to set something up that notifies me the moment the ORA- is written to the alert_$SID.log.  Both solutions are based on a cron job interval time.  Granted I could set up a cron job to run each minute but I was hoping there's a way to use tail of some other function to email me instead of displaying the information on the terminal like tail -f does.  &lt;BR /&gt;&lt;BR /&gt;tail f- $ORACLE_BASE/admin/$SID/bdump/alert_$SID.log |grep 'ORA-'&lt;BR /&gt;&lt;BR /&gt;This just displays any new lines in the alert.log to my screen.  It won't go to the email until I terminate the process.  So I believe 'mail' looks for a EOF character before it sends the msg.  At the moment I'm using the alert oracheck.run script that compes with the statspack.  This is based on a job interval also.</description>
      <pubDate>Mon, 02 Jun 2003 16:06:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/emailing-alerts/m-p/2986528#M923301</guid>
      <dc:creator>Brian Gebhard_1</dc:creator>
      <dc:date>2003-06-02T16:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: Emailing alerts</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/emailing-alerts/m-p/2986529#M923302</link>
      <description>Something like the following will work:&lt;BR /&gt;&lt;BR /&gt;#!/path/to/your/perl&lt;BR /&gt;&lt;BR /&gt;while (&amp;lt;&amp;gt;) {&lt;BR /&gt;&lt;BR /&gt;  if (/ORA-/) {&lt;BR /&gt;    open  $ML, "|/usr/bin/mailx -s 'ORACLE Alert' user@domain.com";&lt;BR /&gt;    print $ML $_;&lt;BR /&gt;    close $ML;&lt;BR /&gt;  }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Call it as:&lt;BR /&gt;&lt;BR /&gt;tail -f /path/to/oracle.log | perlscript.pl</description>
      <pubDate>Mon, 02 Jun 2003 17:04:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/emailing-alerts/m-p/2986529#M923302</guid>
      <dc:creator>Bill Douglass</dc:creator>
      <dc:date>2003-06-02T17:04:43Z</dc:date>
    </item>
  </channel>
</rss>

