# Httpprof debug/metrics not working anymore for kafka

**URL:** <https://discuss.elastic.co/t/httpprof-debug-metrics-not-working-anymore-for-kafka/83800>\
**Category:** Beats\
**Tags:** filebeat\
**Created:** [April 27, 2017, 6:35am UTC](https://discuss.elastic.co/t/httpprof-debug-metrics-not-working-anymore-for-kafka/83800 "2017-04-27T06:35:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ariel.s](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@ariel.s](https://discuss.elastic.co/u/ariel.s)\
**Post date:** [April 27, 2017, 6:35am UTC](https://discuss.elastic.co/t/httpprof-debug-metrics-not-working-anymore-for-kafka/83800/1 "2017-04-27T06:35:17Z")

</div>

Recently I upgraded filebeat version, and got a problem for monitoring.

v5.0.2  
I was using httpprof /debug/metrics to check kafka output rate in one minute for monitoring.  
(it is supplied from Sarama kafka lib. )

v5.3.0  
/debug/metrics is merged to /debug/vars, but only few metrics.  
(libbeat.output.kafka.bytes\_write, libbeat.output.kafka.bytes\_read, no 'rate' on name, but actually it is rate for whole living time of filebeat)  
there is no one-minute rate field.

**actually, I just need metrics(ex, Non-zero metrics in the last 30s: ~) on logging file,**  
**but httpprof /debug/vars don't have anything about that.**  
I think one-minute rate is most important meter it can helps to be noticed various problems from source to target. (application, filebeat, (in this case) kafka)

Now, I start to modify my monitoring script to make one-minute rate(compare "published\_events" from previous response and current one...

I hope to be improved this 🙂

Or if i missed something, plz let me know how to get one-minute publish rate.  
Thx !

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [April 27, 2017, 12:23pm UTC](https://discuss.elastic.co/t/httpprof-debug-metrics-not-working-anymore-for-kafka/83800/2 "2017-04-27T12:23:29Z")

</div>

the sarama library creating an HTTP handler in `/debug/metrics` is kind of bad practice. Libraries should not silently register/open endpoints on behalf of the application. The endpoint was not merged into `debug/vars`, but removed (filtered out), also protecting beats from other libraries potentially installing their own global HTTP handler.

The way metrics are collected and reported by beats and sarama library did differ quite a lot. Beats prefer to report absolute values, no deltas. In ES/Kibana one can use the derivate of the absolute value to compute the rate.

Note: `httpprof` is no feature you should rely on (it even exposes the golang profiler). Currently it's more like some internal/private developers tools. We're in the process of adding standardised metrics capabilities to beats. [This PR](https://github.com/elastic/beats/pull/3717) even adds an official `/stats` endpoint to the development branch for future use.

Which metrics is it you're exactly looking for? We're more interested to report similar/comparable metrics for all outputs in beats. As we don't have all of those metrics kafka can potentially report in the other outputs, we did expose only a very small/narrow subset for now.

---

<div class="post-metadata">

**Author:** ![ariel.s](https://avatars.discourse-cdn.com/v4/letter/a/a183cd/32.png) [@ariel.s](https://discuss.elastic.co/u/ariel.s)\
**Post date:** [April 28, 2017, 6:43am UTC](https://discuss.elastic.co/t/httpprof-debug-metrics-not-working-anymore-for-kafka/83800/3 "2017-04-28T06:43:24Z")

</div>

thx to reply.

I'm just interested in **published event rate in short time(1 minute)** metric.  
it is common for all plugins.

I think it's good to supply filebeat **logging.metrics** (metrics on filebeat log files).

```auto
2017-04-28T15:31:59+09:00 INFO Non-zero metrics in the last 30s: publish.events=1413 registrar.states.update=1413 libbeat.kafka.published_and_acked_events=39 libbeat.publisher.published_events=39 registrar.writes=17 libbeat.kafka.call_count.PublishEvents=11

```

when request like "/metrics", just return last logged one.  
It is more useful than tail & parse filebeat logging files.

---

<div class="post-metadata">

**Author:** ![steffens](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/steffens/32/79630_2.png) [@steffens](https://discuss.elastic.co/u/steffens)\
**Post date:** [April 28, 2017, 10:41am UTC](https://discuss.elastic.co/t/httpprof-debug-metrics-not-working-anymore-for-kafka/83800/4 "2017-04-28T10:41:48Z")

</div>

the logging.metrics are the diff indeed. But you can still compute the diff when collecting or use the derivative in kibana/ES to get exactly the same values.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [May 26, 2017, 10:56am UTC](https://discuss.elastic.co/t/httpprof-debug-metrics-not-working-anymore-for-kafka/83800/5 "2017-05-26T10:56:45Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
