View previous topic :: View next topic |
Author |
Message |
Dave18
Joined: 26 Jan 2010 Posts: 20
|
Posted: Thu Jan 28, 2010 12:41 am Post subject: XML statistics |
|
|
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 |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Thu Jan 28, 2010 12:50 am Post subject: |
|
|
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 |
|
|
Dave18
Joined: 26 Jan 2010 Posts: 20
|
Posted: Thu Jan 28, 2010 12:59 am Post subject: |
|
|
karlH,
you're the man!
/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 |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Thu Jan 28, 2010 2:36 am Post subject: |
|
|
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 |
|
|
Dave18
Joined: 26 Jan 2010 Posts: 20
|
Posted: Thu Jan 28, 2010 9:54 am Post subject: |
|
|
Ok, it's clear.
thanks a lot! |
|
Back to top |
|
|
woogieman
Joined: 11 Apr 2009 Posts: 33 Location: Eugene, OR. USA
|
Posted: Tue Feb 09, 2010 7:07 pm Post subject: XML statistics |
|
|
@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 |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Tue Feb 09, 2010 7:16 pm Post subject: |
|
|
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 |
|
|
woogieman
Joined: 11 Apr 2009 Posts: 33 Location: Eugene, OR. USA
|
Posted: Tue Feb 09, 2010 8:50 pm Post subject: XML statistics |
|
|
@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 |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Tue Feb 09, 2010 9:11 pm Post subject: |
|
|
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 |
|
|
woogieman
Joined: 11 Apr 2009 Posts: 33 Location: Eugene, OR. USA
|
Posted: Wed Feb 10, 2010 3:52 pm Post subject: XML statistics |
|
|
OK you got me. Return from where? The php script?
I have it declared in the xml config file.
Thanks again. |
|
Back to top |
|
|
karlH Code Warrior
Joined: 13 Jun 2005 Posts: 5476 Location: UK
|
Posted: Wed Feb 10, 2010 6:35 pm Post subject: |
|
|
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 |
|
|
Ant
Joined: 11 Jun 2008 Posts: 26 Location: Russia
|
Posted: Tue Jun 29, 2010 12:32 pm Post subject: |
|
|
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 |
|
|
Ant
Joined: 11 Jun 2008 Posts: 26 Location: Russia
|
Posted: Wed Jun 30, 2010 12:22 pm Post subject: |
|
|
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 |
|
|
woogieman
Joined: 11 Apr 2009 Posts: 33 Location: Eugene, OR. USA
|
|
Back to top |
|
|
Ant
Joined: 11 Jun 2008 Posts: 26 Location: Russia
|
Posted: Wed Jun 30, 2010 6:18 pm Post subject: |
|
|
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 |
|
|
|