<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using Ansible to export stats-dump with specific time range in General Topics</title>
    <link>https://live.paloaltonetworks.com/t5/general-topics/using-ansible-to-export-stats-dump-with-specific-time-range/m-p/542567#M111129</link>
    <description>&lt;P&gt;Good morning, LIVE Community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to export stats-dump from a remote PaloAlto device to my local computer using Ansible.&lt;/P&gt;
&lt;P&gt;Prior to trying out Ansible, I'd usually use this command on the remote device to export stats-dump to my computer:&lt;/P&gt;
&lt;P&gt;&lt;CODE class="code css-z5oxh7" data-renderer-mark="true"&gt;scp export stats-dump remote-port &amp;lt;remote_port&amp;gt;&lt;/CODE&gt;&lt;CODE class="code css-z5oxh7" data-renderer-mark="true"&gt;start-time equal &amp;lt;YYYY&amp;gt;/&amp;lt;MM&amp;gt;/&amp;lt;DD&amp;gt;@00:00:00&lt;/CODE&gt;&lt;CODE class="code css-z5oxh7" data-renderer-mark="true"&gt;end-time equal &amp;lt;YYYY&amp;gt;/&amp;lt;MM&amp;gt;/&amp;lt;DD&amp;gt;@00:00:00&lt;/CODE&gt;&lt;CODE class="code css-z5oxh7" data-renderer-mark="true"&gt;to &amp;lt;username&amp;gt;@&amp;lt;remote_host&amp;gt;:&amp;lt;path/to/remote/file&amp;gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;---
- 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'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
    <pubDate>Thu, 18 May 2023 04:08:14 GMT</pubDate>
    <dc:creator>agatha</dc:creator>
    <dc:date>2023-05-18T04:08:14Z</dc:date>
    <item>
      <title>Using Ansible to export stats-dump with specific time range</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/using-ansible-to-export-stats-dump-with-specific-time-range/m-p/542567#M111129</link>
      <description>&lt;P&gt;Good morning, LIVE Community.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to export stats-dump from a remote PaloAlto device to my local computer using Ansible.&lt;/P&gt;
&lt;P&gt;Prior to trying out Ansible, I'd usually use this command on the remote device to export stats-dump to my computer:&lt;/P&gt;
&lt;P&gt;&lt;CODE class="code css-z5oxh7" data-renderer-mark="true"&gt;scp export stats-dump remote-port &amp;lt;remote_port&amp;gt;&lt;/CODE&gt;&lt;CODE class="code css-z5oxh7" data-renderer-mark="true"&gt;start-time equal &amp;lt;YYYY&amp;gt;/&amp;lt;MM&amp;gt;/&amp;lt;DD&amp;gt;@00:00:00&lt;/CODE&gt;&lt;CODE class="code css-z5oxh7" data-renderer-mark="true"&gt;end-time equal &amp;lt;YYYY&amp;gt;/&amp;lt;MM&amp;gt;/&amp;lt;DD&amp;gt;@00:00:00&lt;/CODE&gt;&lt;CODE class="code css-z5oxh7" data-renderer-mark="true"&gt;to &amp;lt;username&amp;gt;@&amp;lt;remote_host&amp;gt;:&amp;lt;path/to/remote/file&amp;gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;---
- 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'&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;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?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any help would be appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 04:08:14 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/using-ansible-to-export-stats-dump-with-specific-time-range/m-p/542567#M111129</guid>
      <dc:creator>agatha</dc:creator>
      <dc:date>2023-05-18T04:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using Ansible to export stats-dump with specific time range</title>
      <link>https://live.paloaltonetworks.com/t5/general-topics/using-ansible-to-export-stats-dump-with-specific-time-range/m-p/542653#M111141</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/292249"&gt;@agatha&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Just a brief glance there doesn't appear to be a way to customize this. Could you just use the XML-API and make the same call you were using previously?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 18 May 2023 21:00:34 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/general-topics/using-ansible-to-export-stats-dump-with-specific-time-range/m-p/542653#M111141</guid>
      <dc:creator>BPry</dc:creator>
      <dc:date>2023-05-18T21:00:34Z</dc:date>
    </item>
  </channel>
</rss>

