Not logged in. · Lost password · Register
Forum: MatriX RSS
Avatar
pvanroos #1
Member since Mar 2012 · 5 posts
Group memberships: Members
Show profile · Link to this post
Subject: Get active client sessions
Is there an object available that I can use to get all the active client connections on the server?  List and count of XMPPClients basically....
Avatar
Alex #2
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
This depends on the server software you are using. Many server software exposes this data to users which are set at server admins over ad-hoc commands or service discovery.

See: XEP-0133: Service Administration
Avatar
pvanroos #3
Member since Mar 2012 · 5 posts
Group memberships: Members
Show profile · Link to this post
OS:  Windows 2008 R2 Enterprise Ed

I was thinking that the Matrix library provided some objects to connect and get that list.  I looked at the Roster and was hoping I could get status, but I want a full list regardless of the whose Roster I'm accessing.

Does this make sense?

I could build a raw WebClient (or HttpWebClient) and have it scrape the the HTML but that's too much work. :-)
Avatar
Alex #4
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by pvanroos:
OS:  Windows 2008 R2 Enterprise Ed

the XMPP server software matters, not the OS of the server itself.

Quote by pvanroos:
I was thinking that the Matrix library provided some objects to connect and get that list.
it does. There is ervrything you need.

Quote by pvanroos:
I looked at the Roster and was hoping I could get status, but I want a full list regardless of the whose Roster I'm accessing.

as I said before, some servers implement such a feature to admin users.

Quote by pvanroos:
Does this make sense?
I can only tell you if it makes sense when you describe your use case in detail.
In XMPP you get the presence only of your subscribed contacts which makes sense.

Alex
Avatar
pvanroos #5
Member since Mar 2012 · 5 posts
Group memberships: Members
Show profile · Link to this post
Sorry Alex.  Let me be more specific.

I'm running Openfire 3.7.1. 

Here's what I want to do.  I want to build a simple monitoring application that gives me real-time statistics of:

1)  Number of Active User sessions
2)  Possibly current message load
3)  Number of messages cached, awaiting delivery to client

What specific classes in what namespace should I use?  A simple snippet of code would be very much appreciated.

Thanks a bunch.
Avatar
Alex #6
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I don't know if this is supported by Openfire. I guess not, because they do most stuff over the webadmin and not over XMPP.
You should ask this in the Openfire forums and they come back when they have a solution for this over XMPP. Then I can help you to build the packets.

Alex
Avatar
pvanroos #7
Member since Mar 2012 · 5 posts
Group memberships: Members
Show profile · Link to this post
Subject: Plugins
There are plugins. The montoring plugin is promising but still only accessible through the webadmin. I was hoping for a homegrown solution.

Can you check user status a RosterItem?  Maybe I could get a Roster and check each user's status on this Roster?

-Paul
Avatar
Alex #8
Member since Feb 2003 · 4297 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
you get the status of every user in your roster automatically in the OnPresence event. So when you add every user on your server to a roster of a bot this works.

Alex
Avatar
pvanroos #9
Member since Mar 2012 · 5 posts
Group memberships: Members
Show profile · Link to this post
Thanks Alex.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: MatriX RSS