Expect Scripts

L1 Bithead

Expect Scripts

I see there are a couple of Expect scripts on the PA support site. 1 of them can be used to automate config changes. However, the doc does not explain how to use them. Do the scripts run on a host PC or on the PAN device? How specifically do I get them to run?

L0 Member

Re: Expect Scripts

Such scripts would be run from a trusted PC used to remotely manage the PA device.  A read-write administrator account would be created for their use.

It's not a good idea to venture into such things unless you are very comfortable with shell scripting and Perl, and the management PC is very, very secure.

I would recommend that if you dabble with automating things, begin with read-only access to pull stats and such before graduating to more complicated and dangerous activities.

The Palo Alto PAN-perl-20110828.tar.gz package has examples for use of Perl and Expect.  I posted a simple Perl Net::OpenSSH script in this forum.  There's also the XML API, see docs DOC-1031.pdf and DOC-1714.pdf to get started.

Most automation approaches require a Linux managment PC, although I imagine that a person would be able to use Windows and something like AutoIT or other batch tool.

Good luck.

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 Live Community as a whole!

The Live Community thanks you for your participation!