bookkeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sijie Guo <guosi...@gmail.com>
Subject Re: Problem of Prometheus Stats Providers
Date Mon, 09 Jul 2018 21:32:30 GMT
Ah I see, there is a problem about this. when httpServer is enabled, it
doesn't registered `metrics` endpoint at the http router. so it fails with
"Resource not found".

I am filing an issue for that: -
https://github.com/apache/bookkeeper/issues/1538

for now, you can disable httpServer, so prometheus stats provider will
start its own http server to expose metrics. hope that works for you.

we will fix the issue and include it in the upcoming release.

- Sijie

On Mon, Jul 9, 2018 at 2:51 AM li.penghui@zhaopin.com.cn <
li.penghui@zhaopin.com.cn> wrote:

>
> But i got "Resource not found"。
>
> My config file is upload.
>
> ------------------------------
> li.penghui@zhaopin.com.cn
>
>
> *From:* Sijie Guo <guosijie@gmail.com>
> *Date:* 2018-07-09 15:30
> *To:* user <user@bookkeeper.apache.org>
> *Subject:* Re: Re: Problem of Prometheus Stats Providers
> Okay. So when httpServerEnabled is true, prometheus provider will not
> start a separated http endpoint. it will expose the metrics via the http
> servers under /metrics.
>
> so if you curl localhost:8080/metrics, you should be able to get all the
> metrics.
>
> - Sijie
>
> On Mon, Jul 9, 2018 at 12:06 AM li.penghui@zhaopin.com.cn <
> li.penghui@zhaopin.com.cn> wrote:
>
>> bookkeeper version is 4.7.1  , port of 8080 can reached. already have
>> restart bookeerper.
>>
>>
>> # The flag enables/disables starting the admin http server. Default value is 'false'.
>> httpServerEnabled=true
>>
>> # The http server port to listen on. Default value is 8080.
>> httpServerPort=8080
>>
>> # The http server class
>> httpServerClass=org.apache.bookkeeper.http.vertx.VertxHttpServer
>>
>>
>>
>> ------------------------------
>> li.penghui@zhaopin.com.cn
>>
>>
>> *From:* Sijie Guo <guosijie@gmail.com>
>> *Date:* 2018-07-09 14:04
>> *To:* user <user@bookkeeper.apache.org>
>> *Subject:* Re: Problem of Prometheus Stats Providers
>> Interesting, I have tried these settings at my laptop. I am able to curl
>> the metrics : "curl -s localhost:8000/metrics".
>>
>> Can you clarify a few things:
>>
>> - what version of bookkeeper are you using?
>> - did you happen to enable bookie http server? set httpServerEnabled to
>> be true
>>
>> - Sijie
>>
>> On Sun, Jul 8, 2018 at 8:53 PM li.penghui@zhaopin.com.cn <
>> li.penghui@zhaopin.com.cn> wrote:
>>
>>> set configs , but i can't reach 8000 port.
>>>
>>>
>>>
>>> #############################################################################
>>> ## Stats Providers
>>>
>>> #############################################################################
>>>
>>> # Whether statistics are enabled
>>> enableStatistics=true
>>>
>>> # The flag to enable recording task execution stats.
>>> enableTaskExecutionStats=true
>>>
>>> # Stats Provider Class (if `enableStatistics` are enabled)
>>> # Options:
>>>
>>> #   - Prometheus        : org.apache.bookkeeper.stats.prometheus.PrometheusMetricsProvider
>>>
>>> #   - Codahale          : org.apache.bookkeeper.stats.codahale.CodahaleMetricsProvider
>>>
>>> #   - Twitter Finagle   : org.apache.bookkeeper.stats.twitter.finagle.FinagleStatsProvider
>>>
>>> #   - Twitter Ostrich   : org.apache.bookkeeper.stats.twitter.ostrich.OstrichProvider
>>>
>>> #   - Twitter Science   : org.apache.bookkeeper.stats.twitter.science.TwitterStatsProvider
>>> # Default value is:
>>> #   org.apache.bookkeeper.stats.prometheus.PrometheusMetricsProvider
>>> #
>>>
>>> # For configuring corresponding stats provider, see details at each section below.
>>> #
>>>
>>> # statsProviderClass=org.apache.bookkeeper.stats.prometheus.PrometheusMetricsProvider
>>>
>>>
>>> #############################################################################
>>> ## Prometheus Metrics Provider
>>>
>>> #############################################################################
>>>
>>> # These configs are used when using `PrometheusMetricsProvider`.
>>>
>>> statsProviderClass=org.apache.bookkeeper.stats.prometheus.PrometheusMetricsProvider
>>>
>>> # Default port for Prometheus metrics exporter
>>> prometheusStatsHttpPort=8000
>>>
>>> # latency stats rollover interval, in seconds
>>> prometheusStatsLatencyRolloverSeconds=60
>>>
>>>
>>>

Mime
View raw message