Having Diagela use personal notification script instead of group notifications?

Having Diagela use personal notification script instead of group notifications?

Post by Ritch » Sat, 18 May 2002 00:34:50



I've been trying to get diagela to use my notification script instead
of trying to send alerts to certain groups on the machine itself.  We
use Lotus Notes (LN) in-house as our E-mail package and thus the
machines try to send to a group name on LN which doesn't exist, thus
throwing out delivery errors on the LN servers.

I've added the following stanza to the ODM database like the
directions instructed but diagela is still not using my script for
notification.

PDiagAtt:
        DClass = ""
        DSClass = ""
        DType = ""
        attribute = "diag_notify"
        value = "/utilities/diagela.mailer.sh $1 $2 $3 $4 $5"
        rep = "s"

After adding the stanza to ODM, I then disabled and enabled diagela
and created a hardware issue (pulled plug on a redundant power supply)
and diagela still didn't use my script.  My next thought to try would
be to put the diagela.mailer.sh script into /usr/bin.

I'm wondering if anyone has tried this technique with diagela's
notification and have gotten it to work who could point me in the
right direction.  Is there anything I need to uncomment in the diagela
code itself?  Any ideas?  My OS is 4.3.3  I have also tested my mailer
script and it works like I want it.

Thanks in advance for any help,

Ritchie

 
 
 

Having Diagela use personal notification script instead of group notifications?

Post by Ritch » Sun, 19 May 2002 03:34:10


False alarm:  Later that evening, the diagela script did call my
mailer script like I thought it should.  So apparently I was luckily
and got it right after all. I would have thought that the power supply
outage would have called the diagela script.

Thanks


> I've been trying to get diagela to use my notification script instead
> of trying to send alerts to certain groups on the machine itself.  We
> use Lotus Notes (LN) in-house as our E-mail package and thus the
> machines try to send to a group name on LN which doesn't exist, thus
> throwing out delivery errors on the LN servers.

> I've added the following stanza to the ODM database like the
> directions instructed but diagela is still not using my script for
> notification.

> PDiagAtt:
>         DClass = ""
>         DSClass = ""
>         DType = ""
>         attribute = "diag_notify"
>         value = "/utilities/diagela.mailer.sh $1 $2 $3 $4 $5"
>         rep = "s"

> After adding the stanza to ODM, I then disabled and enabled diagela
> and created a hardware issue (pulled plug on a redundant power supply)
> and diagela still didn't use my script.  My next thought to try would
> be to put the diagela.mailer.sh script into /usr/bin.

> I'm wondering if anyone has tried this technique with diagela's
> notification and have gotten it to work who could point me in the
> right direction.  Is there anything I need to uncomment in the diagela
> code itself?  Any ideas?  My OS is 4.3.3  I have also tested my mailer
> script and it works like I want it.

> Thanks in advance for any help,

> Ritchie


 
 
 

Having Diagela use personal notification script instead of group notifications?

Post by Nick Buckle » Sun, 19 May 2002 04:15:55


Hi Ritchie,

I'm pleased that this has worked out for you.

On the other hand, I rather hoped it wouldn't.

The reason being - for which I hope you'll forgive the dubious sentiment in
the previous sentence - is that I am planning to customise Diagela in much
the same way, and I was hoping for hints/tips/horror stories from this
thread !!

I only plan to capture disk-related messages by specifying various DClass,
DSClass and DType entries in my modified PDiagAtt entries.

It seems that your mailer reports on everything - any problems with this
approach ?

Any other useful tips to pass on ?

Cheers,

Nick Buckley,
Senior AIX Administrator,
NCM,
Cardiff,
Wales,
United Kingdom


(Please note: all newsgroup offerings are made in a personal
capacity and in no way are the responsibility of my employer)

p.s. Did you know that "AIX Operating System" is an anagram of "Mega *
partitions" !!!


> False alarm:  Later that evening, the diagela script did call my
> mailer script like I thought it should.  So apparently I was luckily
> and got it right after all. I would have thought that the power supply
> outage would have called the diagela script.

