gcpdiag/lint/gce/bp_2024_001_legacy_monitoring_agent.py [78:109]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        report.add_failed(
            i,
            '',
            LEGACY_AGENT_DETECTED,
        )
        legacy_agent_found = True
        break
    if not legacy_agent_found:
      report.add_ok(i, LEGACY_AGENT_NOT_DETECTED)

  query = _query_results_project_id[context.project_id]
  try:
    vms_agents = {
        e['labels']['resource.instance_id']: e['labels']['metric.version']
        for e in query.values()
    }
  except KeyError:
    for i in instances_without_osinventory:
      report.add_skipped(
          i,
          UNABLE_TO_DETECT_EXPLANATION,
          UNABLE_TO_DETECT,
      )
    return

  for i in sorted(
      instances_without_osinventory,
      key=op.attrgetter('project_id', 'name'),
  ):
    if i.is_gke_node():
      continue
    if i.id in vms_agents:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



gcpdiag/lint/gce/bp_2024_002_legacy_logging_agent.py [78:108]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        report.add_failed(
            i,
            '',
            LEGACY_AGENT_DETECTED,
        )
        legacy_agent_found = True
        break
    if not legacy_agent_found:
      report.add_ok(i, LEGACY_AGENT_NOT_DETECTED)
  query = _query_results_project_id[context.project_id]
  try:
    vms_agents = {
        e['labels']['resource.instance_id']: e['labels']['metric.version']
        for e in query.values()
    }
  except KeyError:
    for i in instances_without_osinventory:
      report.add_skipped(
          i,
          UNABLE_TO_DETECT_EXPLANATION,
          UNABLE_TO_DETECT,
      )
    return

  for i in sorted(
      instances_without_osinventory,
      key=op.attrgetter('project_id', 'name'),
  ):
    if i.is_gke_node():
      continue
    if i.id in vms_agents:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



