Latency stats via API call?

latency

#1

Hi, I’ve build a simple exporter for prometheus (http://prometheus.io), following the logic from asgraphite (it’s basically a few RequestInfo() calls). For latency I use RequestInfo("latency:"), which gives me the >1ms, >8ms, >64ms latencies for the last 10 seconds. That works well and gives me something to work with.

However, the aerospike server logs have these detailed latency stats, which asloglatency uses. That’s great for use with prometheus, since it’s exactly what I need to build nice histogram stats.

Are these detailed latency times available from the server via some API call? Preferably via the Go client? I could just tail the log files, but that seems a bit inelegant.

Thanks! Harmen ( https://github.com/alicebob/asprom if you’re curious)


#2

See hist-track-thresholds which allows the configuration of more buckets.

An example of how to configure dynamically:

asadm -e "asinfo -v 'set-config:context=service;hist-track-thresholds=1,2,4,8,16,32,64,128,256,512,1024'"

#3

Thanks kporter, that already adds some details, I’ll add that option.

But the logs have the latency stats as totals from the start of the server, while this gives them for the last X minutes. It happens to be that those totals are the easiest to work with in Prometheus (it calculates the rates from how the totals change). So it would still be nicest to have access to those.

Thanks!


#4

Maybe your exporter can keep a state?

We also have this page for reference: http://www.aerospike.com/docs/reference/info/


#5

I can’t find the raw totals in there. I know there data is kept track of in the server, since it prints them to the logs.

But it’s fine as it is, the increased details via hist-track-treshholds is already an improvement. Thanks!


#6

Sorry the raw numbers aren’t exposed via info at this time.