go_memstats_alloc_bytes

24 views
Skip to first unread message

deepak...@gmail.com

unread,
Aug 26, 2020, 7:27:17 AM8/26/20
to Prometheus Users
Hi All,
Can you please provide me some insights on he below,

go_memstats_alloc_bytes : does this show up the allocated bytes for the prometheus itself ? Does the Metrics in the drop down list of the prometheus dashboard pull up metrics related to Prometheus ?

How can i pull the metrics related to a application from the server using Prometheus?

Thanks
Deepak

mspr...@us.ibm.com

unread,
Aug 26, 2020, 9:39:45 PM8/26/20
to Prometheus Users
The golang runtime produces Prometheus metrics about https://golang.org/pkg/runtime/#MemStats using https://github.com/prometheus/client_golang/blob/master/prometheus/go_collector.go .  A scrape of any golang process will include those metrics.  This includes not only Prometheus servers but also many others.

Regards,
Mike

Christian Hoffmann

unread,
Aug 27, 2020, 1:38:18 AM8/27/20
to deepak...@gmail.com, Prometheus Users
Hi,

On 8/26/20 1:27 PM, deepak...@gmail.com wrote:
> How can i pull the metrics related to a application from the server
> using Prometheus?

You would usually instrument the application itself (by using one of the
language clients such as client_python, client_golang, etc.). If this
isn't possible (e.g. because it's a proprietary application), you can
try to find other ways such as finding or writing an exporter which gets
the data via an API. If this isn't feasable either, you can try to go to
higher levels of abstractions: You can parse logs (mtail,
multilog_exporter, grok_exporter), scrape process or service details
(process_exporter, systemd_exporter, node_exporter's systemd collector)
or you can even just target the network service itself by using
blackbox_exporter.

This will give different levels of insights. Often, not all ways are
possible.

Kind regards,
Christian
Reply all
Reply to author
Forward
0 new messages