in aws_advanced_python_wrapper/host_monitoring_plugin.py [0:0]
def _get_monitoring_host_info(self) -> HostInfo:
if self._monitoring_host_info is None:
current_host_info = self._plugin_service.current_host_info
if current_host_info is None:
raise AwsWrapperError("HostMonitoringPlugin.HostInfoNone")
self._monitoring_host_info = current_host_info
rds_type = self._rds_utils.identify_rds_type(self._monitoring_host_info.url)
try:
if rds_type.is_rds_cluster:
logger.debug("HostMonitoringPlugin.ClusterEndpointHostInfo")
self._monitoring_host_info = self._plugin_service.identify_connection()
if self._monitoring_host_info is None:
raise AwsWrapperError(
Messages.get_formatted(
"HostMonitoringPlugin.UnableToIdentifyConnection",
current_host_info.host,
self._plugin_service.host_list_provider))
self._plugin_service.fill_aliases(host_info=self._monitoring_host_info)
except Exception as e:
message = "HostMonitoringPlugin.ErrorIdentifyingConnection"
logger.debug(message, e)
raise AwsWrapperError(Messages.get_formatted(message, e)) from e
return self._monitoring_host_info