Accessing real-time connections

72 views
Skip to first unread message

Jonathan Brookins

unread,
Oct 14, 2015, 5:14:25 PM10/14/15
to Lucee
If I wanted to access the active connections to a given site by application name, is that accessible from Lucee libraries, or is that sort of information at the Tomcat level?  My goal is to write a Lucee app that shows the current connections by application name.  I could use context but in this case there are multiple web sites under a single context.  Any ideas?

Paul Klinkenberg

unread,
Oct 15, 2015, 3:42:24 AM10/15/15
to lu...@googlegroups.com
Hi Jonathan,

I know the following does not meet your requirements, but there are a lot of good tools available already...

FusionReactor might be a good candidate for viewing active requests, and can handle a lot of historical data as well. You might even be able to filter on the app name (if hostname isn't clear enough already), if you would set a cookie with the app name for each visitor.

Also, you off course have realtime frontend tracking plugins like https://www.hotjar.com/

Kind regards,

Paul Klinkenberg


Op 14 okt. 2015, om 23:14 heeft Jonathan Brookins <jon.br...@gmail.com> het volgende geschreven:

If I wanted to access the active connections to a given site by application name, is that accessible from Lucee libraries, or is that sort of information at the Tomcat level?  My goal is to write a Lucee app that shows the current connections by application name.  I could use context but in this case there are multiple web sites under a single context.  Any ideas?

--
See Lucee at CFCamp Oct 22 & 23 2015 @ Munich Airport, Germany - Get your ticket NOW - http://www.cfcamp.org/
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/29c429a1-fbde-4fae-a673-6d256bf7ea36%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tom Chiverton

unread,
Oct 15, 2015, 6:52:35 AM10/15/15
to Lucee
On Wednesday, October 14, 2015 at 10:14:25 PM UTC+1, Jonathan Brookins wrote:
If I wanted to access the active connections to a given site by application name, is that accessible from Lucee libraries, or is that sort of information at the Tomcat level?  My goal is to write a Lucee app that shows the current connections by application name.  I could use context but in this case there are multiple web sites under a single context.  Any ideas?

It's possible to dig it out. Have a poke around

getPageContext().getConfig().getConfigServer('Weedfeed!0').getConfigWebs()

All the application names are

...scopeContext.getAllApplicationScopes()

And then you can get a session count for each with
...scopeContext.getAllSessionScopes( appname )

Is you mean actual HTTP connections, I'd just execute netstat -alpn|grep 80 and parse the results, though there may be a native Java way to do the same.

Tom

Jonathan Brookins

unread,
Oct 15, 2015, 12:57:01 PM10/15/15
to Lucee
Thanks, Tom.  I'll mess around with this a bit.  I suspect I'll have to do some JMX to Tomcat to get info as well, but I'll cross that bridge later.
Reply all
Reply to author
Forward
0 new messages