Custom Discovery Template

This article contains the following topics:

To import assets from the discovery tools that Serviceaide Intelligent Service Management does not support, use the custom template. The custom template is downloaded when you install the Asset Discovery Manager. The custom template is divided into the following sections:

  • Data Source - This section specifies the connection properties to connect the discovery tools database. Do not modify this section, the parameters for this section are defined using the Discovery Configuration UI.
  • Output Settings - This section indicates the path where the output files are stored. Do not modify this section, the parameters for this section are defined using the Discovery Configuration UI.
  • Asset Query – Modify the asset query section as appropriate. This section fetches the list of asset attributes in the following order:
    • General Properties
    • Hardware Properties
    • Software Properties

Prerequisites

Ensure that you have complete knowledge of your discovery tools database schema. The custom template connects to  your discovery tools database and extracts the data.

Follow these steps:

  1. Navigate to the <install drive>\Program Files\CA\AssetConnector\Connector\conf\config and double-click the CustomTemplate.xml.
  2. Make a copy of this file and specify a different name for it. For example, DiscoveryTemplate.xml
  3. Modify the general query by supplying a value to the query attribute of the general tag. This operation fetches the required general properties. For example, <general query="">.

  4. Modify the asset query by supplying a value to the query attribute of the asset tag. This operation fetches the required asset IDs.
    Note: For more information about how to write the queries, see  Map and Extract Data with Query and Value Attributes (Database) and Extract Data Using Annotations (Database).
  5. Save the discovery template file.
  6. Copy the custom discovery template to the config folder by navigating to <Asset Connector install path>\Connector\conf\config.

Map and Extract Data with Query and Value Attributes Database

The following data-related tags specify how to process and retrieve the template file and data. These tags consist of query and value attributes.

  • query attribute in any tag consists of a valid SQL query. 
    The asset tag is the root tag for an asset. The asset tag contains a query, listing the unique asset IDs from the target database. An XML file is created for each unique asset ID that is contained in the result set of the query. All subsequent tags under the asset tag either have a query or value attribute referencing another tag. At runtime, the attributes receive runtime values from the tags they reference. For example, if a general tag query uses asset ID extracted in an asset tag query. The query attribute of the general tag contains an annotation referencing the asset tag. The general tag for each asset ID query changes based on the asset ID. 
  • The value attribute of the tags referencing some other tag is similar to the previous example.
  • The following attributes are supported:

    DiskSpace

    DnsNameHostnameModel

    Ipv4Address

    MacAddressOperatingSystemProcessorArch

    ProcessorCount

    ProcessorNameHostedServerProcessorSpeed

    ProcessorCoreCount

    DiskUsedSpaceTotalMemorySlotsUsedMemorySlots

    SerialNumber

    InstalledSoftware

Extract Data Using Annotations Database

You can use annotations in the template file to extract data. The annotations are typically used in query or value tags. You can derive any field in the input XML using direct values or annotated values.

  • Annotated values: If the query or value contains textwithincurlybrackets({}), it is an annotated value.
  • Constant values: For example, <host_name value="myHostName"/>. Each host_name tag in the final output XML files is set to "myHostName".You can group annotations into a relative annotation path and an absolute annotation path.

Example: Use a Relative Annotation Path 
When the annotation is processed, the XML assigns the value of the ProcCount column to No. of Processors. The column value is derived using the query in the group name System tag. The generated XML has the No. of Processors value. To derive the No. of Processor value, query the database using the query attribute of the Group Name System tag. The value is directly relative to the parent tag query.

<asset query="select AssetID from Computer" translator="ACBsFmt" version="1_0"> 
<general> 
... 
</general> 
<hardware> 
<group name="GeneralInventory"> 
<group name="System" query="select p.ProcCount from Computer c where 
c.AssetID = {asset.AssetID}"> 
<attribute name="No. of Processors" type="string" 
value="{group(name='System').ProcCount}"/> 
 </group> 
</group> 
</hardware> 
 ... 
</asset> 

ExampleUse an Absolute Annotation Path

<asset query="select AssetID from Computer" translator="ACBsFmt" version="1_0"> 
<general> 
... 
</general> 
<hardware> 
<group name="GeneralInventory"> 
<group name="System" query="select p.ProcCount from Computer c where 
c.AssetID = {asset.AssetID}"> 
<attribute name="No. of Processors" type="string" 
value="{asset:hardware:group(name='GeneralInventory'):group(name='System'
).ProcCount}"/> 
</group> 
</group> 
</hardware> 
... 
</asset>

Configuring the Custom Discovery Template

The Discovery Asset Discovery Manager uses custom discovery template to import the assets that third-party discovery tool discovers. When the next job is scheduled, the assets are imported into the Intelligent Service Management Repository.  

Follow these steps:

  1. Log in to Intelligent Service Management as an Administrator.
  2. Click MANAGE> ADMINISTRATION> Tools> Asset, and Asset Discovery Configurations. The asset discovery tab is displayed.
  3. Click New Configuration.
  4. Select Other Discovered Sources from the Discovery Type drop-down list.
  5. Select Other from the Discovery Source drop-down list.
  6. Specify the name of the Custom Discovery Template. If the name of your template file name is customdiscoverytemplate.xml, specify the same name in the Custom Discovery Template field.
  7. Specify the Database Host Name of the other discovered source. 
  8. Specify the Database Name of the other discovered source.
  9. Specify Database PortUser Name, and the Password, of the other discovered source.
    NoteIntelligent Service Management currently supports third-party discovery tools running on SQL Server only.
  10. Set the recurrence schedule by specify the following values.
    Start date/time: Specify the time at which the scan is scheduled to start.
    End date/time: Specify the time at which the scan ends.
    Repeat on: Specify the time at which the scan must be repeated.
  11. Click Save.       

© 2019 Serviceaide 1-650-206-8988 http://www.serviceaide.com info@serviceaide.com