Creating an archive file (.zip) for xMatters Agent support

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.

Linux

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 xagent-support.sh

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

  4. Paste the following into the file:

    #!/bin/bash
    
    create_archive(){
      echo "Creating an archive of support materials for the xMatters Agent..."
      local theDate=`date +%d-%b-%y--%H.%M.%S`
      local zipFileName=xagent-support-$theDate.zip
      local logFile=/tmp/xagent-zip.log 
    
      date +"%x %r : Changing to root folder"  >> $logFile 
      pushd / >> $logFile 2>&1
    
      if [ -f /tmp ]
        then mktemp -d /tmp
      fi
    
      date +"%x %r : Creating zip archive /tmp/$zipFileName"  >> $logFile 
      zip /tmp/$zipFileName opt/xmatters/xa/bin/*.sh opt/xmatters/xa/bin/*.service etc/xmatters/xa/* var/log/xmatters/xmatters-xa/* >> $logFile 2>&1
      popd >> $logFile 2>&1
      echo "The archive can be found at /tmp/$zipFileName"
      date +"%x %r : Finished"  >> $logFile 
    
      return 0
    }
    
    create_archive
  5. Save the file.

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

    chmod a+x xagent-support.sh
  7. Invoke the script as root:

    ./xagent-support.sh

    Or, use sudo:

    sudo /bin/bash  ./xagent-support.sh
    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 /xagent-support.sh
Creating an archive of support materials for the xMatters Agent...
The archive can be found at /tmp/xagent-support-30-Mar-21--15.03.43.zip

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.

Windows

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

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk