{"id":4154,"date":"2022-06-01T08:08:38","date_gmt":"2022-06-01T15:08:38","guid":{"rendered":"https:\/\/SUMMALAI.COM\/?p=4154"},"modified":"2022-06-01T08:08:40","modified_gmt":"2022-06-01T15:08:40","slug":"how-to-clear-logs-to-increase-disk-space-on-a-palo-alto-firewall","status":"publish","type":"post","link":"https:\/\/SUMMALAI.COM\/?p=4154","title":{"rendered":"How to Clear Logs To Increase Disk Space on a Palo Alto Firewall"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\"><\/h1>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Symptom<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>The \/opt\/panlogs disk partition is high<\/li><\/ul>\n\n\n\n<pre class=\"wp-block-preformatted\">&gt; show system disk-space\n\nFilesystem      Size  Used Avail Use% Mounted on\n\/dev\/root       7.0G  4.1G  2.6G  62% \/\nnone            3.2G   92K  3.2G   1% \/dev\n\/dev\/sda5        16G  2.4G   13G  16% \/opt\/pancfg\n\/dev\/sda6       8.0G  3.2G  4.4G  43% \/opt\/panrepo\ntmpfs           2.2G  1.7G  492M  78% \/dev\/shm\ncgroup_root     3.2G     0  3.2G   0% \/cgroup\n\/dev\/sda8       125G  115G  3.7G  97% \/opt\/panlogs   <em><strong>&lt;----- Shows above 95%<\/strong><\/em>\n<\/pre>\n\n\n\n<p><strong>Environment<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Palo Alto Firewall<\/li><\/ul>\n\n\n\n<p><strong>Resolution<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>To reduce disk usage instantly, delete all logs for a given log type&nbsp; (<em>logs can not be deleted according to the date<\/em>).&nbsp;<\/li><li>The following logs can be cleared<ul><li>Traffic logs<\/li><li>Threat, URL, and Data Logs<\/li><li>Configuration logs<\/li><li>System logs<\/li><li>HIP Match logs<\/li><li>GlobalProtect logs<\/li><li>Alarm logs<\/li><li>Tunnel, GTP logs<\/li><li>User-ID logs<\/li><li>IP-Tag logs<\/li><li>Authentication logs<\/li><li>Decryption logs<\/li><li>ACC database (CLI command only)<\/li><li>SCTP logs (CLI command only)<\/li><\/ul><\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"toc-hId-1158995245\"><strong>Clear logs via the WebGUI<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\"><li><strong>Device &gt; Log Setting &gt;<\/strong>&nbsp;Scroll down to&nbsp;<strong>Manage Logs<\/strong>.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/knowledgebase.paloaltonetworks.com\/servlet\/rtaImage?eid=ka14u000000sgVc&amp;feoid=00N0g000003VPSv&amp;refid=0EM4u0000055Z55\" alt=\"Clear Logs\"\/><\/figure>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>Click the log type you want to clear and click&nbsp;<strong>YES&nbsp;<\/strong>to confirm the request.<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/knowledgebase.paloaltonetworks.com\/servlet\/rtaImage?eid=ka14u000000sgVc&amp;feoid=00N0g000003VPSv&amp;refid=0EM4u0000055Z5A\" alt=\"Confirm Clear Logs\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"toc-hId-2046498926\"><strong>Clear logs via the CLI<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\"><li>Log into CLI<\/li><li>Use&nbsp;the&nbsp;<strong>clear log<\/strong>&nbsp;command to clear the log type you want, then confirm.admin@PAN&gt; <strong>clear log<\/strong> &gt; acc ACC database &gt; alarm Alarm logs &gt; auth Authentication logs &gt; config Configuration logs &gt; decryption Decryption logs &gt; globalprotect GlobalProtect logs &gt; gtp Tunnel and GTP logs &gt; hipmatch Hipmatch database &gt; iptag Iptag logs &gt; sctp SCTP logs &gt; system System logs &gt; threat Threat logs &gt; traffic Traffic logs &gt; userid User-ID logs <strong>&nbsp; <em>(Example clearing hipmatch log)<\/em><\/strong> admin@PAN&gt;<strong> clear log hipmatch<\/strong> Hipmatch database will be removed. Do you want to continue? (y or n) <strong>Note<\/strong>: Clearing the&nbsp;<strong>threat<\/strong>&nbsp;log also clears the URL log.<br>&nbsp;<\/li><\/ol>\n\n\n\n<p>If none of the above remediation steps resolve the issue, it is recommended to collect the following&nbsp;<strong>Troubleshooting Data<\/strong>&nbsp;below and open a Support Case.<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>Collect&nbsp;<strong>Tech Support File<\/strong>&nbsp;&nbsp;(<strong>GUI<\/strong>: Device &gt; Support &nbsp;<strong>Click<\/strong>&nbsp;Generate Tech Support File)<\/li><li>Collect the output of the CLI show system disk-space&nbsp;<\/li><\/ol>\n\n\n\n<p><strong>Additional Information<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>To prevent logs from filling up \/opt\/panlogs Disk quota can be utilized and adjusted.&nbsp;(<strong>Device &gt; Setup &gt;<\/strong>&nbsp;scroll down to&nbsp;<strong>Logging and Reporting Settings)<\/strong><ul><li>Logs are purged when the quota is exceeded, so it is recommended not to allocate more than 95% of the space to allow some buffer space. Set the &#8220;<strong>Max Days<\/strong>&#8221; (Retention Period) so that log purging operation works seamlessly and prevents the disk from filling up. See&nbsp;<a href=\"https:\/\/knowledgebase.paloaltonetworks.com\/KCSArticleDetail?id=kA10g000000ClgZCAS\" target=\"_blank\" rel=\"noreferrer noopener\">How to Determine How Much Disk Space is Allocated to Logs<\/a><\/li><\/ul><\/li><\/ul>\n\n\n\n<p>Ref: https:\/\/knowledgebase.paloaltonetworks.com\/KCSArticleDetail?id=kA10g000000ClSjCAK<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Symptom The \/opt\/panlogs disk partition is high &gt; show system disk-space Filesystem Size Used Avail Use% Mounted on \/dev\/root 7.0G 4.1G 2.6G 62% \/ none 3.2G 92K 3.2G 1% \/dev \/dev\/sda5 16G 2.4G 13G 16% \/opt\/pancfg \/dev\/sda6 8.0G 3.2G 4.4G 43% \/opt\/panrepo tmpfs 2.2G 1.7G 492M 78% \/dev\/shm cgroup_root 3.2G 0 3.2G 0% \/cgroup \/dev\/sda8 <a class=\"read-more\" href=\"https:\/\/SUMMALAI.COM\/?p=4154\">Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[13,9],"tags":[1179,1180],"class_list":["post-4154","post","type-post","status-publish","format-standard","hentry","category-firewalls","category-networks","tag-clear-logs-palo-alto","tag-increase-disk-space-palo-alto-firewall"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/4154","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4154"}],"version-history":[{"count":2,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/4154\/revisions"}],"predecessor-version":[{"id":4156,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=\/wp\/v2\/posts\/4154\/revisions\/4156"}],"wp:attachment":[{"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4154"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4154"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/SUMMALAI.COM\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4154"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}