Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How are the HipChat server stats calculated?

Joe Yeakel August 8, 2017

HipChat Server provides some statistics for you when you run the following command on the application host:

hipchat stats -w

The output provides these stats:

Active Users: XXXX today, XXXX yesterday
CPU: X% of X cores
Chat Sessions: XXXX now, XXXX peak yesterday
Clock: 2017-08-08 15:19:47 UTC
Configuration Manager: OK
File Attachments: XXXX MB, XX.X% of capacity
Logs: XXXX MB, XX.X% of capacity
Memory: XX.X% of X GB total, X GB cache
Rooms: XXXX active, XXX archived, XXX deleted
Total Messages: XXXXXXX
Total Users: XXXX
Version: Atlassian HipChat X.X.X

Can someone clarify the meaning of "Active Users" and "Chat Sessions" and how they are calculated?

Are "Active Users" those with active sessions? Those that sent messages? How is a chat session defined?

1 answer

0 votes
AhmadDanial
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 9, 2017

Hi there, Joe. Let us break this one down to 2 different points. As far as I know, the values represent the following:

  • Active Users:
    • XXX today - The total number of users who have sent at least 1 message as of that moment when the command was executed
    • XXX yesterday - The total number of users who have sent at least 1 message the day before
  • Chat Sessions:
    • XXX now - The total number of active sessions that users are currently connected on when the command was executed
    • XXX peak yesterday - The highest number of sessions that users were connected to yesterday. For example, at 10:00, there were a total of 500 active sessions. At 18:00, a it went up to 1500 active sessions. So, that the information that will be displayed is 1000 peak yesterday

I am in the process to double confirm about this information with the dev team nevertheless.

AhmadDanial
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
August 23, 2017

Confirmed with the devs that the explanation is accurate, Joe. Let me know if you have adiitional questions on this.

Javier November 7, 2018

And, how do you calculate Total Messages? Bots messages or notifications from Jira or Confluence are included?

We are planning to move to Slack and I would like to establish some KPIs and, obviously, the number of messages is one of these KPIs but I need to know how they are calculate in order to be able to compare accurately

AhmadDanial
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 8, 2018

Hi, Javier.

You can use the following script below to obtain the accurate number of messages you have on HipChat Server using a script. Please refer to the steps below.

SSH to the HipChat Server  terminal or SSH console

Either create a new directory to store the script or just create a file called message_counter.sh / you can SCP the file to the /home/admin directory. This is the content of the file.

#!/bin/bash
# This script counts the message entries directly from the database
# Must run inside Hipchat Server command line interface

counts=$(curl 'localhost:9200/_cat/indices?v' | awk 'FNR > 1 {print $6}')

total=0

for number in $counts
do
total=$(($total+$number))
done

echo "Total messages: $total"

Once saved, make it executable using the command below:

chmod +x message_counter.sh

Run the command and you should receive something that looks like this:

admin@hipchat:~/scripts$ ./message_counter.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 170 100 170 0 0 13146 0 --:--:-- --:--:-- --:--:-- 14166
Total messages: 78614

Let me know how it goes on your end. Thanks.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events