-
Notifications
You must be signed in to change notification settings - Fork 2
Setting AdminInfo on a ComputerSystem
In many cases, customers that are deploying TADDM start with a Spreadsheet mapping the Admin owner to Computer Systems. While TADDM can go automatically discover the ComputerSystems, it is then necessary to manually add the AdminInfo. In order to illustrate how this can be done using Jython and the Command Line the script 'admin_info.jy' was created. The next section describe how it can be used:
admin_info_72.jy for TADDM 7.2 has just been added. Be sure to download the correct version for you TADDM version!
The AdminInfo is essentially a container for Contacts. You must have created the 'Contacts' already. If there are many contacts, this could be automated as well. Manually, this is done through the GUI under the Edit:Contacts... Menu.
Manually, you then must create an AdminInfo Object with the objGuid set to the ComputerSystem GUID (or any Guid) where there is an AdminInfo object you care about. You must set AdminContact to the 'Contact Name' for the valid contact.
However, the attached script, admin_info.jy or admin_info_72.jy shows how this can be done in Jython from the command line.
usage: script_name [options]
or: script_name [options] -c ContactName -n displayName
Set the AdminInfo on a ComputerSystem object.
Options:
-u userid User required to login to TADDM Server
Defaults to 'administrator'
-p password Password for TADDM Server user
Defaults to 'collation'
-h print this message
Arguments:
-c ContactName Contact Name (Must already exist)
-n display name ComputerSystem display name you want
to set ContactName as the Admin
Place this script in a directory called 'custom' under the $COLLATION_HOME/dist directory.
You can run it as:
[taddm@grtvmw17 custom]$ ./admin_info_1.jy -n grtvmw13.grt.aus
Current Contact: Scott Graham
Please pass a contact name to set a new one...
[taddm@grtvmw17 custom]$ ./admin_info_1.jy -n grtvmw13.grt.aus -c "Scott Graham"
Current Contact: Scott Graham
Length of ContactInfo: 1
Scott Graham Found...
Set contact on grtvmw13.grt.aus to Scott Graham
./admin_info.jy -n computersystem_displayname
This will show you what the current AdminInfo is set to.
./admin_info.jy -n computersystem_displayname -c "contact name"
Will try to set the AdminInfo to the 'contact name". It won't work if 'contact name' isn't already a contact.
If you want to fill in more of AdminInfo, you can do that in the this section of the code:
def createAdminInfo(guid,contact_name,api):
new_AI = sensorhelper.newModelObject("com.collation.platform.model.topology.admin.AdminInfo")
new_AI.setObjGuid(guid)
new_AI.setAdminContact(str(contact_name))
api.update(new_AI,None)
This is just an example of how this can be done and has not been thoroughly tested. I would test and ensure it works in customer environment before attempting to use it for all ComputerSystems in an environment.
Best Practices
Sensors
- Supported Target Systems
- Generic Server Sensor (lsof)
- Enhanced CPU Discovery
- Discovering Batch Jobs
- Duplicate Reducer
- VMware Instance Extention
- RHEL Cluster Discovery
- Collecting certs with nmap
- MQ Discovery
- Windows Discovery
- Oracle Discovery
- IIS Discovery
- Ping Sensor
- Collect Config Files Recursively
- Shallow Server Discovery
- Host Storage Sensor