<?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 Transforming Search Output in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Transforming-Search-Output/m-p/566455#M197409</link>
    <description>&lt;P&gt;base search&lt;BR /&gt;| fields _time host pdfpath status&lt;BR /&gt;| stats values(pdfpath) as pdfpath values(host) as host by _time status&lt;BR /&gt;| table _time host status pdfpath&lt;/P&gt;&lt;P&gt;Example Log&lt;/P&gt;&lt;P&gt;_time host status pdfpath&lt;BR /&gt;2021-09-08 08:00:00.359 hostA processing /20210907/xxxx_live.3.21.cv.1866.13428730.1&lt;BR /&gt;2021-09-08 08:00:00.458 hostB processing /20180821/xxxx_live.1.18.cr.403.19409265.0&lt;BR /&gt;2021-09-08 08:00:00.462 hostB processing /20180821/xxxx_live.1.18.cr.403.19409265.0&lt;BR /&gt;2021-09-08 08:00:00.473 hostA finished /20210907/xxxx_live.3.21.cv.1866.13428730.1&lt;BR /&gt;2021-09-08 08:00:00.477 hostC processing /tmp/HL_end_state379145533207037128.pdf&lt;BR /&gt;2021-09-08 08:00:00.500 hostC finished /tmp/HL_end_state379145533207037128.pdf&lt;/P&gt;&lt;P&gt;I am looking for a way to trigger an alert when a host does not finish processing a pdfpath. Using the example above,&lt;BR /&gt;hostB is having trouble processing it's pdfpath, as there is no correlating "finished" status as there is for hostA and hostC.&lt;/P&gt;&lt;P&gt;The output could be just the earliest and latest time the file was processed and a count of the attempts to process the file. It would be cool also to have a new status called "failed" to easily count the number of failures. Output example:&lt;/P&gt;&lt;P&gt;earliest_time latest_time host number_of_attempts pdfpath status&lt;BR /&gt;2021-09-08 08:00:00.458 2021-09-08 08:00:00.462 hostB 2 /20180821/xxxx_live.1.18.cr.403.19409265.0 failed&lt;/P&gt;&lt;P&gt;I'm looking for suggestions on how I could do this. Thank you.&lt;/P&gt;</description>
    <pubDate>Thu, 09 Sep 2021 13:15:09 GMT</pubDate>
    <dc:creator>jason_hotchkiss</dc:creator>
    <dc:date>2021-09-09T13:15:09Z</dc:date>
    <item>
      <title>Transforming Search Output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transforming-Search-Output/m-p/566455#M197409</link>
      <description>&lt;P&gt;base search&lt;BR /&gt;| fields _time host pdfpath status&lt;BR /&gt;| stats values(pdfpath) as pdfpath values(host) as host by _time status&lt;BR /&gt;| table _time host status pdfpath&lt;/P&gt;&lt;P&gt;Example Log&lt;/P&gt;&lt;P&gt;_time host status pdfpath&lt;BR /&gt;2021-09-08 08:00:00.359 hostA processing /20210907/xxxx_live.3.21.cv.1866.13428730.1&lt;BR /&gt;2021-09-08 08:00:00.458 hostB processing /20180821/xxxx_live.1.18.cr.403.19409265.0&lt;BR /&gt;2021-09-08 08:00:00.462 hostB processing /20180821/xxxx_live.1.18.cr.403.19409265.0&lt;BR /&gt;2021-09-08 08:00:00.473 hostA finished /20210907/xxxx_live.3.21.cv.1866.13428730.1&lt;BR /&gt;2021-09-08 08:00:00.477 hostC processing /tmp/HL_end_state379145533207037128.pdf&lt;BR /&gt;2021-09-08 08:00:00.500 hostC finished /tmp/HL_end_state379145533207037128.pdf&lt;/P&gt;&lt;P&gt;I am looking for a way to trigger an alert when a host does not finish processing a pdfpath. Using the example above,&lt;BR /&gt;hostB is having trouble processing it's pdfpath, as there is no correlating "finished" status as there is for hostA and hostC.&lt;/P&gt;&lt;P&gt;The output could be just the earliest and latest time the file was processed and a count of the attempts to process the file. It would be cool also to have a new status called "failed" to easily count the number of failures. Output example:&lt;/P&gt;&lt;P&gt;earliest_time latest_time host number_of_attempts pdfpath status&lt;BR /&gt;2021-09-08 08:00:00.458 2021-09-08 08:00:00.462 hostB 2 /20180821/xxxx_live.1.18.cr.403.19409265.0 failed&lt;/P&gt;&lt;P&gt;I'm looking for suggestions on how I could do this. Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 13:15:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transforming-Search-Output/m-p/566455#M197409</guid>
      <dc:creator>jason_hotchkiss</dc:creator>
      <dc:date>2021-09-09T13:15:09Z</dc:date>
    </item>
    <item>
      <title>Re: Transforming Search Output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transforming-Search-Output/m-p/566473#M197414</link>
      <description>&lt;LI-CODE lang="markup"&gt;| stats earliest(_time) as earliest_time latest(_time) as latest_time latest(status) as status count by host pdfpath
| eval count=if(status="finished",count-1,count)
| eval status=if(status="processing","failed",status)&lt;/LI-CODE&gt;&lt;P&gt;You could set your alert with the addition of where status="failed" and see if any results are returned&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 14:44:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transforming-Search-Output/m-p/566473#M197414</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2021-09-09T14:44:44Z</dc:date>
    </item>
    <item>
      <title>Re: Transforming Search Output</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Transforming-Search-Output/m-p/566498#M197424</link>
      <description>&lt;P&gt;Thank you for assistance.&amp;nbsp; This solves my use case.&lt;/P&gt;</description>
      <pubDate>Thu, 09 Sep 2021 17:38:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Transforming-Search-Output/m-p/566498#M197424</guid>
      <dc:creator>jason_hotchkiss</dc:creator>
      <dc:date>2021-09-09T17:38:35Z</dc:date>
    </item>
  </channel>
</rss>

