<?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: query to know if a service had been restart after a certain period of time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/What-search-can-I-use-to-know-if-a-service-had-been-restart/m-p/638788#M221326</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/242115"&gt;@7ryota&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the&amp;nbsp;&lt;SPAN&gt;centrifyEventID should be automaticaly extracted by Splunk so you shouldn't need to extract them, if not true, please telle me that I add a regex extraction.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Anyway, you have to run an alert using a search like the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index (centrifyEventID=17000 OR centrifyEventID=17002) earliest=-10m@m latest=now
| stats dc(centrifyEventID) AS centrifyEventID_count values(centrifyEventID) AS centrifyEventID
| where centrifyEventID_count=1 AND centrifyEventID=17002&lt;/LI-CODE&gt;&lt;P&gt;in this way, if you have results, this means that the service was stopped and there wasn't any start event in the last ten minutes.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Apr 2023 08:31:06 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2023-04-05T08:31:06Z</dc:date>
    <item>
      <title>What search can I use to know if a service had been restart after a certain period of time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-search-can-I-use-to-know-if-a-service-had-been-restart/m-p/638786#M221324</link>
      <description>&lt;P&gt;hi all,&lt;/P&gt;
&lt;P&gt;i have this logs which i am interested in know if there is a agent restarted after certain period when the agent got stop&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;index=unix sourcetype=syslog &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;centrifyEventID=17000&amp;nbsp;&amp;nbsp;&amp;nbsp; Centrify agent (adclient) started&lt;BR /&gt;centrifyEventID=17002&amp;nbsp;&amp;nbsp;&amp;nbsp; Centrify agent (adclient) stopped&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN class=""&gt;can help to to construct the query to search to if the agent got started within 10mins after the agent got stop&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 16:56:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-search-can-I-use-to-know-if-a-service-had-been-restart/m-p/638786#M221324</guid>
      <dc:creator>7ryota</dc:creator>
      <dc:date>2023-04-05T16:56:29Z</dc:date>
    </item>
    <item>
      <title>Re: query to know if a service had been restart after a certain period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-search-can-I-use-to-know-if-a-service-had-been-restart/m-p/638788#M221326</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/242115"&gt;@7ryota&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the&amp;nbsp;&lt;SPAN&gt;centrifyEventID should be automaticaly extracted by Splunk so you shouldn't need to extract them, if not true, please telle me that I add a regex extraction.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Anyway, you have to run an alert using a search like the following:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index (centrifyEventID=17000 OR centrifyEventID=17002) earliest=-10m@m latest=now
| stats dc(centrifyEventID) AS centrifyEventID_count values(centrifyEventID) AS centrifyEventID
| where centrifyEventID_count=1 AND centrifyEventID=17002&lt;/LI-CODE&gt;&lt;P&gt;in this way, if you have results, this means that the service was stopped and there wasn't any start event in the last ten minutes.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 08:31:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-search-can-I-use-to-know-if-a-service-had-been-restart/m-p/638788#M221326</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-04-05T08:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: query to know if a service had been restart after a certain period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-search-can-I-use-to-know-if-a-service-had-been-restart/m-p/638789#M221327</link>
      <description>&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;thanks for the fast reply,&lt;/P&gt;&lt;P&gt;how to i construct the query to search for unique host which had agent stop and search for restart within 10min&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 08:35:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-search-can-I-use-to-know-if-a-service-had-been-restart/m-p/638789#M221327</guid>
      <dc:creator>7ryota</dc:creator>
      <dc:date>2023-04-05T08:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: query to know if a service had been restart after a certain period of time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-search-can-I-use-to-know-if-a-service-had-been-restart/m-p/638791#M221329</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/242115"&gt;@7ryota&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if you have more hosts, you have only to add host as grouping key in the stats command&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=your_index (centrifyEventID=17000 OR centrifyEventID=17002) earliest=-10m@m latest=now
| stats dc(centrifyEventID) AS centrifyEventID_count values(centrifyEventID) AS centrifyEventID BY host
| where centrifyEventID_count=1 AND centrifyEventID=17002&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 08:52:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-search-can-I-use-to-know-if-a-service-had-been-restart/m-p/638791#M221329</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-04-05T08:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: What search can I use to know if a service had been restart after a certain period of time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/What-search-can-I-use-to-know-if-a-service-had-been-restart/m-p/638922#M221391</link>
      <description>&lt;P&gt;I am assuming that you asked this wrong and actually desire to know when there was a stop WITHOUT a start within 10-minutes.&amp;nbsp; If so:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="unix" AND sourcetype="syslog" AND centrifyEventID IN("17000", "17002")
| reverse 
| streamstats count(eval(centrifyEventID="17000")) AS sessionID BY host 
| stats min(_time) AS _time range(_time) AS duration values(centrifyEventID) AS values dc(centrifyEventID) AS dc count BY sessionID host 
| rename COMMENT AS "Above is the setup, I *might* not have the logic exactly right below"
| where (dc==1 AND values=="17002" AND (now() - _time) &amp;gt; (10 * 60))
OR (dc==2 AND range &amp;gt; (10 * 60))&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 05 Apr 2023 23:40:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/What-search-can-I-use-to-know-if-a-service-had-been-restart/m-p/638922#M221391</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2023-04-05T23:40:55Z</dc:date>
    </item>
  </channel>
</rss>

