Create Fields From Facts
Fact2field functionality allows users to define which Breeze facts Cloudaware must convert to fields on Force.com objects. Cloudaware will try to propagate fields containing caFact_ prefix with a matching Breeze fact. For example, if you create caFact_uptimehours field, Cloudaware will try to find uptime_hours fact and use its value. SUPPORTED FOR OBJECTS: AWS EC2 Instance Fact, AWS EKS Cluster Fact, Azure Virtual Machine Fact, Azure VM Scale Set Instance Fact, Azure AKS Cluster Fact, Google GCE Instance Fact, VCenter Virtual Machine Fact, CloudAware Physical Server Fact.
A fact Name can be any but should start with caFact_
and be unique across Salesforce objects. The full fact name should also be provided in the Help Text area.
Example:
Name: caFact_userid or caFact_ansibleUserId (field names are not case-insensitive)
Help Text: ansible.user_id
We recommend using any Text type for fact2field fields. Use a maximum length of 255 for Text/Text Area:
caFact fields are not refreshed simultaneously when a field is added. To populate caFact fields, wait for any update action on the fact object OR use the instruction below.
NB. caFact fields should be created on AWS EC2 Instance, Azure VM, Physical Server etc objects.
Mass Update Execution
Log in to your Cloudaware account. Open the main menu → Developer Console → Debug → Open Execute Anonymous Window → type the query like
Update [SELECT Id from CA10__CaAwsInstanceFact__c WHERE Name like '%upgr%'];
where CA10__CaAwsInstanceFact__c is API Name of the fact object, Name is the fact attribute that needs to be updated and %upgr% - its value that will be queried. This query will populate facts containing 'upgr' in their Name field on all AWS EC2 Instances.
Query examples:
Update [SELECT Id FROM CA10__CaAwsInstanceFact__c WHERE Name = 'os.release.full'];
Update [SELECT Id FROM CA10__CaAzureVirtualMachineFact__c WHERE Name = 'os.family'];
Update [SELECT Id FROM CA10__CaGoogleGceInstanceFact__c WHERE Name = 'zone'];
Update [SELECT Id FROM CA10_CaPhysicalServerFact__c WHERE Name like '%uptime%'];
Start with using a query without filtering applied. However, if you face Apex CPU or limit exception errors, use the LIMIT/OFFSET clauses (see examples below):
Update [SELECT Id FROM CA10__CaAwsInstanceFact__c WHERE Name = domain LIMIT 1000 OFFSET 0];
Update [SELECT Id FROM CA10__CaAzureVirtualMachineFact__c WHERE Name like '%node_report_timestamp%' LIMIT 1000 OFFSET 1000];
Update [SELECT Id FROM CA10__CaGoogleGceInstanceFact__c WHERE Name = 'project' LIMIT 1000 OFFSET 2000];
Breeze Facts examples:
Linux | Windows |
---|---|
architecture etc. | azure etc. |