Jump to content

Asset Import from Certero


Recommended Posts

I'm trying to test an asset import configuration from Certero and am wondering why certain values refuse to update into Hornbill.

Even though configured, the following attributes are not populating (even though data is present when I run the "Expand" query directly against Certero):

  • h_external_id
  • h_memory_info
  • h_max_memory_capacity

... and none of the Software Inventory is loaded at all.

My test config looks as follows:

{
    "KeysafeKeyID": 22,
    "LogSizeBytes": 1000000,
    "HornbillUserIDColumn": "h_attrib8",
    "SourceConfig": {
        "Source": "certero",
        "Certero": {
            "Expand": "ComputerSystemInventory($expand=OperatingSystem,ADUser($select=AccountName,LastLogonTimestamp)),ComputerSystemProcessorInfo,Object($select=LocationId,Status;$expand=Location,FieldDataItems($expand=Field)),AppleSystemSystemInfo,AppleSystemPhysicalMemoryArray,AppleSystemApplications($expand=AppleApplication),WindowsSystemBio,WindowsSystemPhysicalMemoryArray,WindowsSystemSystemEnclosure,WindowsSystemSoftwareProducts($expand=SoftwareProduct)"
        }
    },
    "AssetTypes": [
	{
        "AssetType": "Laptop",
        "OperationType": "Both",
        "PreserveShared": false,
        "Query": "contains(ComputerSystemInventory/Manufacturer, 'Apple') and ComputerSystemInventory/ComputerName eq 'LONML11744'",
        "AssetIdentifier": {
            "SourceColumn": "{{.ComputerSystemInventory.ComputerName}}",
            "Entity": "AssetsComputer",
            "EntityColumn": "h_name"
        },
        "SoftwareInventory": {
            "AppIDColumn": "{{.AppleApplication.Name}}",
            "ParentObject": "AppleSystemApplications",
            "Mapping": {
                "h_app_id":"{{.AppleApplication.Name}}",
                "h_app_name": "{{.AppleApplication.Name}}",
                "h_app_vendor":"{{.AppleApplication.Publisher}}",
                "h_app_version":"{{.AppleApplication.Version}}",
				"h_app_install_date": "{{.LastModified}}"
            }
        }
    }],
    "AssetGenericFieldMapping": {
        "h_name": "{{.ComputerSystemInventory.ComputerName}}",
        "h_asset_tag": "{{.ComputerSystemInventory.ComputerName}}",
        "h_description": "From Certero: {{.ComputerSystemInventory.Manufacturer}} ({{.ComputerSystemInventory.Model}})",
        "h_used_by": "{{if .ComputerSystemInventory.ADUser}}{{.ComputerSystemInventory.ADUser.AccountName}}{{else}}{{.ComputerSystemInventory.Username}}{{end}}",
        "h_room": "{{index (index .Object.FieldDataItems 4) \"Value\"}}",
        "h_external_id": "{{.ComputerSystemObjectId}}",
        "h_external_source": "Certero"
    },
    "AssetTypeFieldMapping": {
        "h_name": "{{.ComputerSystemInventory.ComputerName}}",
        "h_model": "{{.ComputerSystemInventory.Model}}",
        "h_manufacturer": "{{.ComputerSystemInventory.Manufacturer}}",
        "h_description": "From Certero: {{.ComputerSystemInventory.Manufacturer}} ({{.ComputerSystemInventory.Model}})",
        "h_serial_number": "{{if .WindowsSystemBio}}{{.WindowsSystemBio.SerialNumber}}{{else}}{{.AppleSystemSystemInfo.SerialNumber}}{{end}}",
        "h_mac_address": "{{.ComputerSystemInventory.MacAddress}}",
        "h_net_ip_address": "{{.ComputerSystemInventory.IpAddress}}",
        "h_net_computer_name": "{{.ComputerSystemInventory.ComputerName}}",
        "h_subnet_mask": "{{.ComputerSystemInventory.SubnetMask}}",
        "h_os_description": "{{.ComputerSystemInventory.OperatingSystem.Caption}}",
        "h_os_version": "{{.ComputerSystemInventory.OperatingSystem.VersionString}}",
        "h_cpu_info": "{{.ComputerSystemProcessorInfo.Model}}",
        "h_cpu_clock_speed": "{{.ComputerSystemProcessorInfo.ClockSpeed}}",
        "h_physical_cores": "{{.ComputerSystemProcessorInfo.Cores}}",
        "h_memory_info": "{{if .WindowsSystemPhysicalMemoryArray}}{{.WindowsSystemPhysicalMemoryArray.TotalMemory}}{{else}}{{.AppleSystemPhysicalMemoryArray.TotalMemory}}{{end}}",
        "h_max_memory_capacity": "{{.WindowsSystemPhysicalMemoryArray.MaxCapacity}}",
        "h_last_logged_on_user": "{{if .ComputerSystemInventory.ADUser}}{{.ComputerSystemInventory.ADUser.AccountName}}{{else}}{{.ComputerSystemInventory.Username}}{{end}}",
        "h_last_logged_on": "{{if .ComputerSystemInventory.ADUser}}{{.ComputerSystemInventory.ADUser.LastLogonTimestamp}}{{end}}"
    }
}

 

Link to comment
Share on other sites

  • 3 weeks later...

Just to followup on this, I tried to synchronise the asset status from Certero, however the import utility is completely ignoring that field as well.

It almost appears to be ignoring any integer fields in the source data.

Also, the import utility completely ignores the software inventory for Apple devices, even though the configuration is nearly identical to the Windows configuration.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...