> Thanks




Quote:> > I've been trying to get diagela to use my notification script instead
> > of trying to send alerts to certain groups on the machine itself.  We
> > use Lotus Notes (LN) in-house as our E-mail package and thus the
> > machines try to send to a group name on LN which doesn't exist, thus
> > throwing out delivery errors on the LN servers.

> > I've added the following stanza to the ODM database like the
> > directions instructed but diagela is still not using my script for
> > notification.

> > PDiagAtt:
> >         DClass = ""
> >         DSClass = ""
> >         DType = ""
> >         attribute = "diag_notify"
> >         value = "/utilities/diagela.mailer.sh $1 $2 $3 $4 $5"
> >         rep = "s"

> > After adding the stanza to ODM, I then disabled and enabled diagela
> > and created a hardware issue (pulled plug on a redundant power supply)
> > and diagela still didn't use my script.  My next thought to try would
> > be to put the diagela.mailer.sh script into /usr/bin.

> > I'm wondering if anyone has tried this technique with diagela's
> > notification and have gotten it to work who could point me in the
> > right direction.  Is there anything I need to uncomment in the diagela
> > code itself?  Any ideas?  My OS is 4.3.3  I have also tested my mailer
> > script and it works like I want it.

> > Thanks in advance for any help,

> > Ritchie

 
 
 

1. Code Red notification script

I just read in a German NG that one can use abuse.net to find
out the abuse mail address from an IP address.

So I changed my default.ida; of course you may use it:

#!/usr/bin/perl

my $MAIL = 'PLEASE.CHANGE.LOCAL.MAIL.ADDRESS';
my $FMAIL = 'PLEASE.CHANGE.WORLDWIDE.MAIL.ADDRESS';

use URI::Escape;
use Socket;
use CGI::Carp qw/fatalsToBrowser/;

print <<END;
Content-type: text/html

Code Red?
END

my $r = length join '', <STDIN>;
my $q = $ENV{QUERY_STRING};

$q =~ s/(.{0,70})/> $1\n/gm;

$ENV{HOME} = '/root';

my $hostname = gethostbyaddr inet_aton ($ENV{REMOTE_ADDR}), AF_INET;
open FH, "| /usr/sbin/sendmail -t";

{
 print FH <<EOF;
Subject: CODE RED infection attempt
From: $FMAIL
To: $1
Cc: $MAIL
EOF
else
{
 print FH <<EOF;
Subject: CODE RED infection attempt
From: $FMAIL
To: $MAIL

Notice: Notification failed.
EOF

print FH <<EOF;

One of your customers has tried to infect my server with the
Code Red worm. Could you please inform him/her about the
infection and urge him/her to remove it? A patch for the
exploited security hole is available at http://www.microsoft.com

This message has been sent automatically by a script. Please
help in the fight against that worm. I get one probe of this
worm on my apache every 30 minutes, but there are people
who get much more traffic from it. If you are interested in
this script, just mail me - it is free. It runs on any
apache web server with Perl installed.


Please reply if it hit the wrong address.

Details:

IP address:      $ENV{REMOTE_ADDR}
Hostname:        $hostname
Size of payload: $r

Query string:
$q
EOF
close FH;

$| = 1;
for (1..60*60)
{
 sleep 1;
 print "X";

--
Your password must be at least 18770 characters and cannot repeat any of
your previous 30689 passwords. Please type a different password. Type a
password that meets these requirements in both text boxes. [M$]
(Fix: http://support.microsoft.com/support/kb/articles/q276/3/04.ASP)

2. regexec() and regcomp()

3. ZSH: notification for background jobs inside a script?

4. Any tcpdump how-to??

5. Severity notification script problems

6. kde startup

7. Writing backup-script with Email-Notification

8. Server not closing sockets (Apache 0.6.5)

9. Using Nagios to monitor UPS traps and generate SMS Notifications.

10. AuthGroupFile ignored, /etc/group used instead. Why?

11. Core dump notification.

12. Mail notification under csh on R6000?

13. CDE Mail Notification