Can I script through CLI to run reports with custom reports

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.

Can I script through CLI to run reports with custom reports

L0 Member

I am having an issue getting the "email scheduler" to send custom reports properly.  Essentially we want a report, that covers 7 days worth of data/logs that will be sent every week via email to a group of people, preferably via CSV format; however speaking with PA support on this issue there is a pending feature request (low priority, so no info on when this feature request will be implemented) to have the email scheduler function and export reports properly to a csv format. Also, the other issue and the main issue that we have currently is that PA support advised to create custom reports to cover a 7 day time frame that we are requesting, using a selected PA predefined report template within the custom reports and pulling the attributes and columns we wanted the report to display. The main issues we are running into are that: 

 

1- using the email scheduler reports do not resolve hostnames properly using the email sceduler. 

2- even though we select the "sort by" or "group by" options in the report, the report will sort by time. - so we have to sort through pages and pages worth of data- tjis is why we want the report as a csv format.

3- some of the custom reports will not include all selected "columns" we have selected via the custom reporter. 

 

When we select the "run now" option with these custom reports, using the same parameters we have selected with the email scheduler, the reports generate completely fine, including the capability to successfully export the report into csv format. 

 

Can we write or create a script to essentially perform the "run now" function to export the custom report as a proper csv format and send out the report via email?

1 REPLY 1

L3 Networker

Well, you can script all this process you described in your post, but you will need knowledge about PA API and some scripting skills:

 

- Create a Custom Report.

- Create a custom script that query for that particular custom report whenever you need to, via crontab for example.

- Retrive the job.

- Process and show all this inforamtion the way you like

 

Take a look at this other post:

https://live.paloaltonetworks.com/t5/APIs/Retrieve-ACC-information-via-XML-API/m-p/78639#U78639

  • 2600 Views
  • 1 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!