How to open a Hipchat Server diagnostic bundle

Still need help?

The Atlassian Community is here for you.

Ask the community

Purpose

Hipchat Server's command-line interface utility can collect, compress, archive, and host a bundle of log files using hipchat diagnostics -b, --bundle-logs.

This page contains the steps necessary to open the resulting log bundle.

This page assumes you are opening the diagnostic bundle on a computer with a command-line interface, and the gpg and tar applications installed.


Solution

  1. Download the log bundle generated by hipchat diagnostics -b
  2. Run the following command to decrypt the log bundle, replacing '<logBundle>' with the path to the log bundle file:

    gpg --decrypt <logBundle> | tar xf -

    You will be prompted for the passphrase to the log bundle after entering the command.

  3. Within the resulting "log" directory, each individual log file is compressed with gzip. These can be decompressed with:

    tar xzf <logFileName.gz>

Alternatively, at the directory containing the "log" directory, run the following command to decompress each individual log through iteration:

for file in `find log/ -name *.log.gz`; do tar xzvf $file --strip-components 1 && rm $file; done

Example

Below is an example of generating a log bundle, decrypting and decompressing it, then decompressing the individual log files through iteration.

admin@example:~/logBundles$ hipchat diagnostics -b
Compressing logs.......................................................... done
Encrypting the log bundle: /file_store/diagnostics/export/hcs-diagnostic-logs-20180103-212907-msGcLtO8tYBOIUZT.tar.gpg... done
Download URL: https://example.hipchatserver.com/files/diagnostics/hcs-diagnostic-logs-20180103-212907-msGcLtO8tYBOIUZT.tar.gpg
Passphrase: 2iSm5xOB2qUhvRKKyu
admin@example:~/logBundles$ wget  https://example.hipchatserver.com/files/diagnostics/hcs-diagnostic-logs-20180103-212907-msGcLtO8tYBOIUZT.tar.gpg
--2018-01-03 21:29:21--  https://example.hipchatserver.com/files/diagnostics/hcs-diagnostic-logs-20180103-212907-msGcLtO8tYBOIUZT.tar.gpg
Resolving example.hipchatserver.com (example.hipchatserver.com)... 127.0.0.1, 127.0.0.1
Connecting to example.hipchatserver.com (example.hipchatserver.com)|127.0.0.1|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1146968 (1.1M) [application/octet-stream]
Saving to: ‘hcs-diagnostic-logs-20180103-212907-msGcLtO8tYBOIUZT.tar.gpg’

100%[========================================================================================================================================>] 1,146,968   --.-K/s   in 0.003s  

2018-01-03 21:29:21 (355 MB/s) - ‘hcs-diagnostic-logs-20180103-212907-msGcLtO8tYBOIUZT.tar.gpg’ saved [1146968/1146968]

admin@example:~/logBundles$ gpg --decrypt hcs-diagnostic-logs-20180103-212907-msGcLtO8tYBOIUZT.tar.gpg | tar xf -
gpg: AES256 encrypted data
gpg: gpg-agent is not available in this session
gpg: encrypted with 1 passphrase
admin@example:~/logBundles$ ls
hcs-diagnostic-logs-20180103-212907-msGcLtO8tYBOIUZT.tar.gpg  log
admin@example:~/logBundles$ for file in `find log/ -name *.log.gz`; do tar xzvf $file --strip-components 1 && rm $file; done
var/log/redis/redis-server.log
var/log/php5-fpm.log
var/log/redis-server.log
var/log/cloud-init-output.log
var/log/landscape/sysinfo.log
var/log/redis-stats.log
var/log/unattended-upgrades/unattended-upgrades-shutdown.log
var/log/boot.log
var/log/alternatives.log
var/log/hipchat/hup.log
var/log/hipchat/coral.log
var/log/hipchat/web.log
var/log/hipchat/apache.log
var/log/hipchat/gearman.log
var/log/hipchat/mymysql.log
var/log/hipchat/authorized_keys.log
var/log/hipchat/nginx.err.log
var/log/hipchat/emoticon-upload.log
var/log/hipchat/daemon.log
var/log/hipchat/hcapp.log
var/log/hipchat/web.err.log
var/log/hipchat/consul.log
var/log/hipchat/update.log
var/log/hipchat/php-fpm.log
var/log/hipchat/user.log
var/log/hipchat/elasticsearch.log/elasticsearch_index_indexing_slowlog.log
var/log/hipchat/elasticsearch.log/elasticsearch_index_search_slowlog.log
var/log/hipchat/elasticsearch.log/elasticsearch.log
var/log/hipchat/cron.log
var/log/hipchat/hipchat-server-cli.log
var/log/hipchat/atlassian-crowd.log
var/log/hipchat/punjab.log
var/log/hipchat/nginx.log
var/log/hipchat/auth.log
var/log/hipchat/punjab.err.log
var/log/hipchat/mail.log
var/log/hipchat/syslog.log
var/log/hipchat/runtime.log
var/log/hipchat/db.log
var/log/hipchat/tetra.log
var/log/hipchat/tetra.err.log
var/log/hipchat/configurationclient.log
var/log/hipchat/kern.log
var/log/hipchat/coral.err.log
var/log/cloud-init.log
var/log/mysql.log
var/log/gearman-job-server/gearman.log
var/log/apt/term.log
var/log/apt/history.log
var/log/monit.log
var/log/auth.log
var/log/dpkg.log
var/log/chef.log
var/log/kern.log
var/log/scaled_disks.log
var/log/nginx/error.log
var/log/nginx/access.log
admin@example:~/logBundles$ ls -l log/
total 3112
-rw-r--r-- 1 admin admin       0 Dec  4 15:22 alternatives.log
drwxr-xr-x 2 admin admin    4096 Jan  3 21:29 apt
-rw-r----- 1 admin admin       0 Dec  4 15:22 auth.log
-rw-r--r-- 1 admin admin  173415 Dec  4 15:27 boot.log
-rw-r--r-- 1 admin admin  145271 Dec 21 17:06 chef.log
-rw-r--r-- 1 admin admin  151780 Dec  4 15:27 cloud-init.log
-rw-r--r-- 1 admin admin    3743 Dec  4 15:27 cloud-init-output.log
-rw-r--r-- 1 admin admin       0 Jan  1 06:33 dpkg.log
drwxr-xr-x 2 admin admin    4096 Jan  3 21:29 gearman-job-server
drwxr-xr-x 3 admin admin    4096 Jan  3 21:29 hipchat
-rw-r----- 1 admin admin       0 Dec  4 15:22 kern.log
drwxr-xr-x 2 admin admin    4096 Jan  3 21:29 landscape
-rw-r----- 1 admin admin       0 Dec  4 15:22 monit.log
-rw-r----- 1 admin admin       0 Jan  3 06:36 mysql.log
drwxr-xr-x 2 admin admin    4096 Jan  3 21:29 nginx
-rw------- 1 admin admin       0 Dec  4 15:22 php5-fpm.log
drwxr-xr-x 2 admin admin    4096 Jan  3 21:29 redis
-rw-r--r-- 1 admin admin 2390179 Jan  3 21:28 redis-server.log
-rw-r--r-- 1 admin admin  278346 Jan  3 21:17 redis-stats.log
-rw-r--r-- 1 admin admin      73 Dec  4 15:22 scaled_disks.log
drwxr-xr-x 2 admin admin    4096 Jan  3 21:29 unattended-upgrades



Last modified on Jan 19, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.