Using ad-hoc commands to get basic server stats

Before I go into production with my Wildfire server I need to implement basic monitoring and metrics. I was contemplating a simple client that would connect to the server and use ad-hoc commands to request the stats I need. I’'ve given this a try with PSI but its not working for me. Example…

  • Request* ***

<iq from="st0nkingbyte@domain.com/Psi" type=“get” id=“get-active-users-num-1” to=“domain.com” xml:lang=“en”>

<command xmlns=“http://jabber.org/protocol/commands

node=“http://jabber.org/protocol/admin#get-active-users-num

action=“execute”/>

</iq>

  • Reply* ***

<iq from=“domain.com” type=“error” to="st0nkingbyte@domain.com/Psi" id=“get-active-users-num-1” >

<command xmlns=“http://jabber.org/protocol/commands

node=“http://jabber.org/protocol/admin#get-active-users-num

action=“execute” />

<error type=“modify” code=“400” >

<bad-request xmlns=“urn:ietf:params:xml:ns:xmpp-stanzas”/>

</error>

</iq>

I patterning my request after the example found here:

http://www.jabber.org/jeps/jep-0133.html#get-active-users-num

Should this work?

Hi,

I think support for JEP-0133 and JEP-0050 isn’‘t quite there yet in Wildfire. First of all, a disco#info on the server doesn’'t return:

If you are going to use this solution then let me know so I can quickly create the “get number of users in the system” command.

in http://www.jivesoftware.org/community/message.jspa?messageID=127915#127915.

I get the very basic information I need by using netstat. (Sorry is this is windows it will not apply)

your command could look something like this:

#netstat -a|grep 5222|lc -l (that is lower case L)

it will give you a numeric value of how many connections go to port 5222 you can change the number to 5223 and get that number for SSL conenctions. I wrote a little shell script that does it and give me the connections for both.

If you want something you can just see versus going to the command line, I believe Pandion has the ability to show you how many connections and who they are as one of its tools. Hope one of those will help you.

Jeff