The purpose of this document is to provide a walkthrough of creating and populating new Asset Types and Data Classes in Altiris that can be used to track and report on asset types that are not included in Altiris right out of the box.
Out of the box, Altiris's Asset Management suite has a wide variety of asset types set up and ready to use, but on occasion, my organization has found that we want to track and report on an asset type that does not currently exist. What I will cover in this article is how to create a custom data class and how to tie it to a custom asset type.
The first step is to decide what information you want to store about your asset. If the type of information you want to track is already contained in an existing data class, by all means, use the one that already exists, but for our example, I am going to create a new data class that will hold data not contained in any of the data classes available right out of the box.
So first of all, what is a data class? Basically it is a storage method for data. Creating a new data class will actually create a new table in your Altiris database with the columns and data types that you provide. To create a new data class, browse to : Configuration > Resource Settings > Data Classes > User Defined. Now right click the User Defined folder and select New > Editable Data Class.
Creating the Data Class
In my example, I am going to create a Blackberry asset type and I want to create my data class to hold possible mobile device plan information. This way I can report back if a mobile device has a data plan, text plan, voice plan, or any combination of the three. So I am going to name my data class "Mobile Plan Types" and I am going to change the Data Entry Tab Name field to "Plan Type". What this is going to do is create a new table in the Altiris database titled "Inv_Mobile_Plan_Types" (Note: Altiris always places an "Inv" at the beginning and turns spaces into underscores). When an asset is pulled up through the Altiris console for editing, the information stored in this data class will be editable by making updates to the Plan Type tab (I will cover this in more detail later)
Now we need to add some attributes for the data we want to store. To do this, click the "Add New Attribute" button. I am going to add three attributes, one for "Data", one for "Text", and one for "Voice". All of them will be Type: Boolean, meaning they will be check boxes where they are either checked or not checked. The only other thing I will change from one attribute to the next is the display order, which I will just set to 1, 2, and 3.
Once you are done, you will have something like this:
At this point, click the "Create" button to create your data class.
A note of caution: Once a data class is created, attributes cannot be removed or updated. Additional attributes can be added, but it is very important to make sure that you have everything exactly how you want it before you click "Create". If you need to change or remove an attribute, you will need to recreate the data class from scratch and any data in the existing data class will be lost.
Creating a New Asset Type
Now we have our data class and we need to create our asset type. This can be done by browsing to: Configuration > Resource Settings > Resource Types > Asset Types. To create a new type, right click on the "Asset Types" folder, or any of the folders under it and select "New > Resource Type".
You will now be presented with a screen where you can name the resource type and assign a different resource type as its base. Assigning a base will make your new type inherit data classes from an existing type. By Default, it inherits from the Resource base type, but I am going to change mine to Asset so I will inherit all the Asset data types automatically.
Now we need to add our Mobile Plan Types class so we can store that type of data for Blackberries. To add your data class, click the "Add Data Class" button and browse through the tree to find your data class and select it. It should be under Configuration > Resource Settings > Data Classes > User Defined > Mobile Plan Types.
Mobile Plan Types will now be listed in your data classes. Data classes can be taken back off by clicking the X that is next to their name after you add them.
Adding New Assets One by One
Our custom data class is now created and our new Blackberry asset type is ready to go. You should now see your new asset type as an option under Resources > Configuration Items > Asset Types. If you placed it in a subfolder, you may have to go one more level down. I place my Blackberry in the IT folder for example.
If you select your new asset type, you will have the option to begin adding them through the right pane of the console. New assets can be created simply by clicking the little yellow star at the top and then filling out the information on the form that comes up.
When creating a new asset, you will see all the normal tabs you would see at the top that were inherited from the "Asset" base type we assigned. In addition to the defaults, you will also see our "Plan Types" tab that was added through our custom data class.
Going to the "Plan Types" tab, you will see that there are three checkboxes, Data, Text, and Voice. These were created by the Boolean fields we assigned in our data class creation.
Now all Blackberries will have an entry in the Inv_Mobile_Plan_Types table when they are created, with a value for each check box stored.
Adding New Assets through Connector Solution
In addition to creating Blackberry assets manually, if you have a large number of assets to create, you now have the option of creating them through a connector solution import job. Connector Solution jobs can be setup and run by going to Configuration > Server Settings > Notification Server Infrastructure > Data Replication. To import data we need two things. First we need a data source. For this example, I will use a Tab delimited TXT file with some Blackberry records in it. My TXT was created in Excel and looks like this:
So to create a new data source, I would right click the Data Sources folder and select New > CSV File Data Source. I will then give my data source a name, select that I want to allow imports, and point it to my TXT file.
Once you have everything set up, it is a good idea to click "Test Data Source" and then "Display import data..." to make sure everything is formatted as you would expect.
The second thing we need is an Import Rule to tell Altiris what to do with the data. To create a new import rule, right click the "Import/Export Rules" folder and select New > Resource Import Export Rule. I tend to use the same name for the rule as I used for the data source just to make sure I always know which source belongs to which rule. Next, select your data source, select the replication direction as "Import", and select your new Asset Type (Blackberry in my case) from the "Resource Type" drop down. Make sure you have the "Allow resource creation" box checked.
Next we need to set up our column mappings and associations. I will be using the serial number as the resource lookup key. Fill in all the data class mappings and association mappings that you are interested in using. Mine looks like this:
Once you are ready, you can test your rule and then run it. You will see your import as it progresses and once it is complete you will see a screen like this one:
Once complete, browse back to your new asset type under Resources and you will see that you now have it populated with all the records from your import.
This is extremely helpful when you are pulling data in from another system, or when you have a large number of assets in another database or spreadsheet that you want to get in without having to enter them one at a time.
As you can see, with a combination of custom asset types and custom data classes, Altiris can track and report on just about anything.
I hope you have found this helpful!