Ansible AWX 로그 수집
파서 버전: 1.0
이 문서에서는 Bindplane을 사용하여 Ansible AWX 로그를 Google Security Operations로 수집하는 방법을 설명합니다. Ansible AWX는 Ansible을 위한 사용자 인터페이스, REST API, 태스크 엔진을 제공하는 오픈소스 웹 애플리케이션입니다. 이를 통해 팀은 조직 전체에서 자동화 플레이북, 인벤토리, 사용자 인증 정보, 예약된 작업을 중앙에서 관리할 수 있습니다. 파서는 JSON 형식의 Ansible AWX 로그에서 필드를 추출하고 이러한 값을 통합 데이터 모델(UDM)에 매핑합니다.
시작하기 전에
다음 기본 요건이 충족되었는지 확인합니다.
- Google SecOps 인스턴스
- Windows Server 2016 이상 또는
systemd가 설치된 Linux 호스트 - 프록시 뒤에서 실행하는 경우 Bindplane 에이전트 요구사항에 따라 방화벽 포트가 열려 있는지 확인합니다.
- 관리자 권한으로 Ansible AWX 관리 콘솔에 대한 권한이 있는 액세스 권한
Bindplane 에이전트의 Google SecOps 사용자 인증 정보 가져오기
Google SecOps에 Bindplane 에이전트를 인증하려면 다음 방법 중 하나를 선택합니다.
- 새 배포: Chronicle API를 사용합니다(옵션 1).
- 기존 배포: 2027년 7월 20일에 Ingestion API가 중단될 때까지 데이터 수집 인증 파일(옵션 2)을 계속 사용합니다.
옵션 1: Chronicle API의 서비스 계정 만들기(권장)
- Google Cloud 콘솔에 로그인하고 Google SecOps 인스턴스에 연결된 Google Cloud 프로젝트를 선택합니다.
- IAM 및 관리자 > 서비스 계정으로 이동합니다.
- 서비스 계정 만들기를 클릭합니다.
- 다음 구성 세부정보를 제공합니다.
- 서비스 계정 이름: 계정 이름을 입력합니다(예:
bindplane-ingest). - 서비스 계정 설명: 설명을 입력합니다(예:
Bindplane agent log ingestion).
- 서비스 계정 이름: 계정 이름을 입력합니다(예:
- 만들고 계속하기를 클릭합니다.
- 이 서비스 계정에 프로젝트에 대한 액세스 권한 부여 섹션에서 역할 선택을 클릭하고 Chronicle 편집자를 선택합니다.
- 계속을 클릭한 다음 완료를 클릭합니다.
- 만든 서비스 계정을 클릭한 다음 키 탭으로 이동합니다.
- 키 추가 > 새 키 만들기를 클릭합니다.
- JSON을 선택하고 만들기를 클릭합니다. 키 파일이 컴퓨터에 다운로드됩니다.
- 키 파일을 Bindplane 수집기 디렉터리(Linux의 경우
/opt/observiq-otel-collector/ingestion-auth.json, Windows의 경우C:\Program Files\observIQ OpenTelemetry Collector\ingestion-auth.json)에ingestion-auth.json로 저장하거나config.yaml의creds_file_path를 업데이트하여 저장한 경로와 일치시킵니다. - IAM 및 관리자 > 설정으로 이동하여 프로젝트 번호를 복사합니다. 내보내기 도구 구성에 필요합니다.
옵션 2: 데이터 수집 인증 파일 다운로드(기존)
- Google SecOps 콘솔에 로그인합니다.
- 설정 > 데이터 관리 > 수집 에이전트로 이동합니다. SIEM 전용 플랫폼을 사용하는 경우 설정 > 수집 에이전트로 이동합니다.
- 데이터 수집 인증 파일을 다운로드합니다.
- Bindplane 에이전트가 설치될 시스템에 파일을 안전하게 저장합니다.
Google SecOps 고객 ID 가져오기
- Google SecOps 콘솔에 로그인합니다.
- 설정 > 관리 > 프로필로 이동합니다. SIEM 전용 플랫폼을 사용하는 경우 설정 > 프로필로 이동합니다.
- 조직 세부정보 섹션에서 고객 ID를 복사하여 저장합니다.
Bindplane 에이전트 설치
다음 안내에 따라 Windows 또는 Linux 운영체제에 Bindplane 에이전트를 설치합니다.
Windows 설치
- 관리자 권한으로 명령 프롬프트 또는 PowerShell을 엽니다.
다음 명령어를 실행합니다.
msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
Linux 설치
- 루트 또는 sudo 권한으로 터미널을 엽니다.
다음 명령어를 실행합니다.
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
추가 설치 리소스
추가 설치 옵션은 이 설치 가이드를 참고하세요.
syslog를 수집하고 Google SecOps로 전송하도록 Bindplane 에이전트 구성
구성 파일에 액세스합니다.
config.yaml파일을 찾습니다. 일반적으로 Linux의/observiq-otel-collector/디렉터리 또는 Windows의 설치 디렉터리에 있습니다.- 텍스트 편집기(예:
nano,vi또는 메모장)를 사용하여 파일을 엽니다.
다음과 같이
config.yaml파일을 수정합니다.receivers: udplog: # Replace the port and IP address as required listen_address: "0.0.0.0:514" exporters: chronicle/ansible_awx: protocol: https # Region of your instance, for example us, europe, asia-southeast1 location: <LOCATION> # Project number of the Google Cloud project linked to the instance project: '<PROJECT_NUMBER>' compression: gzip # Adjust the path to the credentials file you downloaded in Step 1 creds_file_path: '/path/to/ingestion-authentication-file.json' # Replace with your actual customer ID from Step 2 customer_id: '<customer_id>' endpoint: chronicle.googleapis.com log_type: 'ANSIBLE_AWX' raw_log_field: body service: pipelines: logs/ansible_awx: receivers: - udplog exporters: - chronicle/ansible_awx
- 인프라에서 필요에 따라 포트와 IP 주소를 바꿉니다.
<LOCATION>을 Google SecOps 인스턴스의 리전(예:us,europe또는asia-southeast1)으로 바꿉니다. 내보내기 도구는 이 값으로chronicle.googleapis.com프리픽스를 지정합니다.<PROJECT_NUMBER>를 IAM 및 관리자 > 설정의 프로젝트 번호로 바꿉니다.<customer_id>를 실제 고객 ID로 바꿉니다.- Bindplane 에이전트의 Google SecOps 사용자 인증 정보 가져오기 섹션에서 서비스 계정 키 파일(옵션 1)이 저장된 파일 경로로
/path/to/ingestion-authentication-file.json를 업데이트합니다.
기존 수집 API 내보내기 도구
옵션 2의 데이터 수집 인증 파일을 사용하는 경우
exporters블록을 다음으로 바꿉니다.creds_file_path을 데이터 수집 인증 파일의 경로로 설정하고 인스턴스가 미국 외부에 있는 경우malachiteingestion-pa.googleapis.com을 리전 엔드포인트(예:europe-malachiteingestion-pa.googleapis.com)로 바꿉니다.exporters: chronicle/ansible_awx: compression: gzip # Adjust the path to the credentials file you downloaded in Step 1 creds_file_path: '/path/to/ingestion-authentication-file.json' # Replace with your actual customer ID from Step 2 customer_id: '<customer_id>' endpoint: malachiteingestion-pa.googleapis.com log_type: 'ANSIBLE_AWX' raw_log_field: body
Bindplane 에이전트를 다시 시작하여 변경사항을 적용합니다.
Linux에서 Bindplane 에이전트를 다시 시작하려면 다음 안내를 따르세요.
다음 명령어를 실행합니다.
sudo systemctl restart observiq-otel-collector서비스가 실행 중인지 확인합니다.
sudo systemctl status observiq-otel-collector로그에서 오류를 확인합니다.
sudo journalctl -u observiq-otel-collector -f
Windows에서 Bindplane 에이전트를 다시 시작하려면 다음 안내를 따르세요.
다음 옵션 중 하나를 선택합니다.
- 관리자 권한으로 명령 프롬프트 또는 PowerShell을 실행합니다.
net stop observiq-otel-collector && net start observiq-otel-collector- 서비스 콘솔:
Win+R를 누르고services.msc를 입력한 다음 Enter 키를 누릅니다.- observIQ OpenTelemetry Collector를 찾습니다.
- 마우스 오른쪽 버튼을 클릭하고 다시 시작을 선택합니다.
서비스가 실행 중인지 확인합니다.
sc query observiq-otel-collector로그에서 오류를 확인합니다.
type "C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log"
Ansible AWX에서 외부 로깅 구성
- Ansible AWX 웹 인터페이스에 로그인합니다.
- 왼쪽 탐색 메뉴에서 설정으로 이동합니다.
- 시스템 섹션에서 로깅 설정을 선택합니다.
- 로깅 설정 페이지 하단에서 수정을 클릭합니다.
- 다음 구성 세부정보를 제공합니다.
- 로깅 애그리게이터: Bindplane 에이전트 호스트의 IP 주소를 입력합니다(예:
192.168.1.100). - 로깅 애그리게이터 포트: Bindplane 에이전트 포트 번호를 입력합니다(예:
514). - Logging Aggregator Type(로깅 애그리게이터 유형): 드롭다운에서 Other(기타)를 선택합니다.
- Logging Aggregator Username: 비워둡니다(syslog에는 필요하지 않음).
- Logging Aggregator Password/Token: 비워둡니다(syslog에는 필요하지 않음).
- Logging Aggregator Protocol: UDP를 선택합니다.
- Logging Aggregator Level Threshold: INFO 또는 원하는 로그 수준을 선택합니다.
- 외부 로깅 사용 설정: 사용으로 전환합니다.
- Loggers to Send Data to the Log Aggregator Form: 관련 로그 유형을 선택합니다.
awx- 일반 서버 로그activity_stream- AWX 객체 변경 기록job_events- Ansible 콜백 모듈 데이터system_tracking- 시스템 사실 및 구성 데이터
- Log System Tracking Facts Individually: OFF(기본값)로 전환합니다.
- 로깅 애그리게이터: Bindplane 에이전트 호스트의 IP 주소를 입력합니다(예:
- 저장을 클릭하여 설정을 적용합니다.
테스트를 클릭하여 Bindplane 에이전트에 대한 연결을 확인합니다.
UDM 매핑 테이블
| 로그 필드 | UDM 매핑 | 로직 |
|---|---|---|
logger_name |
intermediary.application |
직접 매핑됨 |
RenderedMessage |
metadata.description |
직접 매핑됨 |
description |
metadata.description |
직접 매핑됨 |
event1 |
metadata.description |
직접 매핑됨 |
message |
metadata.description |
직접 매핑됨 |
timestamp |
metadata.event_timestamp |
yyyy-MM-ddTHH:mm:ss.SSSZ(으)로 파싱됨 |
principal_present |
metadata.event_type |
매핑됨: true → STATUS_UPDATE |
target_present |
metadata.event_type |
매핑됨: true → NETWORK_CONNECTION |
user_present |
metadata.event_type |
매핑됨: true → USER_UNCATEGORIZED |
event1_data.uuid |
metadata.product_log_id |
직접 매핑됨 |
Properties.Method |
network.http.method |
직접 매핑됨 |
agent.type |
observer.application |
직접 매핑됨 |
agent.id |
observer.asset_id |
직접 매핑됨 |
agent.type |
observer.asset_id |
직접 매핑됨 |
agent.hostname |
observer.hostname |
직접 매핑됨 |
ephemeral_id_label |
observer.labels |
병합됨 |
agent.version |
observer.platform_version |
직접 매핑됨 |
agent.name |
observer.user.userid |
직접 매핑됨 |
Properties.applicationName |
principal.application |
직접 매핑됨 |
Properties.MachineName |
principal.asset.asset_id |
직접 매핑됨 |
Properties.Host |
principal.asset.hostname |
직접 매핑됨 |
event1_data.remote_addr |
principal.asset.hostname |
직접 매핑됨 |
principal_device |
principal.asset.hostname |
직접 매핑됨 |
principal_hostname |
principal.asset.hostname |
직접 매핑됨 |
Properties.ClientIP |
principal.asset.ip |
병합됨 |
ip_address |
principal.asset.ip |
병합됨 |
principal_ip |
principal.asset.ip |
병합됨 |
src_ip |
principal.asset.ip |
병합됨 |
Properties.Host |
principal.hostname |
직접 매핑됨 |
event1_data.remote_addr |
principal.hostname |
직접 매핑됨 |
principal_device |
principal.hostname |
직접 매핑됨 |
principal_hostname |
principal.hostname |
직접 매핑됨 |
Properties.ClientIP |
principal.ip |
병합됨 |
ip_address |
principal.ip |
병합됨 |
principal_ip |
principal.ip |
병합됨 |
src_ip |
principal.ip |
병합됨 |
src_port |
principal.port |
직접 매핑됨 |
event1_data.task_path |
principal.process.file.full_path |
직접 매핑됨 |
process_pid |
principal.process.pid |
직접 매핑됨 |
availability_zone |
principal.resource.attribute.labels |
병합됨 |
connectionid_label |
principal.resource.attribute.labels |
병합됨 |
endpointname_label |
principal.resource.attribute.labels |
병합됨 |
machine_type |
principal.resource.attribute.labels |
병합됨 |
provider |
principal.resource.attribute.labels |
병합됨 |
cloud.instance.name |
principal.resource.name |
직접 매핑됨 |
cloud.instance.id |
principal.resource.product_object_id |
직접 매핑됨 |
Properties.UserName |
principal.user.userid |
직접 매핑됨 |
user_name |
principal.user.userid |
직접 매핑됨 |
event1_display |
security_result.description |
직접 매핑됨 |
ca_id_label |
security_result.detection_fields |
병합됨 |
cf_component_label |
security_result.detection_fields |
병합됨 |
container_hash_label |
security_result.detection_fields |
병합됨 |
container_image_label |
security_result.detection_fields |
병합됨 |
container_name_label |
security_result.detection_fields |
병합됨 |
messagetemplate_label |
security_result.detection_fields |
병합됨 |
parent_uuid_label |
security_result.detection_fields |
병합됨 |
requestid_label |
security_result.detection_fields |
병합됨 |
requestpath_label |
security_result.detection_fields |
병합됨 |
serviceNowId_label |
security_result.detection_fields |
병합됨 |
sourcecontext_label |
security_result.detection_fields |
병합됨 |
stream_label |
security_result.detection_fields |
병합됨 |
task_label |
security_result.detection_fields |
병합됨 |
task_uuid_label |
security_result.detection_fields |
병합됨 |
threadid_label |
security_result.detection_fields |
병합됨 |
wf_env_label |
security_result.detection_fields |
병합됨 |
wf_id_label |
security_result.detection_fields |
병합됨 |
level |
security_result.severity |
매핑됨: "DEBUG", "INFO", "AUDIT" → INFORMATIONAL, WARNING → MEDIUM |
level |
security_result.severity_details |
직접 매핑됨 |
log |
security_result.summary |
직접 매핑됨 |
host.fqdn |
target.administrative_domain |
직접 매핑됨 |
host.id |
target.asset.asset_id |
직접 매핑됨 |
codename_label |
target.asset.attribute.labels |
병합됨 |
json_data |
target.asset.attribute.labels |
매핑됨: host.*os.*platform → codename_label, host.*os.*platform → os_name_label |
os_name_label |
target.asset.attribute.labels |
병합됨 |
hardware |
target.asset.hardware |
병합됨 |
json_data |
target.asset.hardware |
매핑됨: host.*os.*platform → hardware |
host.hostname |
target.asset.hostname |
직접 매핑됨 |
kubernetes.host |
target.asset.hostname |
직접 매핑됨 |
target_device |
target.asset.hostname |
직접 매핑됨 |
ips |
target.asset.ip |
병합됨 |
json_data |
target.asset.ip |
매핑됨: host.*os.*platform → ips |
target_ip |
target.asset.ip |
병합됨 |
kubernetes.docker_id |
target.asset_id |
직접 매핑됨 |
host.hostname |
target.hostname |
직접 매핑됨 |
kubernetes.host |
target.hostname |
직접 매핑됨 |
target_device |
target.hostname |
직접 매핑됨 |
target_ip |
target.ip |
병합됨 |
json_data |
target.mac |
매핑됨: host.*os.*platform → macs |
macs |
target.mac |
병합됨 |
kubernetes.namespace_name |
target.namespace |
직접 매핑됨 |
json_data |
target.platform |
매핑됨: host.*os.*platform → LINUX |
host.os.kernel |
target.platform_patch_level |
직접 매핑됨 |
host.os.version |
target.platform_version |
직접 매핑됨 |
io_instance_label |
target.resource.attribute.labels |
병합됨 |
io_name_label |
target.resource.attribute.labels |
병합됨 |
pod_id_label |
target.resource.attribute.labels |
병합됨 |
pod_template_hash_label |
target.resource.attribute.labels |
병합됨 |
cluster_name |
target.resource.name |
직접 매핑됨 |
| 해당 사항 없음 | metadata.event_type |
상수: NETWORK_CONNECTION |
| 해당 사항 없음 | metadata.product_name |
상수: ANSIBLE_AWX |
| 해당 사항 없음 | metadata.vendor_name |
상수: ANSIBLE_AWX |
| 해당 사항 없음 | network.ip_protocol |
상수: TCP |
| 해당 사항 없음 | principal.resource.resource_type |
상수: VIRTUAL_MACHINE |
| 해당 사항 없음 | security_result.severity |
상수: INFORMATIONAL |
| 해당 사항 없음 | target.platform |
상수: LINUX |
변경 로그
도움이 더 필요하신가요? 커뮤니티 회원 및 Google SecOps 전문가에게 문의하여 답변을 받으세요.