<?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 that alert if services on a Jboss server went down in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338188#M100314</link>
    <description>&lt;P&gt;two issues when i changed the source and ran the query&lt;/P&gt;

&lt;P&gt;1) It is picking jboss server for other environment, for example, i need jboss for ABC environment but not for DEF environment, but its picking up all the server from ABC environment and DEF environment.&lt;/P&gt;

&lt;P&gt;2)The second issue is that the query should only give me result when it detects is the jboss server is down, but it is still showing me result&lt;/P&gt;</description>
    <pubDate>Wed, 13 Dec 2017 20:25:50 GMT</pubDate>
    <dc:creator>shakeel253</dc:creator>
    <dc:date>2017-12-13T20:25:50Z</dc:date>
    <item>
      <title>Splunk query that alert if services on a Jboss server went down</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338179#M100305</link>
      <description>&lt;P&gt;We have multiple aa-dev-server that are running jboss, below query sends me alert when jboss service is down. The issue is, I have a limitation on my splunk account where i am limited to only few real time alert. Is there a query where if i could use the "&lt;EM&gt;" it picks all  host="aa-dev-jboss-&lt;/EM&gt;" but send email and specifies which host jboss server went down or provide a table which server did&lt;/P&gt;

&lt;P&gt;host="aa-dev-jboss-1" source=ps jboss | stats latest(_time) as latest by host&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 19:47:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338179#M100305</guid>
      <dc:creator>shakeel253</dc:creator>
      <dc:date>2017-12-12T19:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query that alert if services on a Jboss server went down</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338180#M100306</link>
      <description>&lt;P&gt;@shakeel253, you need not run a real-time alert as the same can be based on SLA defined at Enterprise level.&lt;/P&gt;

&lt;P&gt;For example you can run the alert every 5 minutes for last 15 minutes to check host ping status. Since you seem to base your query on &lt;CODE&gt;host&lt;/CODE&gt;, you can use use &lt;CODE&gt;tstats&lt;/CODE&gt; or &lt;CODE&gt;metadata&lt;/CODE&gt; command to write faster search for the same. Also, for the query above if a host has no events at all for the time period you are searching then the host will not be reported. So you would need to have a &lt;CODE&gt;lookup&lt;/CODE&gt; file in Splunk with all available host names. You can have static lookup file or have a scheduled Splunk search with &lt;CODE&gt;outputlookup&lt;/CODE&gt; command to write available hosts to lookup file. PS: You can also use Splunk REST service call to get a list of all hosts which are pinging your Splunk Server. Assuming your host lookup file is &lt;CODE&gt;available_jboss_hosts.csv&lt;/CODE&gt; with &lt;CODE&gt;host&lt;/CODE&gt; field name, you can try a query like the following: &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| tstats latest(_time) as _time WHERE index=&amp;lt;yourIndexName&amp;gt; BY host
| eval "downTime (in Min)"=round((now()-_time)/60,0)
| appendpipe [
    | inputlookup available_jboss_hosts.csv
    | fields host
    | eval "downTime (in Min)"="999"
       ]
| dedup host
| where 'downTime (in Min)'&amp;gt;5
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Dec 2017 03:39:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338180#M100306</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-13T03:39:28Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query that alert if services on a Jboss server went down</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338181#M100307</link>
      <description>&lt;P&gt;hey Niketniley, looks the the query will do the job, but i am getting below mentioned error. I tried putting a space between  search "downTime (in Min)"&amp;gt;5 but its not helping&lt;/P&gt;

&lt;P&gt;Comparator '&amp;gt;' is missing a term on the right hand side&lt;BR /&gt;
The search job has failed due to an error. You may be able view the job in the Job Inspector.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 15:09:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338181#M100307</guid>
      <dc:creator>shakeel253</dc:creator>
      <dc:date>2017-12-13T15:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query that alert if services on a Jboss server went down</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338182#M100308</link>
      <description>&lt;P&gt;@shakeel253, my bad I had used &lt;CODE&gt;search&lt;/CODE&gt; in place of &lt;CODE&gt;where&lt;/CODE&gt;. Replaced double quotes with single quotes as well. Please try again and confirm.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 15:15:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338182#M100308</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-13T15:15:46Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query that alert if services on a Jboss server went down</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338183#M100309</link>
      <description>&lt;P&gt;But this query is pinging the hosts. I think Shakeel needs a query that checks if the jboss service is down.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 16:11:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338183#M100309</guid>
      <dc:creator>fsrodriguez</dc:creator>
      <dc:date>2017-12-13T16:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query that alert if services on a Jboss server went down</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338184#M100310</link>
      <description>&lt;P&gt;@niketnilay Exactly what fsrodriguez mentioned, that is what i need.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 16:13:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338184#M100310</guid>
      <dc:creator>shakeel253</dc:creator>
      <dc:date>2017-12-13T16:13:34Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query that alert if services on a Jboss server went down</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338185#M100311</link>
      <description>&lt;P&gt;@shakeel253, I based it off your query which you mentioned in the question that works fine for individual JBOSS server -&amp;gt; &lt;CODE&gt;below query sends me alert when jboss service is down&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Nevertheless. Which OS is the JBOSS server running on Windows or Linux. Usually on windows JBOSS service start and stop is logged in EventViewer, is it so? if not do you have explicit JBOSS logs that can be used instead?&lt;/P&gt;

&lt;P&gt;If you can provide the logs or place which you use to identify JBOSS service down, the same can be plugged in to the alert.&lt;/P&gt;

