<?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 How to create a Splunk alert to trigger when Tomcat is down? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Splunk-alert-to-trigger-when-Tomcat-is-down/m-p/266110#M80018</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;We have scenario to create an alert for tomcat to trigger an alert when tomcat is down.&lt;/P&gt;

&lt;P&gt;Based on our tomcat logs, it gives PID for every 30secs when ever it is up.&lt;BR /&gt;
If it is down it wont trigger any event for that 30 sec interval.&lt;/P&gt;

&lt;P&gt;We need to set up an alert to trigger by host ,if any of the host has not have an entry for 30secs period.&lt;/P&gt;

&lt;P&gt;Below is basic search for it:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=index1  source=ps host=host1* OR host=host2* apache-tomcat|table host pid _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 19 Jul 2016 22:32:22 GMT</pubDate>
    <dc:creator>splunker9999</dc:creator>
    <dc:date>2016-07-19T22:32:22Z</dc:date>
    <item>
      <title>How to create a Splunk alert to trigger when Tomcat is down?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Splunk-alert-to-trigger-when-Tomcat-is-down/m-p/266110#M80018</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;We have scenario to create an alert for tomcat to trigger an alert when tomcat is down.&lt;/P&gt;

&lt;P&gt;Based on our tomcat logs, it gives PID for every 30secs when ever it is up.&lt;BR /&gt;
If it is down it wont trigger any event for that 30 sec interval.&lt;/P&gt;

&lt;P&gt;We need to set up an alert to trigger by host ,if any of the host has not have an entry for 30secs period.&lt;/P&gt;

&lt;P&gt;Below is basic search for it:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; index=index1  source=ps host=host1* OR host=host2* apache-tomcat|table host pid _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Jul 2016 22:32:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Splunk-alert-to-trigger-when-Tomcat-is-down/m-p/266110#M80018</guid>
      <dc:creator>splunker9999</dc:creator>
      <dc:date>2016-07-19T22:32:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Splunk alert to trigger when Tomcat is down?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Splunk-alert-to-trigger-when-Tomcat-is-down/m-p/266111#M80019</link>
      <description>&lt;P&gt;Find hosts down for 5 minutes:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=index1  source=ps host=host1* OR host=host2* apache-tomcat | 
stats latest(_time) as latest by host | 
eval age=now()-latest | where age&amp;gt;300
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Jul 2016 22:39:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Splunk-alert-to-trigger-when-Tomcat-is-down/m-p/266111#M80019</guid>
      <dc:creator>twinspop</dc:creator>
      <dc:date>2016-07-19T22:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Splunk alert to trigger when Tomcat is down?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Splunk-alert-to-trigger-when-Tomcat-is-down/m-p/266112#M80020</link>
      <description>&lt;P&gt;Hi, This would works when host is down.&lt;/P&gt;

&lt;P&gt;Here we are checking for pid in the events: We will get events for every 30secs when ever Tomcat is up and running.&lt;/P&gt;

&lt;P&gt;When ever server is down, it wont trigger any events to splunk&lt;BR /&gt;
Ex:&lt;BR /&gt;
If Tomcat is stopped around 3.47.30.000, we wont get any events from 3.47.30.000 to until it is up.&lt;/P&gt;

&lt;P&gt;So we need to customise our search , in such away that if  search find no events from any particular host ..we need to give status as down. By default when ever search returns events which have pid, then status should be up.&lt;/P&gt;

&lt;P&gt;If we have search query for this , we can give condition like|where status=down&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jul 2016 22:50:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Splunk-alert-to-trigger-when-Tomcat-is-down/m-p/266112#M80020</guid>
      <dc:creator>splunker9999</dc:creator>
      <dc:date>2016-07-19T22:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a Splunk alert to trigger when Tomcat is down?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Splunk-alert-to-trigger-when-Tomcat-is-down/m-p/266113#M80021</link>
      <description>&lt;P&gt;Change the stats command to include pid: &lt;CODE&gt;... as latest by host pid&lt;/CODE&gt; ?&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jul 2016 00:48:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-a-Splunk-alert-to-trigger-when-Tomcat-is-down/m-p/266113#M80021</guid>
      <dc:creator>twinspop</dc:creator>
      <dc:date>2016-07-20T00:48:04Z</dc:date>
    </item>
  </channel>
</rss>

