<?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: Declarative process grouping - what is the format of the detection rule definition condition? in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/Declarative-process-grouping-what-is-the-format-of-the-detection/m-p/183367#M20340</link>
    <description>&lt;P&gt;Oke, here is the answer, after a session with One Support, who had to inquire with the responsible team internally as well:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Quotes -&amp;nbsp;&lt;SPAN&gt;it is possible to use quotes when defining the rules, but the caveat is this:&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;If the command line arguments looks like: &lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;./sleep --test=\"aaa\"&lt;BR /&gt;&lt;/FONT&gt;The rule should be &lt;FONT face="courier new,courier"&gt;$eq(--test="aaa")&lt;BR /&gt;&lt;/FONT&gt;But if the command line arguments look like &lt;FONT face="courier new,courier"&gt;./sleep --test="aaa"&lt;BR /&gt;&lt;/FONT&gt;Then the rule should be &lt;FONT face="courier new,courier"&gt;$eq(--test=aaa)&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;EM&gt;Note: this is a bit tricky and appears reversed. You can see in the definitions through the API that Dynatrace adds the \ to the quotes.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;Spaces - spaces can be used without problem. Taking in account the possible use of quotes above.&lt;FONT size="2"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Arguments -&amp;nbsp;every argument needs to go to a different rule&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;BR /&gt;So, to capture the example from the original question above, &lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;myprocess.exe -instance"MYUI interface" -domain"c1234"&lt;/FONT&gt;&lt;/SPAN&gt;, you need to create two rules:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV class=""&gt;1st rule: $eq(-instance MYUI interface)&lt;/DIV&gt;&lt;DIV class=""&gt;2nd rule: $eq(-domain c1234)&lt;/DIV&gt;</description>
    <pubDate>Fri, 25 Mar 2022 13:16:27 GMT</pubDate>
    <dc:creator>fstekelenburg</dc:creator>
    <dc:date>2022-03-25T13:16:27Z</dc:date>
    <item>
      <title>Declarative process grouping - what is the format of the detection rule definition condition?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Declarative-process-grouping-what-is-the-format-of-the-detection/m-p/181766#M20104</link>
      <description>&lt;P&gt;The documentation on the conditions in&amp;nbsp;the Detection rule definition of a&amp;nbsp;Declarative process group is not very elaborate. it is somewhat clear that you do not need to use quotes for the value (e.g. svc&amp;nbsp; in&amp;nbsp;$contains(svc)), but what in situations the arguments contains quotes and spaces?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Especially when it comes to command line arguments, that&lt;SPAN&gt;&amp;nbsp;can be used as property.&lt;BR /&gt;For example this situation, a process is started like:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; myprocess.exe -instance"MYUI interface" -domain"c1234"&lt;BR /&gt;&lt;BR /&gt;Questions:&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;SPAN&gt;the command line arguments can contain also (double) quotes. How to deal with quotes?&lt;BR /&gt;$contains(c1234) works. But&amp;nbsp;$contains(-domain"c1234") or&amp;nbsp;$contains(-domain\"c1234\") do not.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;and when there are spaces?&lt;BR /&gt;It looks like $contains(MYUI interface) works. It doesn't with quotes.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;SPAN&gt;does the $eq and $contains look at the whole range of command line arguments, or individual ones?&lt;BR /&gt;Like, should I be able to use for&amp;nbsp;command line arguments:&amp;nbsp;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;$eq(-d -p -id=10)&lt;BR /&gt;&lt;/FONT&gt;&lt;/STRONG&gt;Or need these all be separate detection rules?&lt;BR /&gt;&lt;BR /&gt;And, do I get a match when I use&amp;nbsp;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;$eq(-d -p -id=10)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="courier new,courier"&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;&amp;nbsp; or when I use&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT face="courier new,courier"&gt;$eq(-d)&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;$contains(svc) – Matches if svc appears anywhere in the process property value.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;$eq(svc.exe) – Matches if svc.exe matches the process property value exactly.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;$prefix(svc) – Matches if app matches the prefix of the process property value.&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier" size="2"&gt;$suffix(svc.py) – Matches if svc.py matches the suffix of the process property value.&lt;BR /&gt;&lt;BR /&gt;Documentation:&amp;nbsp;&lt;A href="https://www.dynatrace.com/support/help/how-to-use-dynatrace/process-groups/configuration/declarative-process-grouping?_ga=2.133232526.1839291755.1646041374-1199362516.1637317283&amp;amp;_gac=1.79704805.1645008749.Cj0KCQiA3rKQBhCNARIsACUEW_a1L1kc8XxMUoeg84Wb-eU1rZuhR3hvzxpboSPupWgeCAF5txddjjIaAlxJEALw_wcB" target="_blank" rel="noopener"&gt;Declarative process grouping | Dynatrace Docs&lt;/A&gt;&lt;/FONT&gt;&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Tue, 29 Jul 2025 06:47:08 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Declarative-process-grouping-what-is-the-format-of-the-detection/m-p/181766#M20104</guid>
      <dc:creator>fstekelenburg</dc:creator>
      <dc:date>2025-07-29T06:47:08Z</dc:date>
    </item>
    <item>
      <title>Re: Declarative process grouping - what is the format of the detection rule definition condition?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Declarative-process-grouping-what-is-the-format-of-the-detection/m-p/183367#M20340</link>
      <description>&lt;P&gt;Oke, here is the answer, after a session with One Support, who had to inquire with the responsible team internally as well:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Quotes -&amp;nbsp;&lt;SPAN&gt;it is possible to use quotes when defining the rules, but the caveat is this:&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;If the command line arguments looks like: &lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;./sleep --test=\"aaa\"&lt;BR /&gt;&lt;/FONT&gt;The rule should be &lt;FONT face="courier new,courier"&gt;$eq(--test="aaa")&lt;BR /&gt;&lt;/FONT&gt;But if the command line arguments look like &lt;FONT face="courier new,courier"&gt;./sleep --test="aaa"&lt;BR /&gt;&lt;/FONT&gt;Then the rule should be &lt;FONT face="courier new,courier"&gt;$eq(--test=aaa)&lt;BR /&gt;&lt;/FONT&gt;&lt;FONT size="2"&gt;&lt;EM&gt;Note: this is a bit tricky and appears reversed. You can see in the definitions through the API that Dynatrace adds the \ to the quotes.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;Spaces - spaces can be used without problem. Taking in account the possible use of quotes above.&lt;FONT size="2"&gt;&lt;EM&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/FONT&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;Arguments -&amp;nbsp;every argument needs to go to a different rule&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;BR /&gt;So, to capture the example from the original question above, &lt;SPAN&gt;&lt;FONT face="courier new,courier"&gt;myprocess.exe -instance"MYUI interface" -domain"c1234"&lt;/FONT&gt;&lt;/SPAN&gt;, you need to create two rules:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;DIV class=""&gt;1st rule: $eq(-instance MYUI interface)&lt;/DIV&gt;&lt;DIV class=""&gt;2nd rule: $eq(-domain c1234)&lt;/DIV&gt;</description>
      <pubDate>Fri, 25 Mar 2022 13:16:27 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Declarative-process-grouping-what-is-the-format-of-the-detection/m-p/183367#M20340</guid>
      <dc:creator>fstekelenburg</dc:creator>
      <dc:date>2022-03-25T13:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Declarative process grouping - what is the format of the detection rule definition condition?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Declarative-process-grouping-what-is-the-format-of-the-detection/m-p/281902#M37132</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/21639"&gt;@fstekelenburg&lt;/a&gt;&amp;nbsp;need help on&amp;nbsp;similar challenge. My issue explained in more details &lt;A href="https://community.dynatrace.com/t5/Open-Q-A/Process-group-detection-rule/m-p/281567#M37078" target="_blank" rel="noopener"&gt;here&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Below is the command line argument:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;python service.py -m PROCESS1 -i 0123&lt;/LI-CODE&gt;&lt;P&gt;Do we need to add three rules like below? also is restart of processes needed after creating a rule?&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;$eq(python service.py)&lt;/LI&gt;&lt;LI&gt;$eq(-m process1)&lt;/LI&gt;&lt;LI&gt;$eq(-i 0123)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Regards,&lt;BR /&gt;AK&lt;/P&gt;</description>
      <pubDate>Mon, 21 Jul 2025 10:59:04 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Declarative-process-grouping-what-is-the-format-of-the-detection/m-p/281902#M37132</guid>
      <dc:creator>AK</dc:creator>
      <dc:date>2025-07-21T10:59:04Z</dc:date>
    </item>
    <item>
      <title>Re: Declarative process grouping - what is the format of the detection rule definition condition?</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Declarative-process-grouping-what-is-the-format-of-the-detection/m-p/282334#M37172</link>
      <description>&lt;P&gt;Creating rule for each parameter like below worked.&amp;nbsp;Support helped to depart this challenge.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;$eq(python)
$eq(service.py)
$eq(-m)
$eq(PROCESS1)
$eq(-i)
$eq(0123)&lt;/LI-CODE&gt;&lt;P&gt;Note: Order of rules doesn't matter&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;AK&lt;/P&gt;</description>
      <pubDate>Fri, 25 Jul 2025 19:05:11 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Declarative-process-grouping-what-is-the-format-of-the-detection/m-p/282334#M37172</guid>
      <dc:creator>AK</dc:creator>
      <dc:date>2025-07-25T19:05:11Z</dc:date>
    </item>
  </channel>
</rss>

