Mesosphere DC / OS:在DC / OS上为Prometheus部署Kafka Exporter时需要帮助。如何指定Kafka端点?

时间:2019-04-01 18:41:59

标签: apache-kafka prometheus mesos mesosphere dcos

我正在尝试使用https://github.com/danielqsj/kafka_exporter/向我的Prometheus公开一些其他的Kafka指标。

我在DC / OS上有5个Kafka实例和1个Prometheus实例。

这是我目前正在尝试做的事情:

我创建了一个exporter.json:

    "id": "kafka-exporter",
    "container": {
        "type": "DOCKER",
        "docker": {
            "image": "danielqsj/kafka-exporter",
            "network": "BRIDGE",
            "portMappings": [
                {
                    "hostPort": 0,
                    "containerPort": 9000
                }
            ]
        }
    },
    "instances": 1,
    "cpus": 1,
    "mem": 64
}

然后运行dcos marathon app add exporter.json

但是,我看到在部署过程中在DC / OS UI stderr日志中出现了此错误:

time="2019-04-01T18:25:18Z" level=info msg="Starting kafka_exporter (version=1.2.0, branch=HEAD, revision=56c1d47f9794d59d042852cc31558257e24d2ea0)" source="kafka_exporter.go:500"
time="2019-04-01T18:25:18Z" level=info msg="Build context (go=go1.9, user=travis@travis-job-fa00a602-ae4f-4696-ac19-3ee24885c116, date=20190131-13:51:26)" source="kafka_exporter.go:501"
time="2019-04-01T18:25:19Z" level=error msg="Error Init Kafka Client" source="kafka_exporter.go:184"
panic: kafka: client has run out of available brokers to talk to (Is your cluster reachable?)

goroutine 1 [running]:
main.NewExporter(0xc4201aa6e0, 0x1, 0x1, 0x100, 0x96d438, 0x0, 0x96d438, 0x0, 0x0, 0x96d438, ...)
    /home/travis/gopath/src/github.com/danielqsj/kafka_exporter/kafka_exporter.go:185 +0xbbc
main.main()
    /home/travis/gopath/src/github.com/danielqsj/kafka_exporter/kafka_exporter.go:606 +0x3aa7
I0401 11:25:19.370234 30234 executor.cpp:736] Container exited with status 2
I0401 11:25:20.370877 30215 process.cpp:926] Stopped the socket accept loop

乍一看,看来我需要在某个地方指定Kafka端点。

0 个答案:

没有答案