This article is to show you a step-by step on how to create a script in the run command box and send your logs to Addigy. This action would imply when Addigy request logs for when issue occurs.
Creating a script to retrieve logs
1. Select the Devices button on your navigation pane.
2. Click on Manage button located on the right side of the window.
3. Create a Name for the Script.
4. Copy and paste from the code snippet below into the Bash File Content box.
#!/bin/bash device=$(hostname | awk -F'.' '{print $1}') file_path="/Library/Addigy/logs" #Create System Report system_profiler -xml > ${file_path}/system_information.spx body=$(/Library/Addigy/go-agent upload ${file_path}) curl -d "${body}" -H "Content-Type: application/json" -H "Device-Name: ${device}" -X POST https://log-shipper.addigy.com/api/get-device-logs
5. Click the Create button to save the code for future use.
Sending logs to Addigy
6. Return back to Devices page.
7.Select which device you would like to retreive the logs from.
8. Type the name of the script created in Step 5 into the run command box.
9. Click on the Send button to push the command to the machines selected.
10. You can see the progress of the command by selecting the History button.
11. There you will be able to track the status of the command that was sent.