[Icecast-dev] Listener stats

Marvin Scholz epirat07 at gmail.com
Wed Sep 23 07:31:39 UTC 2020


On 22 Sep 2020, at 21:08, Reaz Baksh wrote:

> I think I got it.
> I needed to change the following: 
> http://xxx.xxx.xxx.xxx:8000/admin/listclients.xsl?mount=/mountpoint to 
> http://xxx.xxx.xxx.xxx:8000/admin/listclients?mount=/mountpoint and 
> that gives me the XML. No need to change or modify anything.   Now how 
> do I get the json as I prefer json?
>

This is only offered as XML currently, there is no JSON API.

> Reaz
>
>> On Sep 22, 2020, at 1:51 PM, Reaz Baksh <reaz at dhantal.com> wrote:
>>
>> Hello
>> Thanks for the replies. I apologize for the rash statements but, not 
>> an excuse but an explanation, I was working for about a week and a 
>> half to get this to work without any success. Checked every post 
>> related to Icecast and read the manuals but nothing came up to 
>> resolve this.
>>
>> I did try try to remove the xsl from the site but that just gave me a 
>> 400 unknown admin request error. I also edited all the files within 
>> the web root and it did give me some more information but not what I 
>> wanted. In a link that’s the following: 
>> admin/listclients.xsl?mount=/mountpoint would I just try the 
>> following and get what I need?  admin/listclients. If so that is what 
>> I tried and got the error above.
>>
>> Reaz
>>
>>> On Sep 22, 2020, at 12:54 PM, Philipp Schafft 
>>> <phschafft at de.loewenfelsen.net> wrote:
>>>
>>> Good afternoon,
>>>
>>>> On Tue, 2020-09-22 at 11:43 -0400, Reaz Baksh wrote:
>>>> Too much work.
>>>
>>> I would like to refer to Jordan Erickson's comment here.
>>>
>>>
>>>> If I am able to see it on the web interface I should be able to get 
>>>> a Json or XML file with this in it.
>>>
>>> Why not just use the API? Remove the ".xsl" from any URL in the 
>>> admin
>>> interface and get the raw XML. The rendered webinterface is just 
>>> that:
>>> XSLT applied to the API.
>>>
>>>> This should be easy.
>>>
>>> As easy as asking nicely.
>>>
>>>
>>> With best regards,
>>>
>>>
>>>>> On Sep 22, 2020, at 11:16 AM, <jorr at streamguys.com> 
>>>>> <jorr at streamguys.com> wrote:
>>>>>
>>>>> What about scrapping the access logs for connections that have 
>>>>> completed, or utilizing netstat outputs to get active listeners 
>>>>> (minus sources)?
>>>>>
>>>>> Either of those options would get you remote IP addresses, both a 
>>>>> slightly different view in that logs are after a connection 
>>>>> closes, while netstat is while the connection is open.
>>>>>
>>>>> -----Original Message-----
>>>>> From: Icecast-dev <icecast-dev-bounces at xiph.org> On Behalf Of Reaz 
>>>>> Baksh
>>>>> Sent: Monday, September 21, 2020 3:03 PM
>>>>> To: icecast-dev at xiph.org
>>>>> Subject: Re: [Icecast-dev] Listener stats
>>>>>
>>>>> Hello Jordan
>>>>>
>>>>> Thanks for the reply.  I commented out all the fields in the 
>>>>> status-json.xsl but it didn't give me the listener IP.  The 
>>>>> example below would show me the source IP.  I can get the IP from 
>>>>> the web interface at this location, 
>>>>> http://xxx.xxx.xxx.xxx:8000/admin/listclients.xsl?mount=/dhantal, 
>>>>> but that means I would have to scrape the web interface which I 
>>>>> don't want to do.
>>>>>
>>>>>
>>>>> Reaz
>>>>>
>>>>>> On 2020-09-21 5:27 p.m., Jordan Erickson wrote:
>>>>>> Hi Reaz,
>>>>>>
>>>>>> IP Address != Location of user in many cases. Think VPNs for 
>>>>>> instance.
>>>>>>
>>>>>> Of course if you're set on going that route, I'm pretty sure that
>>>>>> status-json.xsl (in your webroot) has the IP address option 
>>>>>> simply
>>>>>> added to a section that does not show it:
>>>>>>
>>>>>> <xsl:template match="icestats/source/source_ip"><xsl:if
>>>>>> test="not(following-sibling::*)">"dummy":null}</xsl:if></xsl:template>
>>>>>>
>>>>>> I could be wrong but you may be able to simply remove that line 
>>>>>> and
>>>>>> it'll work. I haven't tried that before so do it at your own risk 
>>>>>> ;) I
>>>>>> personally don't know how you would do that without modifying the 
>>>>>> xsl
>>>>>> file to display it.
>>>>>>
>>>>>>
>>>>>> Cheers,
>>>>>> Jordan Erickson
>>>>>>
>>>>>>
>>>>>>> On 9/21/20 2:10 PM, Reaz Baksh wrote:
>>>>>>> Hello
>>>>>>> I’m new to Icecast and I’m using version 2.4.4. How would I 
>>>>>>> be able to get a Jason file that has listener information 
>>>>>>> specifically listener location or at least the IP address. I can 
>>>>>>> get listener count but I’m looking for location through the 
>>>>>>> IP. I need to write a php script to gather this information. I 
>>>>>>> have checked the status-Jason.xsl and the xml2json.xsl but 
>>>>>>> neither gives me that information.
>>>>>>>
>>>>>>> What would I have to modify and how, to get this?  I would 
>>>>>>> prefer not to modify any xsl file to get this if at all 
>>>>>>> possible.
>>>
>>>
>>> -- 
>>> Philipp Schafft (CEO/Geschäftsführer)
>>> Telephon: +49.3535 490 17 92
>>>
>>> Löwenfelsen UG (haftungsbeschränkt)     Registration number:
>>> Bickinger Straße 21                     HRB 12308 CB
>>> 04916 Herzberg (Elster)                 VATIN/USt-ID:
>>> Germany                                 DE305133015
>>
>> _______________________________________________
>> Icecast-dev mailing list
>> Icecast-dev at xiph.org
>> http://lists.xiph.org/mailman/listinfo/icecast-dev
>
> _______________________________________________
> Icecast-dev mailing list
> Icecast-dev at xiph.org
> http://lists.xiph.org/mailman/listinfo/icecast-dev


More information about the Icecast-dev mailing list