nv-l
[Top] [All Lists]

Re: [nv-l] event History

To: nv-l@lists.tivoli.com
Subject: Re: [nv-l] event History
From: "Scott Bursik" <tivoliesm@hotmail.com>
Date: Mon, 11 Feb 2002 13:09:07 -0600

I think this will help you out. Thanks to Jennifer Nelson for this! This will add Monitor->Events->Current Events and Monitor->Events->Event History to the UI.

Scott

################## Start /usr/OV/registration/C/list_traps.reg ###################

/* Menu addition to list all traps received for a certain device.
   Jennifer Nelson, Tivoli Services
   December 6, 2000
*/

Application 'Trap Customization'
{
    Description {
        "Window to list all traps received for a device"
    }

   
    MenuBar "Monitor"
    {
      <92> "Display Latest Traps..." _D f.action dis_latesttraps;
      <91> "Display Archived Traps..." _A f.action dis_archtraps;
    }

/******* Popups ***/

    Menu 'P_Monitor'
    {
      <92> "Display Latest Traps..." _D f.action dis_latesttraps;
      <91> "Display Archived Traps..." _A f.action dis_archtraps;
    }

  
/*****Actions*****/

    Action dis_latesttraps  {
        MinSelected  1;
        MaxSelected  1;
        SelectionRule   ( isNode ) ;
        Command ' \
                /usr/OV/bin/xnmappmon \
                -commandTitle \" Trap List \" \
                -geometry 900x600                    \
                -cmd /usr/OV/scripts/listtraps latest';
    }

    Action dis_archtraps  {
        MinSelected  1;
        MaxSelected  1;
        SelectionRule   ( isNode ) ;
        Command ' \
                /usr/OV/bin/xnmappmon \
                -commandTitle \" Trap List \" \
                -geometry 900x600                    \
                -cmd /usr/OV/scripts/listtraps archived';
    }

}

################## End /usr/OV/registration/C/list_traps.reg ###################

################## Start /usr/OV/scripts/listtraps ###########################

#!/bin/ksh

# This script will grep through a trapd.log file for a certain
# node and display all matching up/down/marginal traps for it.
# This script is called by the NetView registration file
# /usr/OV/registration/C/list_traps.reg.
#
# Jennifer Nelson, Tivoli Services
# December 6, 2000

if [[ $1 = latest ]]; then
   logfile=/usr/OV/log/trapd.log
elif [[ $1 = archived ]]; then
   logfile=/usr/OV/log/trapd.log.old
else
   echo " Error determining log file to use.  Exiting."
   exit 1
fi

if [[ ! -s $logfile ]]; then
   echo " No data available."
   exit 2
fi

startdate=`head -1 $logfile | awk '{ print $3, $4, $5, $6, $7 }'`
echo " ***** Trap listing for: $OVwSelection1 since $startdate. *****"
echo
grep $OVwSelection1 $logfile | grep -iE "up|down|marginal" | tail -n 100

exit 0

################## End /usr/OV/scripts/listtraps ###########################




Scott Bursik
Pepsico Business Solutions Group
scott.bursik@pbsg.com
>From: "D'Apice, Dominic"
>To: "'nv-l@lists.tivoli.com'"
>Subject: [nv-l] event History
>Date: Mon, 11 Feb 2002 12:14:34 -0500
>
>
>Hi, how can a tell Netview in event History, that i would like the events
>since 8 days ago in loop ?
>
>Thank
>
> > Dominic D'Apice
> > Technicien informatique (OGEINF)
> > D.D'Apice@saq.qc.ca
> >
> >
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: nv-l-unsubscribe@lists.tivoli.com
>For additional commands, e-mail: nv-l-help@lists.tivoli.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)
>


Get your FREE download of MSN Explorer at http://explorer.msn.com.
<Prev in Thread] Current Thread [Next in Thread>

Archive operated by Skills 1st Ltd

See also: The NetView Web