Stackdriver 모니터링과 모니터링 에이전트로 Google Dataproc 클러스터를 설정할 때마다 Dataproc이 작업을 수행 할 때마다 Stackdriver가 연결을 잃어 버렸습니다. 스택 드라이버 UI에서 대기 시간 값은 대부분의 경우 2 분보다 길어서는 안됩니다. 이 값은 내가 일을 제출 한 후 (종종 수 시간이 걸렸을뿐) Compute Engine 웹 페이지에서 볼 수없는 측정 항목이없는 단순한 시간입니다.Google Stackdriver가 Dataproc에 연결되지 않음
dataproc에서 스택 드라이버 모니터링을 사용할 수있는 방법이 있습니까? 가능한 경우 내 작업의 RAM 사용을 모니터 할 수 있기를 원합니다.
Stackdriver 모니터링은 조직에서 실행 및 설정했지만 모든 기능에 대한 액세스 권한이있는 것으로 보입니다. 우리는 HTTP 프록시를 사용하지 않습니다. 모니터링 에이전트는 Google's documentation에있는 명령을 사용하여 설정됩니다. 인 gsutil 복사 명령 지나지 않는다 "다른 초기화 거즈"
#!/bin/bash
cd /tmp
curl -O "https://repo.stackdriver.com/stack-install.sh"
bash stack-install.sh --write-gcm
# ... other initialization stuffs
편집 : I는 다음과 같습니다 마스터와 근로자 모두에 대해 실행되는 시작 스크립트 (--initialization - 액션 플래그)가 차이가 나는 경우 로컬 컴퓨터에 일부 리소스 파일을 가져옵니다.
나는 다른 명령 다음에 에이전트 설치를 이동하려고 시도했지만 Google은 파일을 복사 할 때 절대 경로를 사용할 것을 권장하기 때문에/tmp만을 사용합니다 (문서가 어디에 있는지 잊어 버렸지만 이전에 도움이되었습니다).
다음은 stackdriver에서 무엇을보고 있는지 요청한 스크린 샷입니다. CPU 사용을 제외한 모든 메트릭이 수직선에서 어떻게 멈추는 지 확인하십시오. grep stackdriver-agent /var/logs/syslog
의
결과 :
Sep 2 13:31:53 <cluster-name>-m stackdriver-agent[3609]: Starting Stackdriver metrics collection agent: stackdriver-agentoption = Hostname; value = 3431688934917455875;
Sep 2 13:31:53 <cluster-name>-m stackdriver-agent[3609]: option = Interval; value = 60.000000;
Sep 2 13:31:53 <cluster-name>-m stackdriver-agent[3609]: Created new plugin context.
Sep 2 13:31:53 <cluster-name>-m stackdriver-agent[3609]: option = PIDFile; value = /var/run/stackdriver-agent.pid;
Sep 2 13:31:53 <cluster-name>-m stackdriver-agent[3609]: option = Hostname; value = 3431688934917455875;
Sep 2 13:31:53 <cluster-name>-m stackdriver-agent[3609]: option = Interval; value = 60.000000;
Sep 2 13:31:53 <cluster-name>-m stackdriver-agent[3609]: Created new plugin context.
Sep 2 13:31:53 <cluster-name>-m stackdriver-agent[3609]: .
Sep 2 13:31:56 <cluster-name>-m stackdriver-agent[3823]: Stopping Stackdriver metrics collection agent: stackdriver-agent.
Sep 2 13:31:56 <cluster-name>-m stackdriver-agent[3842]: Starting Stackdriver metrics collection agent: stackdriver-agentoption = Interval; value = 60.000000;
Sep 2 13:31:56 <cluster-name>-m stackdriver-agent[3842]: Created new plugin context.
Sep 2 13:31:56 <cluster-name>-m stackdriver-agent[3842]: option = PIDFile; value = /var/run/stackdriver-agent.pid;
Sep 2 13:31:56 <cluster-name>-m stackdriver-agent[3842]: option = Interval; value = 60.000000;
Sep 2 13:31:56 <cluster-name>-m stackdriver-agent[3842]: Created new plugin context.
Sep 2 13:31:56 <cluster-name>-m stackdriver-agent[3842]: .
편집 : 전체 클러스터 생성 명령은 다음과 같습니다
이gcloud dataproc clusters create <cluster-name> --master-machine-type n1-highmem-2 --worker-machine-type n1-highmem-2 --initialization-actions <path-to-script> --master-boot-disk-size 50GB --worker-boot-disk-size 50GB --num-workers 16 --network internal --zone us-east1-c --scopes https://www.googleapis.com/auth/cloud-platform --project <project-name> --tags dataproc
dataproc
태그가 열립니다 작업이 오늘 촉발 제출 된 때이다 내 조직의 모든 포트에 방화벽을 설치하십시오. sudo ps wwaux | grep stackdriver-agent
의
stackdriver-agent.service active running
LSB: start and stop Stackdriver Agent
결과 :
root 3851 0.0 0.0 1004704 9096 ? Ssl 12:50 0:00 /opt/stackdriver/collectd/sbin/stackdriver-collectd -C
/opt/stackdriver/collectd/etc/collectd.conf -P /var/run/stackdriver-agent.pid
7053 0.0 0.0 12732 2068 pts/0 S+ 13:14 0:00 grep stackdriver-agent
어떻게 당신이 모니터링 스택 드라이버를 설정 : 플러스
https://www.googleapis.com/auth/monitoring.write
는 작업 제출 등을 통해 내 테스트 프로젝트에서 일 당신의 모니터링 에이전트? UI에서보고있는 스크린 샷을 공유 할 수있는 기회가 있습니까? –더 많은 정보가 필요하다면 원래의 글을 편집 해주세요. – jbird
클러스터를 계속 사용하게되면'grep stackdriver-agent/var/log/syslog'를 확인할 수 있습니까? –