Scheduled export of csv system log for Global Protect logins

Announcements

Changes to the LIVEcommunity experience are coming soon... Here's what you need to know.

Reply
dpeterson4
L2 Linker

Scheduled export of csv system log for Global Protect logins

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?


Accepted Solutions
BPry
Cyber Elite

@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


All Replies
BPry
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. 

dpeterson4
L2 Linker

@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

BPry
Cyber Elite

@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

dpeterson4
L2 Linker

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

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!