Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

XML statistics

 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server
View previous topic :: View next topic  
Author Message
Dave18



Joined: 26 Jan 2010
Posts: 20

PostPosted: Thu Jan 28, 2010 12:41 am    Post subject: XML statistics Reply with quote

Hi,

I'm trying to get an xml file with the statistics about listeners online on a specific mount point.
My idea is to get the xml file using a scheduled download to popolate a database using a php script.

I've used listclients.xsl to create my xml and it works.
My problem is the name of the file: if I mantein the listclients.xsl it works, but if I rename it like listerners.xsl it doesn't work.
I receive this error: unrecognised command.

I'd like to use listclients.xsl for the html admin interface, and listeners.xsl to generate my personal xml: is it possible?
What am I doing wrong?

Thanks

Dave
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Jan 28, 2010 12:50 am    Post subject: Reply with quote

try using /admin/listclients?mount=/stream not /admin/listclients.xsl...

The other way to maintain the DB is to use the listener_add/_remove URL triggers for the mountpoint in question.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dave18



Joined: 26 Jan 2010
Posts: 20

PostPosted: Thu Jan 28, 2010 12:59 am    Post subject: Reply with quote

karlH,

you're the man! Very Happy
/admin/listclients?mount=/stream is exactly what I was looking for.
I was writing another question about the session ID: you have solved both my questions.

I really thank you.

I'm sorry about the second part of your answer "...use the listener_add/_remove URL triggers for the mountpoint in question"
I do not understand, and I'd like to have more information about it.

Anyway thanks!
Back to top
View user's profile Send private message
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Thu Jan 28, 2010 2:36 am    Post subject: Reply with quote

It's a question of how you want to collect the listener details. The xml extraction approach will require polling the server for the details every so often. The auth url approach means that a script (typically php) will be called when a listener connect or disconnects and you can extract listener details from the POST sent, that script can modify the DB.

similar result but done different ways. The polling way is a regular snapshot, simple retrieval, little overhead in icecast but a lot of listeners can [dis]connect between polls so the data can get out of sync between (icecast and DB). The auth way keeps the DB and icecast in sync at the cost of running the php each time a listener [dis]connects. So the issues are about accuracy and acceptable overhead.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Dave18



Joined: 26 Jan 2010
Posts: 20

PostPosted: Thu Jan 28, 2010 9:54 am    Post subject: Reply with quote

Ok, it's clear.

thanks a lot!
Back to top
View user's profile Send private message
woogieman



Joined: 11 Apr 2009
Posts: 33
Location: Eugene, OR. USA

PostPosted: Tue Feb 09, 2010 7:07 pm    Post subject: XML statistics Reply with quote

@karlH: I found that using the hard-coded method in the XML config file of listener_add/_remove using URL triggers made a login dialog box appear on the screen every time a listener tried to connect. I found this to be severely limiting and could find no way to get around it.
So as a result I cannot trap the listener stats.
Any suggestions??
All help is greatly appreciated.
Back to top
View user's profile Send private message Visit poster's website
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Feb 09, 2010 7:16 pm    Post subject: Reply with quote

woogieman, can you specifiy which version of icecast this is and whether you are returning the icecast-auth-user: header back all the time?

karl
Back to top
View user's profile Send private message Send e-mail Visit poster's website
woogieman



Joined: 11 Apr 2009
Posts: 33
Location: Eugene, OR. USA

PostPosted: Tue Feb 09, 2010 8:50 pm    Post subject: XML statistics Reply with quote

@karlH: Thanks again for the quick response. I am using 2.3.2 with no mods.
Here is my mountpoint info:
Code:
<mount>
    <mount-name>/Maylock_Shon</mount-name>
    <authentication type="url">
        <option name="mount_add"        value="http://10.1.10.165/Manager/Streaming/auth/action.php"/>
        <option name="mount_remove"     value="http://10.1.10.165/Manager/Streaming/auth/action.php"/>
        <option name="listener_add"     value="http://10.1.10.165/Manager/Streaming/auth/action.php"/>
        <option name="listener_remove"  value="http://10.1.10.165/Manager/Streaming/auth/action.php"/>
        <option name="auth_header"      value="icecast-auth-user: 1"/>
        <option name="timelimit_header" value="icecast-auth-timelimit:"/>
    </authentication>
</mount>

Thanks a lot!!
Back to top
View user's profile Send private message Visit poster's website
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Feb 09, 2010 9:11 pm    Post subject: Reply with quote

you didn't say whether you are returning the header that tells icecast to accept the listener (icecast-auth-user: 1) and if so what is reported in the error log when this occurs.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
woogieman



Joined: 11 Apr 2009
Posts: 33
Location: Eugene, OR. USA

PostPosted: Wed Feb 10, 2010 3:52 pm    Post subject: XML statistics Reply with quote

OK you got me. Return from where? The php script?
I have it declared in the xml config file.
Thanks again.
Back to top
View user's profile Send private message Visit poster's website
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Feb 10, 2010 6:35 pm    Post subject: Reply with quote

icecast has to know whether the listener is to be allowed on or not and you have specified the response header to check for. If your php script does not return the response header then icecast assumes the listener is to be rejected.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Ant



Joined: 11 Jun 2008
Posts: 26
Location: Russia

PostPosted: Tue Jun 29, 2010 12:32 pm    Post subject: Reply with quote

Hi.
Is there any way to get stats in xml view without needs to auth?

I mean this:
http://myserv.net:8000/admin/stats.xml

I want same stats xml can be readable to php script from other server, but i don't want gave it any log and pass for admin page.
Back to top
View user's profile Send private message
Ant



Joined: 11 Jun 2008
Posts: 26
Location: Russia

PostPosted: Wed Jun 30, 2010 12:22 pm    Post subject: Reply with quote

Well, after long searching at forum i suppose that usual status2.xsl and status2.xsl?mount=/mounpoint also can be useful for our purposes.
Back to top
View user's profile Send private message
woogieman



Joined: 11 Apr 2009
Posts: 33
Location: Eugene, OR. USA

PostPosted: Wed Jun 30, 2010 2:03 pm    Post subject: XML statistics Reply with quote

@ant: Try this format.
http://Username:Password@sub.domain.name:Port/Streamname
Remember the colon!
Hope this helps
Back to top
View user's profile Send private message Visit poster's website
Ant



Joined: 11 Jun 2008
Posts: 26
Location: Russia

PostPosted: Wed Jun 30, 2010 6:18 pm    Post subject: Reply with quote

I know about, but it's requied log and pass for this. It's not secure.
For now i will try use:
http://myserv.net:8000/status2.xsl
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Icecast Server All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber