<?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 Re: RQL - Checking Tag.key's value in Prisma Cloud Discussions</title>
    <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-checking-tag-key-s-value/m-p/598586#M1294</link>
    <description>&lt;P&gt;No, our Palo Alto enterprise support team told us it was a bug with the DateTime function and we reported it shortly after I submitted this post. Not sure if any feature has been taken up from Palo Alto since then but we went a different route to handle this situation&lt;/P&gt;</description>
    <pubDate>Mon, 23 Sep 2024 20:11:10 GMT</pubDate>
    <dc:creator>awsrqlqueryuser</dc:creator>
    <dc:date>2024-09-23T20:11:10Z</dc:date>
    <item>
      <title>RQL - Checking Tag.key's value</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-checking-tag-key-s-value/m-p/565037#M1099</link>
      <description>&lt;P&gt;Working to develop a query in prisma to check for a certain tag's value being older than 365 days. I can't seem to find any documentation on this. I have this rough draft but it fails and I am not sure why:&lt;/P&gt;
&lt;P&gt;config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ec2-describe-volumes' AND json.rule = ((tags[?(@.key=='Retain' &amp;amp;&amp;amp; '_DateTime.ageInDays(@.value) &amp;gt; 365')] size &amp;gt; 0) or (tags[*].key does not contain Retain))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Looking for any working examples of checking a tag's value or using the date functions. Any recommendations/tips are welcome&lt;/P&gt;
&lt;P&gt;&lt;LI-PRODUCT title="AWS" id="AWS"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;LI-PRODUCT title="Prisma Cloud" id="Prisma_Cloud"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2023 20:30:17 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-checking-tag-key-s-value/m-p/565037#M1099</guid>
      <dc:creator>awsrqlqueryuser</dc:creator>
      <dc:date>2023-11-09T20:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: RQL - Checking Tag.key's value</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-checking-tag-key-s-value/m-p/565042#M1100</link>
      <description>&lt;P&gt;These two query statements work indapendently but I cannot combine them into the same query:&lt;BR /&gt;json.rule = _DateTime.ageInDays(tags[?(@.key=='Retain')].value) &amp;gt; 365&lt;BR /&gt;json.rule = tags[*].key does not contain "Retain"&lt;BR /&gt;Need to be able to filter out resources that dont have a tag.key called 'Retain' OR the tag[Retain].value is older than 365 days&lt;/P&gt;</description>
      <pubDate>Thu, 09 Nov 2023 21:02:38 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-checking-tag-key-s-value/m-p/565042#M1100</guid>
      <dc:creator>awsrqlqueryuser</dc:creator>
      <dc:date>2023-11-09T21:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: RQL - Checking Tag.key's value</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-checking-tag-key-s-value/m-p/597336#M1284</link>
      <description>&lt;P&gt;Were you ever able to figure this out?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Sep 2024 19:01:42 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-checking-tag-key-s-value/m-p/597336#M1284</guid>
      <dc:creator>APoppas</dc:creator>
      <dc:date>2024-09-09T19:01:42Z</dc:date>
    </item>
    <item>
      <title>Re: RQL - Checking Tag.key's value</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-checking-tag-key-s-value/m-p/597862#M1289</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/329088"&gt;@awsrqlqueryuser&lt;/a&gt;&amp;nbsp; Please refer to the below. &amp;nbsp;Please copy as pasted below and let me know if you have further questions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;config from cloud.resource where cloud.type = 'aws' AND api.name = 'aws-ec2-describe-volumes' AND json.rule = '_DateTime.ageInDays(tags[*].value) &amp;gt; 365 and tags[*].key equals "Retain" or (tags[*].key does not contain "Retain")'&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 02:06:20 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-checking-tag-key-s-value/m-p/597862#M1289</guid>
      <dc:creator>OOmotayo</dc:creator>
      <dc:date>2024-09-16T02:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: RQL - Checking Tag.key's value</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-checking-tag-key-s-value/m-p/598585#M1293</link>
      <description>&lt;P&gt;This does not work. After running the query and validating results you can see that it dumps all EBS volumes regardless of tag key/values specified in query. The DateTime function does not appear to work when using a passed in value (in this case the value of a specified tag key) because no evaluation takes place resulting in all EBS volumes being listed with no filter&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2024 20:09:53 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-checking-tag-key-s-value/m-p/598585#M1293</guid>
      <dc:creator>awsrqlqueryuser</dc:creator>
      <dc:date>2024-09-23T20:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: RQL - Checking Tag.key's value</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-checking-tag-key-s-value/m-p/598586#M1294</link>
      <description>&lt;P&gt;No, our Palo Alto enterprise support team told us it was a bug with the DateTime function and we reported it shortly after I submitted this post. Not sure if any feature has been taken up from Palo Alto since then but we went a different route to handle this situation&lt;/P&gt;</description>
      <pubDate>Mon, 23 Sep 2024 20:11:10 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-checking-tag-key-s-value/m-p/598586#M1294</guid>
      <dc:creator>awsrqlqueryuser</dc:creator>
      <dc:date>2024-09-23T20:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: RQL - Checking Tag.key's value</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-checking-tag-key-s-value/m-p/598687#M1297</link>
      <description>&lt;P&gt;&lt;a href="https://live.paloaltonetworks.com/t5/user/viewprofilepage/user-id/329088"&gt;@awsrqlqueryuser&lt;/a&gt;&amp;nbsp;The DateTime function requires that there be a timestamp present in the resource config that is of any of the following 3 formats:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Zulu: "2011-08-13T20:17:46.384Z"&lt;/P&gt;
