- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
11-25-2013 04:10 PM
there a way to set the auto-commit on a schedule?, and if i have changes of configuration pending, the autocommit will apply the changes?
11-25-2013 07:18 PM
As of now there isn't a way to do the same. But there is a feature request(ID: 1041) in place.Please have your SE vote for the same.
11-25-2013 07:18 PM
As of now there isn't a way to do the same. But there is a feature request(ID: 1041) in place.Please have your SE vote for the same.
02-24-2015 07:29 AM
I wrote a small Bash script that you can schedule with cron to perform a nightly auto-commit via the API. If you need help getting started with the API, this doc was awesome: https://live.paloaltonetworks.com/docs/DOC-4126
$ cat panorama-commit.sh
#!/bin/bash
wget --no-check-certificate 'https://hostname.com/api/?type=commit&cmd=<commit></commit>&key=*****SUPERLONGAPIKEYJUNK********' -O - >> commitlog.txt
Make sure to remove global read access to the script because it contains the API key. Here's the cron table. Make sure to have the path you're executing the script from configured in the cron tab. I edited mine out for brevity.
$ crontab -l
0 8 * * * ./panorama-commit.sh
Sample log output:
$ cat commitlog.txt
<response status="success" code="19"><result><msg><line>Commit job enqueued with jobid 2274</line></msg><job>2274</job></result></response>
09-06-2017 01:45 AM
Hi mgentile
I was interested to read your post about scheduling a commit on your Palo's. I had thought that something could be done with crontab and when I read your post i was really pleased.
However, I do have a question...
Have you written the bash script and run it from another server/device or is the script located on your Palo and you have scheduled using the Palo's crontab? If you have done it on the Palo how have you accessed the crontab? where did you locate the script? can you provide a little more detail? I'll be honest linux/unix are not my forte - I know a little to get by!
Cheers
Stu
09-06-2017 02:07 AM
Hi @Stuart_Walton,
It's run on another device.
Check this link on getting started with the API :
Cheers !
-Kiwi.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!