Notifications

230 views

Description

Pre-requisites


Plugins activated: Cloud API, Cloud Management Core

Unix Classification contains "Linux" classifier

Linux classifier triggers "Linux - Amazon EC2" Probe which is processed by sensor of the same name. Make sure the conditions script is met: gs.getProperty('glide.discovery.discover_aws_ec2_host_metadata') == 'true'

This Script Include is present: DiscoveryAWSRelationshipSensor 

Discovery log message: 

Warning Host hosted on cloud environment has been detected, but no matched cloud object found DiscoveryAWSRelationshipSensor 

The AWS accountid was being parsed by the "Linux - AWS relationship" sensor and passed as "000123456789" to the "DiscoveryAWSRelationshipSensor" script include function getServiceAccountSysId
 
When this function tries to query for "000123456789" in the service accounts AWS Account ID it failed as it was "0001-2345-6789" format. After I changed to "000123456789" it created the " Virtualized by::Virtualizes" relationship between the Linux server CI and the AWS vm instance. 
 
Lines 43 - 49: 
========================================================================= 
function getServiceAccoutSysId(glideUtil, accountId){ 
var serviceAccountSysId = null; 
var serviceAccountGlideRecord = glideUtil.getGlideRecordByAttribute('cmdb_ci_cloud_service_account','account_id',accountId); 
if(serviceAccountGlideRecord.next()) 
serviceAccountSysId = serviceAccountGlideRecord.getUniqueValue() + ''; 
return serviceAccountSysId; 
========================================================================= 

 

Article Information

Last Updated:2019-08-02 21:12:30
Published:2019-02-20