<?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 Having trouble adding a field to a record within grail via a processing rule in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Having-trouble-adding-a-field-to-a-record-within-grail-via-a/m-p/239630#M717</link>
    <description>&lt;P&gt;I'm trying to add field &lt;STRONG&gt;error.type&lt;/STRONG&gt;&amp;nbsp;when specific messages occur within sfm records, within a custom 2.0 extension I have created. I've defined the processing rule below.&lt;/P&gt;
&lt;P&gt;When&amp;nbsp;&lt;STRONG&gt;Connection exists but no metrics have been produced for endpoints:&amp;nbsp;&lt;/STRONG&gt;is logged in the content it works fine, error.type of &lt;STRONG&gt;Connection exists but no metrics have been produced&lt;/STRONG&gt;&amp;nbsp;is added to the record. Whenever &lt;STRONG&gt;Exception occured: IO Error: The Network Adapter could not establish the connection&lt;/STRONG&gt;&amp;nbsp;is logged in the content, there is no error.type added. When viewing the record in grail I see null for error.type while for the other I can see the value I expect. What am I doing wrong here? I can put in the log for this error type and test it against the rule and the error.type does show, see screenshot below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Matcher&lt;BR /&gt;&lt;/STRONG&gt;&lt;/U&gt;(matchesValue(event.type, "sfm") and matchesPhrase(dt.extension.name, "custom:db.queries.oracle")&lt;BR /&gt;and (matchesPhrase(content, "Exception occured: ORA-01017: invalid username/password; logon denied")&lt;BR /&gt;or matchesPhrase(content, "Exception occured: IO Error: The Network Adapter could not establish the connection")&lt;BR /&gt;or matchesPhrase(content, "Failed to configure and schedule polling for endpoint")&lt;BR /&gt;or matchesPhrase(content, "Error in YAML or JSON configuration; Datasource has exited and will be starting shortly")&lt;BR /&gt;or matchesPhrase(content, "query have failed")&lt;BR /&gt;or matchesPhrase(content, "Connection exists but no metrics have been produced for endpoints:")&lt;BR /&gt;or matchesPhrase(content, "No feature set is activated for")))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Process definition&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;FIELDS_ADD(content, error.type:IF_THEN_ELSE(content CONTAINS("Exception occured: ORA-01017: invalid username/password; logon denied"), "Invalid username/password",&lt;BR /&gt;IF_THEN_ELSE(content CONTAINS("Exception occured: IO Error: The Network Adapter could not establish the connection"), "Cannot connect to database",&lt;BR /&gt;IF_THEN_ELSE(content CONTAINS("Failed to configure and schedule polling for endpoint"), "Failed to configure and schedule polling for endpoint",&lt;BR /&gt;IF_THEN_ELSE(content CONTAINS("Error in YAML or JSON configuration; Datasource has exited and will be starting shortly"), "Error in YAML or JSON configuration",&lt;BR /&gt;IF_THEN_ELSE(content CONTAINS("Connection exists but no metrics have been produced for endpoints:"), "Connection exists but no metrics have been produced",&lt;BR /&gt;IF_THEN_ELSE(content CONTAINS("No feature set is activated for"), "No feature set activated",&lt;BR /&gt;IF_THEN_ELSE(content CONTAINS("query have failed"), "Query failed"))))))))&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sivart_89_0-1710256017787.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/18225i97FD9D4C196C385D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sivart_89_0-1710256017787.png" alt="sivart_89_0-1710256017787.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Oct 2024 12:34:27 GMT</pubDate>
    <dc:creator>sivart_89</dc:creator>
    <dc:date>2024-10-02T12:34:27Z</dc:date>
    <item>
      <title>Having trouble adding a field to a record within grail via a processing rule</title>
      <link>https://community.dynatrace.com/t5/DQL/Having-trouble-adding-a-field-to-a-record-within-grail-via-a/m-p/239630#M717</link>
      <description>&lt;P&gt;I'm trying to add field &lt;STRONG&gt;error.type&lt;/STRONG&gt;&amp;nbsp;when specific messages occur within sfm records, within a custom 2.0 extension I have created. I've defined the processing rule below.&lt;/P&gt;
