show config running xpath syntax

Reply
Highlighted
L0 Member

show config running xpath syntax

Hello,

I try to figure out the correct sytax for the xpath option of the show config running CLI-command (running PAN-OS 3.0.6).

? says:

+ xpath    xpath of the node to retrieve

but every way I tried to describe the node I want gives me a "Invalid syntax".

Tags (3)

Accepted Solutions
Highlighted
L0 Member

Re: show config running xpath syntax

Thanks! Playing around with this, I've learned I can't get every node within the configuration tree, e.g.

show config running xpath shared/log-settings/syslog works fine, but

show config running xpath mgt-config/users/admin does not.

So in the devices section, I can't reach anything below devices/localhost.localdomain, but that would be the interesting part...

View solution in original post


All Replies
Highlighted
L5 Sessionator

Re: show config running xpath syntax

These element nodes that can be used with the show config running xpath command;

admin@PA-500> show config running xpath devices
devices {
  localhost.localdomain {
    network {
      interface {
        ethernet {
          ethernet1/1 {
            virtual-wire ;    

              etc....

admin@PA-500> show config running xpath shared

shared {
  signature ;
  application ;
  application-group ;
  service ;
  service-group ;
  log-settings {
    syslog {
      Al-Syslog {
        server 10.16.0.232;
        port 514;
        facility LOG_USER;

            etc....

admin@PA-500> show config running xpath mgt-config

mgt-config {
  devices {
    localhost.localdomain {
      ip 127.0.0.1;
      vsys {
        vsys1 { }
             etc...

Highlighted
L4 Transporter

Re: show config running xpath syntax

Additional notes:

admin@mgmt-kestrel>  show config running xpath "shared/profiles/virus"          

virus  {

  custom-av  {

    decoder  {

      ftp  {

        action  block;

       }

      http  {

        action  block;

       }

      imap  {

        action  block;

       }

      pop3  {

        action  block;

       }

      smb  {

...

To get details of specific profile named 'custom-av'

show config running  xpath  "shared/profiles/virus/entry[@name='custom-av']"

custom-av  {

  decoder  {

    ftp  {

      action  block;

     }

    http  {

      action  block;

     }

    imap  {

      action  block;

     }

    pop3  {

      action  block;

     }

    smb  {

..

Highlighted
L0 Member

Re: show config running xpath syntax

Thanks! Playing around with this, I've learned I can't get every node within the configuration tree, e.g.

show config running xpath shared/log-settings/syslog works fine, but

show config running xpath mgt-config/users/admin does not.

So in the devices section, I can't reach anything below devices/localhost.localdomain, but that would be the interesting part...

View solution in original post

L0 Member

Re: show config running xpath syntax

Can someone give the solution in order to see only the deviceconfig node?

Thks

Remi

Highlighted
Not applicable

Re: show config running xpath syntax

show config running xpath devices/entry[@name="localhost.localdomain"]/deviceconfig

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!