On Windows or UNIX? These are different products and they have different
requirements. When you ask a question it always helps to tell the
audience what platform, and what NetView release your are working with.
On Windows there is the nvmail command, which is documented in the
Programmer's Reference. You need to have a mail server set up for this
to work.
On UNIX you use the operating systems' built-in facilities, such as
sendmail and mailx to get the job done. See the man pages on them if you
need to.
In either case, you configure the trap (Trap Settings in Windows, xnmtrap
in UNIX) to run the command, or a script you have written which issues it,
as a command an automatic action.
Here's a Window's example, for a NetView trap. $2 contains the hostname,
$3 the event log message for a NetView trap.
nvmail -server ferrari.raleigh.tivoli.com -recipient
jshanks AT us.ibm DOT com -subject "test node up" -message " $2 $3 "
Here's a UNIX example:
/myscripts/send_email " $2 $3"
send_email:
#!/bin/ksh
#
# The purpose of this script is to
# send an e-mail after some processing
#
# We use sed to remove the escape characters in the hostname
# which is always in varbind 2 of a NetView trap
# set -x
host=`echo $2 | sed -n "s:\\\\\\::gp" `
echo $host
echo "Alert $host $3 " | /usr/bin/mailx -s "$host $3"
shanks AT us.tivoli DOT com
exit
#
These illustrate the technique. You will have to modify them to suit your
environment.
Hope this helps
James Shanks
Level 3 Support for Tivoli NetView for UNIX and NT
Tivoli Software / IBM Software Group
"Mithun Prakash Prabhu" <Mithun_Prabhu AT infosys DOT com>
01/28/2003 12:17 AM
To: <nv-l AT lists.tivoli DOT com>
cc:
Subject: [nv-l] NV 713: Any idea of Emailing through Netview??
Hi,
Can anyone tell me whats the best way to send Emails auto generated via
Netview. I mean whenever an event or trap is generated whats the best way
to send it as a Email to the concerned Mail ids. Please let me know where
can I find more information on the same.
Regards,
Mithun Prabhu
System Engineer, ITO
Infosys Technologies Limited
Direct:080-4175689
Fax : 852 0362
Home: www.infosys.com
---------------------------------------------------------------------
To unsubscribe, e-mail: nv-l-unsubscribe AT lists.tivoli DOT com
For additional commands, e-mail: nv-l-help AT lists.tivoli DOT com
*NOTE*
This is not an Offical Tivoli Support forum. If you need immediate
assistance from Tivoli please call the IBM Tivoli Software Group
help line at 1-800-TIVOLI8(848-6548)
---------------------------------------------------------------------
To unsubscribe, e-mail: nv-l-unsubscribe AT lists.tivoli DOT com
For additional commands, e-mail: nv-l-help AT lists.tivoli DOT com
*NOTE*
This is not an Offical Tivoli Support forum. If you need immediate
assistance from Tivoli please call the IBM Tivoli Software Group
help line at 1-800-TIVOLI8(848-6548)
|