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:
-
Log in to the server as root or by using the sudo command.
-
Create a new text file on the server and name it xagent-support.sh
-
Using a text editor, open the newly created file.
-
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 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 http://127.0.0.1:8081/health >> $diagFile 2>&1 $diagFile printf "\nxAgent info metrics:\n" >> $diagFile curl -s http://127.0.0.1:8081/info >> $diagFile 2>&1 $diagFile printf "\nxAgent prometheus metrics:\n" >> $diagFile curl -s http://127.0.0.1:8081/prometheus >> $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 }
create_archive -
Save the file.
-
On Linux, use the following command to make the file executable:
chmod a+x xagent-support.sh
-
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:
-
Log in to the server as a user with administrative privileges and open Windows Explorer (file manager).
-
Open the xMatters Agent home folder: c:\program files\xa
-
Create a new folder within c:\program files\xa and give it a name similar to: xagent-support-30-march-2021--15.27
-
Right click the config folder and select Copy.
-
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.)
-
Repeat the previous steps to copy the servicelog and xalog folders into the xagent-support folder.
-
Right click the xagent-support folder and select Cut.
-
Choose a folder that doesn't require admin access (for example, your home folder) and paste the xagent-support folder into it.
-
Right click the xagent-support folder and select Properties.
-
Clear the Read-only check box.
-
Click Apply to apply the changes.
-
Click OK.
-
Right click the xagent-support folder and hover over Send to.
-
From the menu, select Compressed (zipped) folder.
-
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.
Comments
0 commentsPlease sign in to leave a comment.