Creating a support-zip archive for xMatters Agent

If you need to contact Customer Support for help with the xMatters Agent, you'll probably be asked to attach a .zip archive to the support request. This archive will contain server files and log data that the Support team needs to offer assistance.


To access xMatters Agent files, you need to have root or sudo access to the xMatters Agent server (with .zip utility installed).

To create the script file and archive:

  1. Log in to the server as root or by using the sudo command.

  2. Create a new text file on the server and name it

  3. Using a text editor, open the newly created file.

  4. Paste the following into the file:

       echo "Creating an archive of support materials for the xMatters Agent..."
       local theDate=`date +%d-%b-%y--%H.%M.%S`
       local zipFileName=xagent-support-$
       local logFile=/tmp/xagent-zip.log
       local diagFile=/tmp/xagent-diagnostics.log
    date +"%x %r : Changing to root folder"  > $logFile pushd / >> $logFile 2>&1
    if [ -f /tmp ] then mktemp -d /tmp fi
    date +"%x %r : Reading diagnostic info from xAgent"  >> $logFile printf "\nxAgent health metrics:\n" > $diagFile curl -s >> $diagFile 2>&1 $diagFile printf "\nxAgent info metrics:\n" >> $diagFile curl -s >> $diagFile 2>&1 $diagFile printf "\nxAgent prometheus metrics:\n" >> $diagFile curl -s >> $diagFile 2>&1 $diagFile printf "\n=====================================================================\n" >> $diagFile
    date +"%x %r : Creating zip archive /tmp/$zipFileName"  >> $logFile zip /tmp/$zipFileName opt/xmatters/xa/bin/*.sh opt/xmatters/xa/bin/*.xml opt/xmatters/xa/bin/*.service etc/xmatters/xa/* var/log/xmatters/xmatters-xa/* /home/xmatters/.java/.userPrefs/com/xmatters/xagent/services/prefs.xml $diagFile $logFile >> $logFile 2>&1 popd >> $logFile 2>&1 echo "The archive can be found at /tmp/$zipFileName" date +"%x %r : Finished"  >> $logFile
    return 0 }
  5. Save the file.

  6. On Linux, use the following command to make the file executable:

    chmod a+x
  7. Invoke the script as root:


    Or, use sudo:

    sudo /bin/bash  ./
    Note: If using sudo you need to explicitly ask for the script to be executed via the bash interpreter.

Once complete, the output should be similar to:

$ sudo /bin/bash /
Creating an archive of support materials for the xMatters Agent...
The archive can be found at /tmp/

Now you have an xagent-support .zip file that you can attach to an xMatters support request

Note: If you're having issues with the script running, troubleshooting information can be found in: /tmp/xagent-zip.log.


As the command-line .zip utility isn't widely used on Windows servers, the easiest way to create an xMatters Agent .zip archive on a Windows server is to copy the relevant files into a new folder and compress it. To access the xMatters Agent folder, you'll need to have administrator permissions on the server.

To create the compressed folder:

  1. Log in to the server as a user with administrative privileges and open Windows Explorer (file manager).

  2. Open the xMatters Agent home folder: c:\program files\xa

  3. Create a new folder within c:\program files\xa and give it a name similar to: xagent-support-30-march-2021--15.27

  4. Right click the config folder and select Copy.

  5. Right click the new xagent-support folder and click Paste. If you receive a permission denied error message, click Continue. (From now on, we will take it as read that each time you are asked for confirmation you will say yes.)

  6. Repeat the previous steps to copy the servicelog and xalog folders into the xagent-support folder.

  7. Right click the xagent-support folder and select Cut.

  8. Choose a folder that doesn't require admin access (for example, your home folder) and paste the xagent-support folder into it.

  9. Right click the xagent-support folder and select Properties.

  10. Clear the Read-only check box.

  11. Click Apply to apply the changes.

  12. Click OK.

  13. Right click the xagent-support folder and hover over Send to.

  14. From the menu, select Compressed (zipped) folder.

  15. Click Enter to confirm the name of the new .zip file.

Now you have an xagent-support .zip file that you can attach to an xMatters support request

Was this article helpful?
0 out of 0 found this helpful



Please sign in to leave a comment.