Running commands to populate the Common Data Model

You can run commands on a target system to populate attributes in the Common Data Model.

For example, assume you have written a custom server template, called postfix, for the postfix mail transfer agent. You want to use the TADDM SDK to extract software information about all postfix installations so you can plan upgrades accordingly, but you notice that productVersion is not in the output.

You can extend the custom server template to capture this information. The postconf command outputs the mail_version string, and the third field of this line contains the version information for postfix. Therefore, you can use the following command to extract the version string:

$ postconf | awk '/^mail_version/ {print $3}'

To have TADDM run the command, create a directive file stored in $COLLATION_HOME/etc/templates/commands/postfix containing the following line:

CMD:productVersion=/usr/sbin/postconf |awk '/^mail_version/ {print $3}'
Note: Populating an attribute in the Common Data Model does not make it appear in the Details pane of the component, in the Discovery Management Console. The attribute is, however, stored in the database and can be retrieved using the TADDM SDK. To have the attribute appear in the user interface, use a configuration file extension, as described in the section on running commands to create a custom configuration file.
  • An attribute in the Common Data Model, populated by a Custom Server Extension, is displayed in the Discovery Management Console only if the Discovery Management Console has been designed to display the given attribute.
  • Populating attributes does not change which attributes can be displayed by the Discovery Management Console.
  • Output that is captured by the CMD:CONFCONTENT directives is displayed on the Configuration Files tab in the Discovery Management Console if the target type that is discovered has this tab in the Discovery Management Console.