Auto-commit

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Please sign in to see details of an important advisory in our Customer Advisories area.

Auto-commit

L2 Linker

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?

1 accepted solution

Accepted Solutions

L5 Sessionator

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.

View solution in original post

5 REPLIES 5

L5 Sessionator

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.

L2 Linker

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>

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 

Community Team Member

Hi @Stuart_Walton,

 

It's run on another device.

Check this link on getting started with the API :

 

Getting Started with the API

 

Cheers !

-Kiwi.

LIVEcommunity team member, CISSP
Cheers,
Kiwi
Please help out other users and “Accept as Solution” if a post helps solve your problem !

Read more about how and why to accept solutions.

Thanks Kiwi!!!!

  • 1 accepted solution
  • 4892 Views
  • 5 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

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!