Create a script that automatically sends the support bundle utilizing the Unix crontab scheduler and scripting.
You can customize the script to identify where the location of the support bundle needs to be and the frequency of sending the bundle.
All you need is a crontab & script file.
Crontab
- Set up a crontab
- Execute crontab -e
- Add:
0 1 * * * /put_location_of_the_script.sh
#this means the file will be executed at 1 am daily
Script
Example script name: sendlog.sh
Step 1. Create a directory of where the support bundle needs to go
Step 2. Create a file sendlog.sh
#add the new script here for the modeler log export jwt=`curl --insecure -s -X GET -u admin:"password" "http://localhost:10500/default/auth"` curl --insecure -o -H "Authorization:Bearer $jwt" /home/atscale/support/mycompany-`date +%Y-%m-%d`.zip http://localhost:10502/support/all?LogFiles.Window=1.day |
Step 3. Update the script with the file's location and mycompany to easily identify where the support bundle comes from. To change the host/port #, contact the AtScale Admin for information about how they configured the AtScale ports/host.
Step 4. Chmod sendlog.sh to be executable
Step 5. Contact AtScale Tech Support and ask to verify if they received the file named <mycompany-[date]>
Update the script depending on which AtScale version is deployed. You need to add these at the beginning of the script.
AtScale 2022.2 and earlier releases
gzip -f /opt/atscale/log/modeler/Modeler.log |
AtScale 2022.3 and later releases
gzip -r /opt/atscale/log/modeler |
Another option, with root access you can create a log rotation in /etc/logrotate.d
Create a file atscale-modeler
/opt/atscale/log/modeler/Modeler.log { |