nv-l

RE: [nv-l] Migrating smartset from one netview to another...

2003-03-13 02:59:43
Subject: RE: [nv-l] Migrating smartset from one netview to another...
From: bernard.baudoux AT fortisbank DOT com
To: "'nv-l AT lists.tivoli DOT com'" <nv-l AT lists.tivoli DOT com>
Date: Thu, 13 Mar 2003 08:47:13 +0100
Dominic,

it is not very difficult to write scripts to retrieve smartsets defs and 
restore them.   I had written those scripts a while ago just to make sure I can 
always restore any smartset def if case of "disaster".

Here they are if you are interested in (they're written in perl).   The first 
one dumps the smartsets defs, the second one restore them (or just one og them 
if passed as argument) :

########## beginning of first script ##################
#!/usr/local/bin/perl -w

@ListSmartsets = `/usr/OV/bin/nvUtil L`;

foreach $smartset (@ListSmartsets)
 {
   chomp($smartset);
   `/usr/OV/bin/nvUtil g $smartset > ./cfg/$smartset`;
 }
########## end of first script ##################

########## beginning of second script ##################
#!/usr/local/bin/perl -w

if (defined($ARGV[0]))
  { 
    $cnt = 0;
    foreach $smartset (@ARGV)
      {
       $ListSmartsets[$cnt] = './cfg/' . $smartset . "\n";
       $cnt++;
      }
  }
 else
  { @ListSmartsets = `ls ./cfg/*` }

foreach $item (@ListSmartsets)
 {
  chomp($item);
  @Config = `cat $item`;
  foreach $cfg (@Config)
   {
    chomp($cfg);
    $pos = index($cfg, 'SmartSet:');
    if ($pos != -1)
      {
        $name = substr($cfg, $pos+10);
      }
    $pos = index($cfg, 'Description:');
    if ($pos != -1)
      {
        $descr = substr($cfg, $pos+13);
      }
    $pos = index($cfg, 'Rule:');
    if ($pos != -1)
      {
        $rule =  substr($cfg, $pos+6);
      }
   }
  `/usr/OV/bin/nvUtil a \"$name\" \"$descr\" \"$rule\"`;
 }
########## end of second script ##################


Have fun!
Bernard Baudoux.
4932 Application Networking / Network Management
Telecommunication / 1GA2H
Fortis Banque
Tel : +32 (0)2 565 24 68
Fax : +32 (0)2 228 83 69
bernard.baudoux AT fortisbank DOT com




> -----Original Message-----
> From: James Shanks [SMTP:jshanks AT us.ibm DOT com]
> Sent: mercredi 12 mars 2003 19:19
> To:   nv-l AT lists.tivoli DOT com
> Subject:      RE: [nv-l] Migrating smartset from one netview to another...
> 
> My 7.1.3 system (with FP1) shows colmaint with a date of Sept. 9, 2002 so 
> we are still shipping it.  I cannot say whether it will always remain (in 
> NetView Version 7.2 or 8 or whatever is next), but having shipped in 7.1, 
> it must remain a part of all 7.1 iterations.
> 
> As an alternative, you could use nvUtil to do the same job only you'd 
> probably have to write a script to do it, so it's not as easy.  But 
> "nvUtil G" will list all your smartsets and rules on one system.  Then you 
> could use "nvUtil a <name> <description> <rule>" on the new one to create 
> it there.  See the man page on nvUtil.
> For complex rules the create is a bit tricky.  If the names or 
> descriptions have spaces in them, then they must be enclosed in quotes. 
> Rules should always be enclosed in quotes, so if your rule has internal 
> quotes, then you will need to escape them so that the shell won't object.
> 
> It's not as hard as it looks.  I listed my Smartsets and then created 
> similar ones with "nvUtil a"  until I got the hang of it. 
> 
> I am not advocating that colmaint be dropped in favor of this nvUtil 
> method, I am only pointing out that it works.  So theoretically your could 
> create your own migration utility if you are so inclined.   Do I think 
> NetView should provide one, if and when, colmaint goes away?  Sure.   But 
> that's another issue.
> 
> Hope this helps 
> 
> 
> James Shanks
> Level 3 Support  for Tivoli NetView for UNIX and NT
> Tivoli Software / IBM Software Group
> 
> 
> 
> 
> "Helder Garcia" <helder AT vanguard-it.com DOT br>
> 03/12/2003 04:42 PM
> 
>  
>         To:     "'NetView mailing list'" <nv-l AT lists.tivoli DOT com>
>         cc: 
>         Subject:        RE: [nv-l] Migrating smartset from one netview to 
> another...
> 
> 
> 
> This command is deprecated. Now, for Smartsets functions you use nvUtil.> 
> But it does not have this feature (dump the smartsets).
> Even this, "colmaint" was coming in the distributions. But I could not
> find it in my Netview 7.1.3 (RH8). I cannot check again right now to be
> sure, this was a time ago.
> Am I wrong? If not, anybody knows an alternative?
> 
> --
> Helder Garcia
> Systems Engineer
> VANguard - Value Added Network guardians
> http://www.vanguard-it.com.br
> 
> 
> -----Original Message-----
> From: Jane Curry [mailto:jane.curry AT skills-1st.co DOT uk] 
> Sent: Wednesday, March 12, 2003 1:56 PM
> To: D'Apice, Dominic; NetView mailing list
> Subject: Re: [nv-l] Migrating smartset from one netview to another...
> 
> colmain -d to dump your SmartSets.  colmaint -l to load.
> Cheers,
> Jane
> 
> D'Apice, Dominic wrote:
> 
> >Hi, NV 7.1 on Aix,
> >
> >There exist a way to migrate the whole smartsets from one netview to
> another
> >? or there exist a file like location.conf that a can copy ? or i need
> to
> >recreate manuelly...
> >
> >
> >Thanks
> >
> >Dominic D'Apice
> >* D.D'Apice AT saq.qc DOT ca
> >
> >
> >---------------------------------------------------------------------
> >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)
> >
> >
> >
> > 
> >
> 
> -- 
> Tivoli Certified Consultant & Instructor
> Skills 1st Limited, 2 Cedar Chase, Taplow, Bucks, SL6 0EU, UK
> Tel: +44 (0)1628 782565
> Copyright (c) 2003 Jane Curry <jane.curry AT skills-1st.co DOT uk>.  All 
> rights
> reserved.
> 
> 
> 
> ---------------------------------------------------------------------
> 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)
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.461 / Virus Database: 260 - Release Date: 3/10/2003
>  
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.461 / Virus Database: 260 - Release Date: 3/10/2003
>  
> 
> 
> ---------------------------------------------------------------------
> 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)


This email and any attached files are confidential and may be legally 
privileged.
If you are not the intended recipient, any disclosure, reproduction, 
copying, distribution, or other dissemination or use of this communication 
is strictly prohibited.  
If you have received this transmission in error please notify the sender 
immediately and then delete this email.
Email transmission cannot be guaranteed to be secure or error free as 
information could be intercepted, corrupted, lost, destroyed, arrive late or 
incomplete, or contain viruses.  
The sender therefore is in no way liable for any errors or omissions in the 
content of this message, which may arise as a result of email transmission. 
If verification is required, please request a hard copy.



<<application/ms-tnef>>

---------------------------------------------------------------------
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)