&lt;P&gt;When&amp;nbsp;&lt;STRONG&gt;Connection exists but no metrics have been produced for endpoints:&amp;nbsp;&lt;/STRONG&gt;is logged in the content it works fine, error.type of &lt;STRONG&gt;Connection exists but no metrics have been produced&lt;/STRONG&gt;&amp;nbsp;is added to the record. Whenever &lt;STRONG&gt;Exception occured: IO Error: The Network Adapter could not establish the connection&lt;/STRONG&gt;&amp;nbsp;is logged in the content, there is no error.type added. When viewing the record in grail I see null for error.type while for the other I can see the value I expect. What am I doing wrong here? I can put in the log for this error type and test it against the rule and the error.type does show, see screenshot below.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Matcher&lt;BR /&gt;&lt;/STRONG&gt;&lt;/U&gt;(matchesValue(event.type, "sfm") and matchesPhrase(dt.extension.name, "custom:db.queries.oracle")&lt;BR /&gt;and (matchesPhrase(content, "Exception occured: ORA-01017: invalid username/password; logon denied")&lt;BR /&gt;or matchesPhrase(content, "Exception occured: IO Error: The Network Adapter could not establish the connection")&lt;BR /&gt;or matchesPhrase(content, "Failed to configure and schedule polling for endpoint")&lt;BR /&gt;or matchesPhrase(content, "Error in YAML or JSON configuration; Datasource has exited and will be starting shortly")&lt;BR /&gt;or matchesPhrase(content, "query have failed")&lt;BR /&gt;or matchesPhrase(content, "Connection exists but no metrics have been produced for endpoints:")&lt;BR /&gt;or matchesPhrase(content, "No feature set is activated for")))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Process definition&lt;/STRONG&gt;&lt;/U&gt;&lt;BR /&gt;FIELDS_ADD(content, error.type:IF_THEN_ELSE(content CONTAINS("Exception occured: ORA-01017: invalid username/password; logon denied"), "Invalid username/password",&lt;BR /&gt;IF_THEN_ELSE(content CONTAINS("Exception occured: IO Error: The Network Adapter could not establish the connection"), "Cannot connect to database",&lt;BR /&gt;IF_THEN_ELSE(content CONTAINS("Failed to configure and schedule polling for endpoint"), "Failed to configure and schedule polling for endpoint",&lt;BR /&gt;IF_THEN_ELSE(content CONTAINS("Error in YAML or JSON configuration; Datasource has exited and will be starting shortly"), "Error in YAML or JSON configuration",&lt;BR /&gt;IF_THEN_ELSE(content CONTAINS("Connection exists but no metrics have been produced for endpoints:"), "Connection exists but no metrics have been produced",&lt;BR /&gt;IF_THEN_ELSE(content CONTAINS("No feature set is activated for"), "No feature set activated",&lt;BR /&gt;IF_THEN_ELSE(content CONTAINS("query have failed"), "Query failed"))))))))&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sivart_89_0-1710256017787.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/18225i97FD9D4C196C385D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sivart_89_0-1710256017787.png" alt="sivart_89_0-1710256017787.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Oct 2024 12:34:27 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Having-trouble-adding-a-field-to-a-record-within-grail-via-a/m-p/239630#M717</guid>
      <dc:creator>sivart_89</dc:creator>
      <dc:date>2024-10-02T12:34:27Z</dc:date>
    </item>
    <item>
      <title>Re: Having trouble adding a field to a record within grail via a processing rule</title>
      <link>https://community.dynatrace.com/t5/DQL/Having-trouble-adding-a-field-to-a-record-within-grail-via-a/m-p/263026#M1450</link>
      <description>&lt;P&gt;Is this still an issue?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 10:31:51 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Having-trouble-adding-a-field-to-a-record-within-grail-via-a/m-p/263026#M1450</guid>
      <dc:creator>thomas_billi</dc:creator>
      <dc:date>2024-11-20T10:31:51Z</dc:date>
    </item>
    <item>
      <title>Re: Having trouble adding a field to a record within grail via a processing rule</title>
      <link>https://community.dynatrace.com/t5/DQL/Having-trouble-adding-a-field-to-a-record-within-grail-via-a/m-p/263064#M1452</link>
      <description>&lt;P&gt;Try this based on the "CONTAINS" function rule.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, I would recommend reduce the matcher string into more unique values instead of the entire line of text.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;FIELDS_ADD(error.type:IF_THEN_ELSE(CONTAINS(content, "Exception occured: ORA-01017: invalid username/password; logon denied"), "Invalid username/password",
IF_THEN_ELSE(CONTAINS(content, "Exception occured: IO Error: The Network Adapter could not establish the connection"), "Cannot connect to database",
IF_THEN_ELSE(CONTAINS(content, "Failed to configure and schedule polling for endpoint"), "Failed to configure and schedule polling for endpoint",
IF_THEN_ELSE(CONTAINS(content, "Error in YAML or JSON configuration; Datasource has exited and will be starting shortly"), "Error in YAML or JSON configuration",
IF_THEN_ELSE(CONTAINS(content , "Connection exists but no metrics have been produced for endpoints:"), "Connection exists but no metrics have been produced",
IF_THEN_ELSE(CONTAINS(content, "No feature set is activated for"), "No feature set activated",
IF_THEN_ELSE(CONTAINS(content, "query have failed"), "Query failed"))))))))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="mosharref_hossn_0-1732116952216.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/24717iD8DDEA36C8F52A04/image-size/medium?v=v2&amp;amp;px=400" role="button" title="mosharref_hossn_0-1732116952216.png" alt="mosharref_hossn_0-1732116952216.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 15:39:24 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Having-trouble-adding-a-field-to-a-record-within-grail-via-a/m-p/263064#M1452</guid>
      <dc:creator>mosharref_hossn</dc:creator>
      <dc:date>2024-11-20T15:39:24Z</dc:date>
    </item>
  </channel>
</rss>

