seek linux script to collect PA CLI: debug log-receiver statistics

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.

seek linux script to collect PA CLI: debug log-receiver statistics

Not applicable

Hi,

I seek a script (Linux/window/or else) to collect information on PA: > debug log-receiver statistics

So a script that :

- connect to the appliance & loggin automaticly

- pass the command> debug log-receiver statistics

- optional : get only the lines begin by : "Log written rate:"

- or get all the return of the command INTO a file.

I ask this before i try to do it by myself. Then i just have use XLS do get the AVG, with this file.

Its to get calculate more easily the AVG log space :

I can do the CLI  command manualy  on day time, but on evening and night, im at home lol.  And i want more acurate AVG.

thanks!

1 accepted solution

Accepted Solutions

L3 Networker

There is a command called pancli in the PAN-perl package which will do this.  For example:

$ pancli -t pa-200 'debug log-receiver statistics | match "Log written rate:"'

Log written rate:              1/sec

$ perldoc pancli

PANCLI(1)         User Contributed Perl Documentation        PANCLI(1)

NAME

   pancli - command line program for remote execution of commands on
   PAN-OS

SYNOPSIS

    pancli [options] command
       -l username:password
       -h hostname
       -D flag           debug flag
       -t tag            .panrc tagname
       -T seconds        Expect match pattern timeout
       command           operational mode command

DESCRIPTION

   pancli is used to remotely execute commands on a PAN-OS firewall and
   display command output.  It uses the PAN::CLI module to perform command
   execution.

   The commands are executed in operational mode; the
   PAN::CLI::CLI_operational_mode_exec() method is used to execute the
   commands.

View solution in original post

2 REPLIES 2

L3 Networker

There is a command called pancli in the PAN-perl package which will do this.  For example:

$ pancli -t pa-200 'debug log-receiver statistics | match "Log written rate:"'

Log written rate:              1/sec

$ perldoc pancli

PANCLI(1)         User Contributed Perl Documentation        PANCLI(1)

NAME

   pancli - command line program for remote execution of commands on
   PAN-OS

SYNOPSIS

    pancli [options] command
       -l username:password
       -h hostname
       -D flag           debug flag
       -t tag            .panrc tagname
       -T seconds        Expect match pattern timeout
       command           operational mode command

DESCRIPTION

   pancli is used to remotely execute commands on a PAN-OS firewall and
   display command output.  It uses the PAN::CLI module to perform command
   execution.

   The commands are executed in operational mode; the
   PAN::CLI::CLI_operational_mode_exec() method is used to execute the
   commands.

thanks a lot work great

  • 1 accepted solution
  • 2336 Views
  • 2 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!