&lt;P&gt;First let me change answer to comment, because seems like your query in the question does not seem to do what you expect.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 16:56:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338185#M100311</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-13T16:56:02Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query that alert if services on a Jboss server went down</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338186#M100312</link>
      <description>&lt;P&gt;The OS we are using is Linux (Amazon Linux EC2 instance or Redhat). We use  Jboss server log to identify if its starting or shutdown, the absolute path for that is /opt/jboss-eap/standalone/log/server.log.&lt;/P&gt;

&lt;P&gt;Another way we check if Jboss service is running by checking Jboss pid &lt;/P&gt;

&lt;P&gt;ps aux | grep jboss&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 18:05:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338186#M100312</guid>
      <dc:creator>shakeel253</dc:creator>
      <dc:date>2017-12-13T18:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query that alert if services on a Jboss server went down</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338187#M100313</link>
      <description>&lt;P&gt;Then instead of WHERE &lt;CODE&gt;index=&amp;lt;yourIndexName&amp;gt;&lt;/CODE&gt; in &lt;CODE&gt;tstats&lt;/CODE&gt;, use &lt;CODE&gt;sourcetype for JBOSS&lt;/CODE&gt; if you have kept one. Otherwise use &lt;CODE&gt;source&lt;/CODE&gt; i.e.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;WHERE source="/opt/jboss-eap/standalone/log/server.log"&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 18:20:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338187#M100313</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-13T18:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query that alert if services on a Jboss server went down</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338188#M100314</link>
      <description>&lt;P&gt;two issues when i changed the source and ran the query&lt;/P&gt;

&lt;P&gt;1) It is picking jboss server for other environment, for example, i need jboss for ABC environment but not for DEF environment, but its picking up all the server from ABC environment and DEF environment.&lt;/P&gt;

&lt;P&gt;2)The second issue is that the query should only give me result when it detects is the jboss server is down, but it is still showing me result&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 20:25:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338188#M100314</guid>
      <dc:creator>shakeel253</dc:creator>
      <dc:date>2017-12-13T20:25:50Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query that alert if services on a Jboss server went down</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338189#M100315</link>
      <description>&lt;P&gt;@shakeel253, have you tried the following:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | tstats latest(_time) as _time WHERE (host="ABC1" OR host="ABC2") AND source="/opt/jboss-eap/standalone/log/server.log" by host
 | eval "downTime (in Min)"=round((now()-_time)/60,0)
 | appendpipe [
     | inputlookup available_jboss_hosts.csv
     | fields host
     | eval "downTime (in Min)"="999"
        ]
 | dedup host
 | where 'downTime (in Min)'&amp;gt;5
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 26 Dec 2017 17:18:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338189#M100315</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-26T17:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query that alert if services on a Jboss server went down</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338190#M100316</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/201110"&gt;@niketn&lt;/a&gt; so i have my tomcat server running and when i ran below query, i get  output with the host name, current date and time as well as downtime 999. Is that the expected output? &lt;BR /&gt;
I was under the  impression if the tomcat/jboss services are running then there would be no output since there is no downtime for those services. We should only get result when downtime (jboss/tomcat) is more then 5 min&lt;/P&gt;

&lt;P&gt;| tstats latest(_time) as _time WHERE (host="hostsvm") AND source="/opt/tomcat/logs/catalina.out" by host&lt;BR /&gt;
   | eval "downTime (in Min)"=round((now()-_time)/60,0)&lt;BR /&gt;
   | append [&lt;BR /&gt;
       | makeresults&lt;BR /&gt;
       | eval host="hostsvm", "downTime (in Min)"="999"]&lt;BR /&gt;
      | dedup host&lt;BR /&gt;
   | where 'downTime (in Min)'&amp;gt;5&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:22:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338190#M100316</guid>
      <dc:creator>shakeel253</dc:creator>
      <dc:date>2020-09-29T17:22:14Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query that alert if services on a Jboss server went down</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338191#M100317</link>
      <description>&lt;P&gt;Have you done &lt;CODE&gt;| dedup host&lt;/CODE&gt;?&lt;BR /&gt;
Idea is to have one row for each host, if the query does not return any rows in such case only one row with &lt;CODE&gt;downTIme (in Min)=999&lt;/CODE&gt; will be present. By doing a &lt;CODE&gt;dedup host&lt;/CODE&gt; we retain only one row per host.&lt;/P&gt;

&lt;P&gt;The final filter &lt;CODE&gt;| where 'downTime (in Min)'&amp;gt;5&lt;/CODE&gt; retains all records with events received older than 5 min and also the hosts which did not have any events for the selected time period (indicated by &lt;CODE&gt;999&lt;/CODE&gt;). You can also set it to any other default value if it is confusing i.e. "5+" indicating host/s that did not have an event for last more than 5 minutes based on selected timerange.&lt;/P&gt;

&lt;P&gt;Hope this clarifies.&lt;/P&gt;</description>
      <pubDate>Wed, 27 Dec 2017 03:10:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338191#M100317</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-27T03:10:13Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk query that alert if services on a Jboss server went down</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338192#M100318</link>
      <description>&lt;P&gt;Hi - I added this post - If you find it useful, please upvote the answer,  or add your own solution if you found another way!&lt;/P&gt;

&lt;P&gt;&lt;A href="https://answers.splunk.com/answers/606762/how-do-i-monitor-jbosstomcatapacheetc-and-raise-an.html"&gt;https://answers.splunk.com/answers/606762/how-do-i-monitor-jbosstomcatapacheetc-and-raise-an.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Dec 2017 21:59:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Splunk-query-that-alert-if-services-on-a-Jboss-server-went-down/m-p/338192#M100318</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2017-12-28T21:59:54Z</dc:date>
    </item>
  </channel>
</rss>

