Answer the question
In order to leave comments, you need to log in
Is it possible to send a metric with its own timestamp to statsd?
Hello!
Maybe knowledgeable people will tell you if there is any way to send a metric from python to statsd with your own timestamp, or maybe there are alternative metric aggregators (preferably to a database like influxdb or mongodb, although mysql is quite suitable) that allow you to do this ?
Relatively speaking, I would like to be able to do something like this: statsd.incr('route', timestamp)
After searching and reading the Internet, I realized that theoretically logstash should cope with this task, but since I have never encountered it, I probably want to misuse it.
Answer the question
In order to leave comments, you need to log in
In general, for those who will need to solve a similar case.
Statd does not know how to accept a user timestamp, more precisely it can, but no later than 120m from the current time.
With Logstash, I decided not to mess around because it will certainly solve the task, but for me it's an overhead. therefore, having forked the python client for statd, he added the necessary functionality there and raised the udp socket server in python. The speed is about 19k per second, the principle of this is more than beyond my eyes. Therefore the issue is resolved.
As I finish all the logic, I can share a link to the github if someone needs it.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question