I'd increase a counter everytime I do a recv() or send() call and then send that to the TSDB from time to time. Not sure what you mean with pending messages though.
You could use a simple integer counter but there also exist full-blown metrics library with counters, gauges, etc. On Fri, 4 Mar 2016 at 19:58, Vikas Kumar <[email protected]> wrote: > Hello ZeroMQ devs and users, > > I am trying to add some instrumentation in my code so it starts sending > stats to some time series database. Basically from a socket pair what I'm > interested in are: > 1. Number of messages received every minute > 2. Number of messages sent to worker threads > 3. Count of pending messages > > I thought this is a common problem and there would be an existing pattern, > but couldn't find anything online. What do you do to collect stats from zmq > sockets? > > Thanks for your help. > > -- > Vikas. > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
