How to get the qps metrics of the etcd

196 views
Skip to first unread message

xiega...@gmail.com

unread,
Aug 15, 2018, 3:32:01 AM8/15/18
to etcd-dev
Hello,

We have k8s with etcd for our online system. We'd like to monitor the performance of the etcd, especial the qps. Currently, the /metrics endpoint doesn't export this. Is there any way to do this without any modification of the etcd source code? 
PS. we also don't want introduce some other vendor component, such as datadog.

Thanks,
Gang

Sam Batschelet

unread,
Aug 15, 2018, 9:43:53 AM8/15/18
to etcd-dev
Gang,
Couldn't you extrapolate this info from the grpc_server_msg_received_total metrics? Assuming qps is queries per second.


-Sam

xiega...@gmail.com

unread,
Aug 16, 2018, 1:04:52 AM8/16/18
to etcd-dev
Thanks for the information. But it seems that this metric is from prometheus. But we don't have that installed (we have to integrate k8s's alert/monitoring system into the one in our company ). Is there any way to get such metrics without vendor system, like prometheus and datadog?

czib...@redhat.com

unread,
Aug 16, 2018, 4:10:50 PM8/16/18
to etcd-dev
You can use a tool like https://github.com/prometheus/prom2json to scrape the metrics from etcd and get them back as JSON. You would still need to calculate QPS from the metric mentioned, but it shouldn't be very hard once you have access to the data.

Joe Betz

unread,
Aug 16, 2018, 4:20:27 PM8/16/18
to czib...@redhat.com, etcd-dev
Conveniently, prometheus has a simple text based exposition format, e.g.: 

etcd_debugging_mvcc_keys_total 0
...

And there are prometheus libraries that can be used to build converters to other metrics systems, e.g. https://github.com/GoogleCloudPlatform/k8s-stackdriver/tree/master/prometheus-to-sd.

-Joe

--
You received this message because you are subscribed to the Google Groups "etcd-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to etcd-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages