KeyServer's computer database has many values related to hardware properties. Most of these are populated using various APIs and lookups on the client. In addition, KeyServer has 10 custom text fields which can be used for whatever values you want to add to the computers table. Each field holds a maximum of 63 bytes. These values can either be populated on each client computer (in registry or plist) or via KeyConfigure. Also note the Asset ID fields that are implemented in a similar way but serve a specific purpose.
In order to use custom computer columns, you must first define labels for them. Right-click in the column header of the Computers window and select "Define Columns...". This will bring up the Custom Computer Columns dialog, which has 10 text fields. Once you have entered one or more labels, you can see these Custom values either in the Custom pane of Computer Details, or by Customizing Columns in the Computers window.
The Custom Columns are not displayed in the GUI area of computer filters. However you can make filters using the "Match this Filter" area using usr0 through usr9 as the column names. For more, see the Filters documentation.
KeyAccess 188.8.131.52 and higher will look for local values to be used in custom fields and send them to KeyServer as part of the hardware audit.
Windows KeyAccess looks in the registry in the directory:
for keys assetCustom0, assetCustom1, ... assetCustom9. These keys can contain a text value which will be sent to KeyServer, or they can use special syntax to specify that KeyAccess should look in a different registry key or environment variable for the value to send to KeyServer.
%foo% GetEnvironmentVariable - i.e. any system environment variable can be populated by name like %windir% (not that you'd use that) <path> GetRegistryValue - i.e. point to the registry key who's value you want to useFor example, to get the description of the first cpu:
Mac KeyAccess looks for the same property names in:
So one way to set these values on a Mac is using the command line:
sudo defaults write /Library/Preferences/com.sassafras.KeyAccess assetCustom0 my_value
On Mac as well, you can specify that KeyAccess should look in a different plist for the string value that will ultimately be sent to KeyServer (this functionality was added in KeyAccess 184.108.40.206). For example, to specify that the first Remote Desktop “info” field should be used for the first KeyServer custom hardware field, do this:
sudo defaults write /Library/Preferences/com.sassafras.KeyAccess assetCustom0 "@com.apple.remotedesktop:Text1@"
This special syntax must start and end with the @ character, and contain the id of the application followed by a colon and the name of the property to be read from the plist.
If you want to avoid running defaults write on your clients, you can also customize the ksp-client installer using k2clientconfig to write these preferences during an install. For example, to use the Remote Desktop info fields as the first four custom computer fields, you would do:
./k2clientconfig -v assetCustom0firstname.lastname@example.org:Text1@ -v assetCustom1email@example.com:Text2@ -v assetCustom2firstname.lastname@example.org:Text3@ -v assetCustom3email@example.com:Text4@ ksp-client.pkg
Whenever a value is found on the client, this is sent to KeyServer, and overwrites whatever value is already in the KeyServer database for this computer.
In the Custom pane of a Computer Details window, you can edit/enter/save text values manually. Note though that if a value is discovered on a client, this will overwrite anything that has been manually entered. Generally, you will either populate values on clients, or populate them manually in KeyConfigure - not both.
Custom columns can also be imported to KeyConfigure from a text file. For details on how to do this, read the blog post on Importing Data to Computer Asset fields.