- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Enhanced Security Measures in Place: To ensure a safer experience, we’ve implemented additional, temporary security measures for all users.
05-17-2023 09:08 PM
Good morning, LIVE Community.
I'm trying to export stats-dump from a remote PaloAlto device to my local computer using Ansible.
Prior to trying out Ansible, I'd usually use this command on the remote device to export stats-dump to my computer:
scp export stats-dump remote-port <remote_port>
start-time equal <YYYY>/<MM>/<DD>@00:00:00
end-time equal <YYYY>/<MM>/<DD>@00:00:00
to <username>@<remote_host>:<path/to/remote/file>
I tried using the panos_export module, and it worked. But there is a problem, namely I can't seem to specify the time range for my stats-dump? Here is my Ansible playbook.
---
- name: Export configuration
hosts: all
connection: local
gather_facts: False
collections:
- paloaltonetworks.panos
tasks:
- name: Load variable
include_vars: vars.yml
- name: Get stats-dump file
panos_export:
provider: '{{provider}}'
category: 'stats-dump'
filename: '/home/ops-user/temp'
I know that by default, stats-dump would collect data for the last 7 days. If I want my stats-dump to collect data for the last month, is there a way to specify the time range in the Ansible playbook?
Any help would be appreciated.
Regards
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!