Tuesday, July 13, 2010

Extended Attributes Sensor

When using TADDM, you will probably come across a case where you want to extract information which TADDM does not do out of the box.

For example, you want to record the date on which the antivirus was last updated on each server.

The extended attributes feature enables you to add a field to those TADDM recognizes. The Custom Server option enables you to run OS commands and scripts and populate them.


However, writing a script that extracts the data can be time consuming – this isn’t what we want to be doing. Populating the extended attributes is also a bit more complex than populating regular ones.

Fortunately, there are a number of shortcuts. The DeveloperWorks TADDM wiki has a sensor which will read a config file, create the extended attributes and populate them when TADDM discovers the relevant computer. All you need to do is enter the attribute name and the registry key (or WMI object, etc…) in the config file.

Extended Attributes Sensor and Tools

I used it today and when it runs, it’s a big timesaver.

However, I did have to tweak a few things for it to run on TADDM 7.2FP1 on Windows. In case this helps you, here is what I did:

  • in the file ea_cli.bat, I changed the line
    @../support/bin/jython_coll.bat ea_cli.jy %*
    @../support/bin/jython_coll.bat ea_cli.jy %*
  • in the file sensorhelper.py, I changed the line
    from com.ibm.cdb.platform.ip import IpUtils
    from com.ibm.cdb.platform.ip import IPv4Utils
  • in the file ext_attr_db.py, I changed the line
    from com.ibm.cdb.topomgr.util import JdbcConnectionFactory
    from com.collation.topomgr.util import JdbcConnectionFactory

Without the first change, nothing works. The second and third changes are because I got the error “ImportError: no module named ” when I ran the script.

Another useful sensor is this generic sensor.

-- Robert

No comments: