<?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: Removing events from &amp;quot;parent&amp;quot; source using ID in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Removing-events-from-quot-parent-quot-source-using-ID/m-p/241019#M71659</link>
    <description>&lt;P&gt;Hi, the problem is that I do not have the name ChilJob/ParentJob/Root available. I have only generic entry for root, parent and child jobs. I have updated the question to avoid confusion. Or I didn't get your suggestion?&lt;/P&gt;</description>
    <pubDate>Mon, 14 Mar 2016 10:32:34 GMT</pubDate>
    <dc:creator>PanKokos</dc:creator>
    <dc:date>2016-03-14T10:32:34Z</dc:date>
    <item>
      <title>Removing events from "parent" source using ID</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Removing-events-from-quot-parent-quot-source-using-ID/m-p/241017#M71657</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;

&lt;P&gt;Our tool has a root, parent and child jobs which we are monitoring using Splunk. For a short example:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Job JobId="1" ParentJob="0"
Job JobId="2" ParentJob="1"
Job JobId="3" ParentJob="1"
Job JobId="4" ParentJob="2"
Job JobId="5" ParentJob="3"
Job JobId="6" ParentJob="2"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So here, the child jobs are only the jobs with ID = 4,5,6.&lt;/P&gt;

&lt;P&gt;I want to get events only from ChildJobs and the only way to do that is to execute following queries (pseudo SQL):&lt;BR /&gt;
1. AllJobsId = SELECT DISTINCT JobId FROM JobStatuses&lt;BR /&gt;
2. ChildJob = SELECT * FROM JobStatuses WHERE ParentJobId != 0 AND ParentJobId NOT IN [AllJobsId]&lt;/P&gt;

&lt;P&gt;Then I want to execute some stats on all events which were from ChildJobs. Is that possible?&lt;/P&gt;

&lt;P&gt;Regards,&lt;BR /&gt;
Michal&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2016 10:00:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Removing-events-from-quot-parent-quot-source-using-ID/m-p/241017#M71657</guid>
      <dc:creator>PanKokos</dc:creator>
      <dc:date>2016-03-14T10:00:59Z</dc:date>
    </item>
    <item>
      <title>Re: Removing events from "parent" source using ID</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Removing-events-from-quot-parent-quot-source-using-ID/m-p/241018#M71658</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;
in splunk language try this&lt;/P&gt;

&lt;P&gt;index=.........   Child* |stats count by JobId&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2016 10:25:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Removing-events-from-quot-parent-quot-source-using-ID/m-p/241018#M71658</guid>
      <dc:creator>chimell</dc:creator>
      <dc:date>2016-03-14T10:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Removing events from "parent" source using ID</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Removing-events-from-quot-parent-quot-source-using-ID/m-p/241019#M71659</link>
      <description>&lt;P&gt;Hi, the problem is that I do not have the name ChilJob/ParentJob/Root available. I have only generic entry for root, parent and child jobs. I have updated the question to avoid confusion. Or I didn't get your suggestion?&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2016 10:32:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Removing-events-from-quot-parent-quot-source-using-ID/m-p/241019#M71659</guid>
      <dc:creator>PanKokos</dc:creator>
      <dc:date>2016-03-14T10:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Removing events from "parent" source using ID</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Removing-events-from-quot-parent-quot-source-using-ID/m-p/241020#M71660</link>
      <description>&lt;P&gt;How do you identify a child job?  &lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2016 11:40:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Removing-events-from-quot-parent-quot-source-using-ID/m-p/241020#M71660</guid>
      <dc:creator>dcarmack_splunk</dc:creator>
      <dc:date>2016-03-14T11:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Removing events from "parent" source using ID</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Removing-events-from-quot-parent-quot-source-using-ID/m-p/241021#M71661</link>
      <description>&lt;P&gt;Child job is a job for which there is no other job which has it ID as a ParentJobId. I have defined this (more or less) with a SQL Pseudo Query). So I need to do something like this - get all jobs ids to kind of dictionary. Then, when filtering the events, do something like: .... | where JobId != ParentJobsIds | . In other words, if this job id was defined as parent job id somewhere, it means that this job is parent job so this event should be ignored.&lt;BR /&gt;
The structure could not be deeper than three nodes Root -&amp;gt; Parent -&amp;gt; Child or Parent-&amp;gt;Child.&lt;/P&gt;</description>
      <pubDate>Mon, 14 Mar 2016 12:06:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Removing-events-from-quot-parent-quot-source-using-ID/m-p/241021#M71661</guid>
      <dc:creator>PanKokos</dc:creator>
      <dc:date>2016-03-14T12:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Removing events from "parent" source using ID</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Removing-events-from-quot-parent-quot-source-using-ID/m-p/241022#M71662</link>
      <description>&lt;P&gt;I believe this will return what you're looking for&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=&amp;lt;someindex&amp;gt; sourcetype=JobStatuses  NOT [search index=&amp;lt;someindex&amp;gt; sourcetype=JobStatuses | rename JobId AS ParentJob |  stats count by ParentJob | fields - count]
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 14 Mar 2016 12:16:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Removing-events-from-quot-parent-quot-source-using-ID/m-p/241022#M71662</guid>
      <dc:creator>dcarmack_splunk</dc:creator>
      <dc:date>2016-03-14T12:16:19Z</dc:date>
    </item>
  </channel>
</rss>