&lt;P&gt;GSON/AWS: "Nov 7, 2016 9:34:21 AM"&lt;/P&gt;
&lt;P&gt;ISO: "2011-12-04T10:15:30+01:00"&lt;BR /&gt;&lt;BR /&gt;Reference:&amp;nbsp;&amp;nbsp;&lt;A href="https://docs.prismacloud.io/en/enterprise-edition/content-collections/search-and-investigate/rql-operators" target="_blank"&gt;https://docs.prismacloud.io/en/enterprise-edition/content-collections/search-and-investigate/rql-operators&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;So a valid example of a query that is specific to EBS volumes would look something like this:&lt;BR /&gt;&lt;SPAN&gt;config from cloud.resource where api.name = 'aws-ec2-describe-volumes' AND json.rule = '_DateTime.ageInDays(createTime) &amp;gt; 365'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 24 Sep 2024 21:36:18 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-checking-tag-key-s-value/m-p/598687#M1297</guid>
      <dc:creator>ACurran2</dc:creator>
      <dc:date>2024-09-24T21:36:18Z</dc:date>
    </item>
    <item>
      <title>Re: RQL - Checking Tag.key's value</title>
      <link>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-checking-tag-key-s-value/m-p/598761#M1298</link>
      <description>&lt;P&gt;Format of the time stamp is not problematic in this case, the DateTime function only makes an evaluation on an explicitly passed in value. In your case 'createTime' is a valid json value that Prisma reads from every configuration item it ingests from AWS. In the question, I am looking to complete an evaluation on the array of tags for each configuration item. Once the tag key is found, use the DateTime function to evaluate the value of the tag but no evaluation takes place. I was told that it was a known gap last year after I submitted this but we opted to use different tools at the time to meet our needs.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 Sep 2024 14:38:20 GMT</pubDate>
      <guid>https://live.paloaltonetworks.com/t5/prisma-cloud-discussions/rql-checking-tag-key-s-value/m-p/598761#M1298</guid>
      <dc:creator>awsrqlqueryuser</dc:creator>
      <dc:date>2024-09-25T14:38:20Z</dc:date>
    </item>
  </channel>
</rss>

