Scheduled export of csv system log for Global Protect logins

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Scheduled export of csv system log for Global Protect logins

L2 Linker

Have been looking around trying to find this and can't find it.

 

I have a filter for system logs to filter all the successfull Global Protect logins for the last calendar week.

 

I have been manually exporting this to a csv but wanted to schedule the process to email the csv out.

 

Is there any way to do this?

1 accepted solution

Accepted Solutions

@dpeterson4,

You need to modify the nlogs value, which defaults to 20 if not included in the request.  

 

https://firewall/api/?type=log&log-type=system&query=(eventid eq globalprotectportal-auth-succ)&nlogs=5000&key=key

View solution in original post

4 REPLIES 4

Cyber Elite
Cyber Elite

@dpeterson4,

Do it through the API. Since you can't query the system logs in a custom job you can't really schedule it. 

 

https://firewall/api/?type=log&log-type=system&query=(eventid eq globalprotectportal-auth-succ)

Obviously replace the query with your own. 

 

https://firewall/api/?type=log&action=get&job-id=id

pull the job-id from the first command by reading <job>value</job> and feed that value into the second command. 

@BPry Thanks for the info!  Got that to work but it's only returning 20 log entries and there are over 600.  Any idea on how to get it to show all of them?

 

Thank you,

 

-Dustin

@dpeterson4,

You need to modify the nlogs value, which defaults to 20 if not included in the request.  

 

https://firewall/api/?type=log&log-type=system&query=(eventid eq globalprotectportal-auth-succ)&nlogs=5000&key=key

Awesome!! You rock, that did it, thank you!!

  • 1 accepted solution
  • 3061 Views
  • 4 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!