Blade ZipKit Package Info
Name: Rename All Invalid Components
Type: NSH Script
BSA Compatible Version: 8.3.x
More Info: n/a
Created by: Richard.firstname.lastname@example.org
Tested version on: AppServer version 8.3.03
Tested against host running: n/a
Brief Description –
This NSH Script loops through all component template groups and checks for templates; if a template is found it will loop through the associated components and check whether the Component.Name property has the proper target listed in the name. The need for this script was born out of servers being renamed within BladeLogic after previous discoveries were carried out. Renaming a server in BladeLogic does not update the name of associated component objects unless the object is deleted and discovery is re-run. We required a method to maintain the history of those objects as we’ve come across cases where new servers were added using names that existed previously (now renamed) but the component names still existed and discovery would fail to create new objects because of the existing component. This script does not require any input parameters as we grab all the information we need via BLCLI.
The script will use NSH & BLCLI and loop through each component template group for the found paths and names looking for templates, if found loop through all components associated to the template by parsing out servernames from the Component.Name and Component.Target properties, test for a non-match, if the condition is true, we update the Component.Name property with the Component.Target servername. If the condition is false, we validate the component as current.
Package Modified: 06-19-2014 --Cleaned up the output so the job run log isn't flooded with messages. Will only output if a change is made now.
Instructions for importing the package:
- Download the attached zip file to your PC.
- Extract the zip file (will only contain an NSH script)
- Add the NSH Script to your depot as a Type 1 NSH Script
- Save the depot item
- Create an NSH Script Job out of the depot item
- Set the Target to one of your AppServers
- Execute at will
**Note: This is an enhancement to this package (Blade ZipKit – Rename Invalid Components)
*Note: This is a community-supported package.