Re: Listener stats

Philipp Schafft <[email protected]> Tue, 22 Sep 2020 16:54:15 +0000
Newsgroups gmane.comp.audio.icecast.devel
Message-ID <[email protected]>
--===============6913366514952352665==
Content-Type: multipart/signed; micalg="pgp-sha256";
	protocol="application/pgp-signature"; boundary="=-2K9AbcvDVHShHYKBAOBr"


--=-2K9AbcvDVHShHYKBAOBr
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

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 Jso=
n 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, <[email protected]> <[email protected]=
m> wrote:
> >=20
> > What about scrapping the access logs for connections that have complete=
d, or utilizing netstat outputs to get active listeners (minus sources)?
> >=20
> > Either of those options would get you remote IP addresses, both a sligh=
tly different view in that logs are after a connection closes, while netsta=
t is while the connection is open.=20
> >=20
> > -----Original Message-----
> > From: Icecast-dev <[email protected]> On Behalf Of Reaz Baks=
h
> > Sent: Monday, September 21, 2020 3:03 PM
> > To: [email protected]
> > Subject: Re: [Icecast-dev] Listener stats
> >=20
> > Hello Jordan
> >=20
> > Thanks for the reply.  I commented out all the fields in the status-jso=
n.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=3D/dhantal, but t=
hat means I would have to scrape the web interface which I don't want to do=
.
> >=20
> >=20
> > Reaz
> >=20
> >> On 2020-09-21 5:27 p.m., Jordan Erickson wrote:
> >> Hi Reaz,
> >>=20
> >> IP Address !=3D Location of user in many cases. Think VPNs for instanc=
e.
> >>=20
> >> Of course if you're set on going that route, I'm pretty sure that=20
> >> status-json.xsl (in your webroot) has the IP address option simply=20
> >> added to a section that does not show it:
> >>=20
> >> <xsl:template match=3D"icestats/source/source_ip"><xsl:if
> >> test=3D"not(following-sibling::*)">"dummy":null}</xsl:if></xsl:templat=
e>
> >>=20
> >> I could be wrong but you may be able to simply remove that line and=
=20
> >> it'll work. I haven't tried that before so do it at your own risk ;) I=
=20
> >> personally don't know how you would do that without modifying the xsl=
=20
> >> file to display it.
> >>=20
> >>=20
> >> Cheers,
> >> Jordan Erickson
> >>=20
> >>=20
> >>> On 9/21/20 2:10 PM, Reaz Baksh wrote:
> >>> Hello
> >>> I=E2=80=99m new to Icecast and I=E2=80=99m using version 2.4.4. How w=
ould I be able to get a Jason file that has listener information specifical=
ly listener location or at least the IP address. I can get listener count b=
ut I=E2=80=99m looking for location through the IP. I need to write a php s=
cript to gather this information. I have checked the status-Jason.xsl and t=
he xml2json.xsl but neither gives me that information.
> >>>=20
> >>> 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.


--=20
Philipp Schafft (CEO/Gesch=C3=A4ftsf=C3=BChrer)=20
Telephon: +49.3535 490 17 92

L=C3=B6wenfelsen UG (haftungsbeschr=C3=A4nkt)     Registration number:
Bickinger Stra=C3=9Fe 21                     HRB 12308 CB
04916 Herzberg (Elster)                 VATIN/USt-ID:
Germany                                 DE305133015

--=-2K9AbcvDVHShHYKBAOBr
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: This is a digitally signed message part

-----BEGIN PGP SIGNATURE-----
Comment: Because it's your freedom

iQEcBAABCAAGBQJfaiw4AAoJEGHAwpMBGp8siQ0H/iDmlXRe4auUwSyI+ZvlvQ1z
Rdn2nBorRSC+1EOkXL9grp27naOv4deJcdbGRV+ZyoEvzD4BpyXEJQl/1Hn5cSQ5
tiMewu6pYFRVSR4DnJYwVuXYq3kBX/dtou+2cRufmQSgLQ3380h0YjLcAYkMxh5x
6lfPknuYvtpAFwy7tkwnflFBFzXiNlrPWxWbUJrQ4gnTpJiCj1R7pvPt8aCKZ+MJ
NVGGqe90pODCLCglXIL2o5rn/mf3vcHovZCGxi5Lq3+xEkdPjqWZ+K8p7WSk4AzW
9CuyXxV6MrXsRjk0adbpPy9mtrxm5voZG3cwJqbYcb0+HjVP6pGPO/DOSVrdtOU=
=5doR
-----END PGP SIGNATURE-----

--=-2K9AbcvDVHShHYKBAOBr--

--===============6913366514952352665==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KSWNlY2FzdC1k
ZXYgbWFpbGluZyBsaXN0CkljZWNhc3QtZGV2QHhpcGgub3JnCmh0dHA6Ly9saXN0cy54aXBoLm9y
Zy9tYWlsbWFuL2xpc3RpbmZvL2ljZWNhc3QtZGV2Cg==

--===============6913366514952352665==--