Monitor the IP addresses of Mistserver clients?

39 views
Skip to first unread message

Edward Ribeiro

unread,
Aug 18, 2016, 9:16:45 AM8/18/16
to Mistserver.org
Hi,

I am trying to track some monitoring data from Mistserver. We need to know how many clients are connected to a given stream and for how long so that we can have some idea about the "audience" of our streamings. There's any way of doing so via Mistserver? If not, could you please point me out towards Linux tools that could help us to accomplish this task, even if indirectly?

Thanks in advance,
Eddie

Jaron Viëtor

unread,
Aug 18, 2016, 10:53:20 AM8/18/16
to mists...@googlegroups.com
Hello Eddie,

Using the API (Documentation here: http://mistserver.org/doxygen/api.html ), you can retrieve this information with the "clients" call (described here: http://mistserver.org/doxygen/api.html#_api000014 ).
As an example, giving an command such as:

/api?command={"clients":{"streams":["somestream"]}} (with the proper authentication, see top of the documentation page for details on that)

Will give a response such as this:
{
//unix timestamp of data. Always present, always absolute.
"time": 1234567,
//array of actually represented data fields, in the same order they will appear in the "data" member.
"fields": ["host", "stream", "protocol", "conntime", "position", "down", "up", "downbps", "upbps"]
//for all clients, the data in the order they appear in the "fields" field.
"data": [[x, y, z], [x, y, z], [x, y, z]]
}

Where "data" is an array of arrays, and the innermost arrays contain the data mentioned in the "fields" member variable. The size of the outermost array is the amount of currently connected clients.
In your case, the "conntime" field is what you are interested in, and gives the time in seconds this connection has lasted so far (e.g. 130 = 2 minutes, 10 seconds).

Regards,
Jaron


--
You received this message because you are subscribed to the Google Groups "Mistserver.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mistserver+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Edward Ribeiro

unread,
Aug 18, 2016, 10:59:43 AM8/18/16
to mists...@googlegroups.com

Thanks for the quick response, Jaron! :)

Gonna follow your instructios asap.

Best regards,
Eddie


You received this message because you are subscribed to a topic in the Google Groups "Mistserver.org" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mistserver/3EMwGe-fCpA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mistserver+unsubscribe@googlegroups.com.

Edward Ribeiro

unread,
Aug 18, 2016, 1:35:44 PM8/18/16
to mists...@googlegroups.com
​Dear Jason,

Thank you VERY MUCH. :) It worked flawlessly. 

Best regards,
Eddie​

Jaron Viëtor

unread,
Aug 18, 2016, 2:11:01 PM8/18/16
to mists...@googlegroups.com
Hello Eddie,

Great to hear.
Let me know if you need help with anything else!

- Jaron


Reply all
Reply to author
Forward
0 new messages