2016-09-12 6 views
1

필자는 Prometheus를 처음 사용하고 있으며 내 RHEL 6 서버에 Prometheus를 설치하려고합니다. 나는 내가 다음과 같이 설정 파일에 내용을 채워 한 RHEL에 대한 rpm으로, 게시물을 설치 한 :Prometheus 시작 쿼리

global: 
    scrape_interval:  5s 
    evaluation_interval: 5s 
scrape_configs: 
- job_name: linux 
target_groups: 
     -targets: ['192.17.36.189:3306'] 
      labels: 
      alias: db1 

나는 프로 메테우스를 시작하려하면, 다음과 같은 오류 얻을 :

INFO[0000] Starting prometheus (version=1.1.2, branch=master, revision=36fbdcc30fd13ad796381dc934742c559feeb1b5) source=main.go:73 
    INFO[0000] Build context (go=go1.6.3, [email protected], date=20160908-13:12:43) source=main.go:74 
    INFO[0000] Loading configuration file prometheus.yml  source=main.go:221 
    ERRO[0000] Error loading config: couldn't load configuration (-config.file=prometheus.yml): yaml: line 6: found character that cannot start any token source=main.go:126 

무엇 여기에 문제가 있습니까?

답변

0

target_groupsstatic_configs으로 바뀝니다. 최신 Prometheus 이미지를 다음과 같이 사용하십시오.

static_configs: 
    - targets: ['192.17.36.189:3306'] 

위의 내용이 저에게 효과적입니다.

또한 prometheus 포트 9090이 컨테이너/pod/서비스에 노출되어 있습니까? https://github.com/prometheus/prometheus/wiki/Default-port-allocations

관련 문제