I hope you are well, I am looking to automate the manual process we currently carry out by mapping AWS instances to a location.
My initial thought was to use Instance Region / Instance Availability Zone, and map that to a location via a Business adapter.
However in the Business Adapter - I don't think this field is exposable from what I can tell?
Any thoughts are welcome 🙂
Jul 25, 2022 02:56 AM
@bmaudlin - Data that appears on the Cloud Service Provider Inventory view (imported from AWS and Azure) cannot be linked to a "Location".
However, once an AWS/Azure instance has been linked to a live Inventory Device, you could then use the Instance Region to assign a Location to the linked Inventory Device.
Jul 25, 2022 12:09 PM
That's an interesting challenge. On the assumption that your source data includes an AWS instance ID & region, I can't think of a straightforward way to use the business adapter data model to do that.
This could probably be done using a direct SQL query in a business adapter if you're running FlexNet Manager Suite on premises. You would need to look up a cloud instance record using the instance ID, join to the related computer (inventory device) record and then update the location on the computer record.
This is untested (i.e. treat is a pseudo-code rather than actual code), but it might look something like:
UPDATE cc SET LocationID = <some expression identifying the location based on source.AWSRegion> FROM #ECMImport_YourImportName source JOIN dbo.CloudServiceInstance csi ON csi.InstanceCloudID = source.InstanceCloudID JOIN dbo.ComplianceComputer cc ON cc.ComplianceComputerID = csi.ComplianceComputerID
Jul 25, 2022 10:25 PM
A similar direct sql query that @ChrisG mentioned is what we use to set the device location once we determine what needs to be set. The business adapter uses an excel workbook as a data source.
Our solution involves some Excel pre-work that identifies all of the ec2 instance ID's, cross references the instanceID to the device serial number (could also use ComplianceComputerID), and determines if the LocationID is already set and set correctly. Devices already set correctly are filtered out. We then save the filtered list of devices requiring an update in a location picked up by the business adapter.
We run this same process to set Location, Account, CorpUnit, Hosted In, Role, and Status for all of our ec2 instances. It's not exactly pretty but it runs daily as a scheduled task without human intervention.
Jul 26, 2022 01:22 PM
@bmaudlin - You can try using the new REPORT REST API to extract the data needed for a Business Adapter.
1) Create a new Custom Report.
2) Start with the Cloud Instance object to pull the columns you want that appear on the Cloud Service Provider Inventory view.
3) You can then add the Inventory Device object and include the computer name and serial number.
4) Verify the report and Save it.
You can then use the REPORT REST API to pull the results of this report, convert to CSV and use an import file to a Business Adapter to update the Location of the Inventory Device that is linked to a Cloud Instance.
Jul 28, 2022 10:50 AM