In that case I’d probably do the
sorting in a script (in fact that’s exactly what I do). In my case
I use the lookup for notifications among different departments. The file
is a two column table:
Hostname1 E_MAIL_GROUP@hq.corp.org
Hostname2 E_MAIL_GROUP@hq.dept.gov
Etc.
The code for a lookup is simple:
Argument=${1}
Result=`grep –i
${Argument} ListOfHostsAndGroups | awk `{ print $2 }’`
if [ “${Result}”
–ne “” ]
then
echo “Message text” | mail –s “Notification from NV”
${Result}
fI
It’s also easier to maintain than a
Smartset although not as automatic. If you do want to do the SmartSet
stuff for automatic name classification you can create your mailing file with a
paragraph like this for each Smartset:
for Item in `nvUtil l
SmartSetName1 `
do
echo ${Item} E_MAIL_GROUP@hq.corp.org
>>ListOfHostsAndGroups
done
for Item in `nvUtil l
SmartSetName2 `
do
echo ${Item} E_MAIL_GROUP@hq.dept.gov
>>ListOfHostsAndGroups
done
You can even run it in a cron job if you
delete the file first. (By the way that’s a lower case “ell”
after nvUtil. Warning: this code has not been tested in this exact
form. Bugs may be present.
Bill Evans
Tivoli NetView
Support for DOE
301-903-0057
-----Original Message-----
From: owner-nv-l@lists.us.ibm.com
[mailto:owner-nv-l@lists.us.ibm.com] On Behalf Of Glen Warn
Sent: Thursday, April 21, 2005
2:43 PM
To: nv-l@lists.us.ibm.com
Subject: RE: [nv-l] Ruleset
problem with Netview 7.1.4 running RedHat Linu x AS 2.1
Hi Bill,
Thanks for your
reply. I was hoping to use the smartset because we manage networks for
several companies and I was looking forward to highlighting the nodes I wanted
to apply these rules to from a handful of submaps and adding them to the
smartset. Since the only criteria (I think) that I want to distiniquish
on is the hostname - should I stay the course of the smartset?
Glen Warn
PEMCO Corporation Computer Services
(PCCS)
glen.warn@pemcocorp.com
206-628-5770