<?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: Splunk Query issue in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Query-issue/m-p/683010#M19058</link>
    <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp; Actually below query was not giving the results that is why error field was not populated.&lt;/P&gt;&lt;PRE&gt;| xpath outfield=MIS_Address  "//MIS_Address"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I have removed above query and replaced by "| rex field=_raw "eqtext\:MIS_Address\&amp;gt;(?&amp;lt;error&amp;gt;.+)\&amp;lt;\/eqtext\:MIS_Address" and error field are now populating.&lt;/P&gt;&lt;P&gt;But now I am seeing another issue. As per the below screenshot only one count is visible from "error_description"&amp;nbsp; as error count is 11 or description count is 100+&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="uagraw01_0-1712141892001.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/30155i157EA00F5C95212C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="uagraw01_0-1712141892001.png" alt="uagraw01_0-1712141892001.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 03 Apr 2024 10:58:41 GMT</pubDate>
    <dc:creator>uagraw01</dc:creator>
    <dc:date>2024-04-03T10:58:41Z</dc:date>
    <item>
      <title>Splunk Query issue</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Query-issue/m-p/682994#M19056</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Hello Splunkers!!

As per my below query I am not getting group &amp;amp; error_description fields from the query. Please advise what need to be modify in the last line of the query to get the results of those fields.

index=2313917_2797418_scada
| xpath outfield=ErrorType  "//ErrorType"
| search ErrorType IN("OPERATIONAL", "TECHNICAL")
 |xpath outfield=AreaID  "//AreaID"
| xpath outfield=ZoneID  "//ZoneID"
| xpath outfield=EquipmentID  "//EquipmentID"
| xpath outfield=MIS_Address  "//MIS_Address"
| xpath outfield=State  "//State"
| xpath outfield=ElementID  "//ElementID"
| rex field=_raw "eqtext\:Description\&amp;gt;(?P&amp;lt;description&amp;gt;.+)\&amp;lt;\/eqtext\:Description"
|rename EquipmentID as equipment ZoneID as zone AreaID as area ElementID as element State as error_status MIS_Address as error
| eval isc_id=area.".".zone.".".equipment
| search isc_id="*" area="*" zone="*" equipment="*"
| eval start_time=exact(coalesce(start_time,'_time')), _virtual_=if(isnull(virtual),"N","Y"), _cd_=replace('_cd',".*:","") 
| fields + _time, isc_id, area, zone, equipment, element, error, start_time error_status
| sort 0 -_time _virtual_ -"_indextime" -_cd_
| dedup isc_id
| fields - _virtual_, _cd_ 
| eval _time=start_time 
| lookup isc.csv id AS isc_id output statistical_subject mark_code
| lookup detail_status.csv component_type_id AS statistical_subject output alarm_severity description operational_rate technical_rate
| search alarm_severity="*" mark_code="*"
| fillnull value=0 technical_rate operational_rate 
| eval start_time=exact(coalesce(start_time,'_time')), description=coalesce(description,("Unknown text for error number " . error)), error_description=((error . "-") . description), group=((isc_id . error) . start_time)&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 03 Apr 2024 09:06:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Query-issue/m-p/682994#M19056</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2024-04-03T09:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query issue</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Query-issue/m-p/683003#M19057</link>
      <description>&lt;P&gt;Try without the brackets around the concatenated strings&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval start_time=exact(coalesce(start_time,'_time')), description=coalesce(description,("Unknown text for error number " . error)), error_description=error . "-" . description, group=isc_id . error . start_time&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 03 Apr 2024 10:23:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Query-issue/m-p/683003#M19057</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-04-03T10:23:24Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query issue</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Query-issue/m-p/683010#M19058</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp; Actually below query was not giving the results that is why error field was not populated.&lt;/P&gt;&lt;PRE&gt;| xpath outfield=MIS_Address  "//MIS_Address"&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I have removed above query and replaced by "| rex field=_raw "eqtext\:MIS_Address\&amp;gt;(?&amp;lt;error&amp;gt;.+)\&amp;lt;\/eqtext\:MIS_Address" and error field are now populating.&lt;/P&gt;&lt;P&gt;But now I am seeing another issue. As per the below screenshot only one count is visible from "error_description"&amp;nbsp; as error count is 11 or description count is 100+&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="uagraw01_0-1712141892001.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/30155i157EA00F5C95212C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="uagraw01_0-1712141892001.png" alt="uagraw01_0-1712141892001.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 10:58:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Query-issue/m-p/683010#M19058</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2024-04-03T10:58:41Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query issue</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Query-issue/m-p/683011#M19059</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;Can I use "| mvexpand description" I think description field is having multi value and cause the issue of the single count value from the error_description.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 11:11:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Query-issue/m-p/683011#M19059</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2024-04-03T11:11:03Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query issue</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Query-issue/m-p/683013#M19060</link>
      <description>&lt;P&gt;You could try using spath rather than xpath as it handles JSON and XML&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 11:44:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Query-issue/m-p/683013#M19060</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2024-04-03T11:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query issue</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Query-issue/m-p/683023#M19063</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;Events are coming in xml format. That is why I am using xpath.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Above queries are running slow. Could you please advice me how I can optimize ?&lt;/P&gt;</description>
      <pubDate>Wed, 03 Apr 2024 13:17:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Splunk-Query-issue/m-p/683023#M19063</guid>
      <dc:creator>uagraw01</dc:creator>
      <dc:date>2024-04-03T13:17:55Z</dc:date>
    </item>
  </channel>
</rss>

