<?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 to pull the server status in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-that-pulls-the-server-status-of-running-vs/m-p/517586#M145555</link>
    <description>&lt;P&gt;Thank you. Is there a way we can do it based on the last event in the log?&lt;/P&gt;</description>
    <pubDate>Wed, 02 Sep 2020 21:01:48 GMT</pubDate>
    <dc:creator>Uday</dc:creator>
    <dc:date>2020-09-02T21:01:48Z</dc:date>
    <item>
      <title>How to create search that pulls the server status of running vs. shutdown?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-that-pulls-the-server-status-of-running-vs/m-p/517503#M145525</link>
      <description>&lt;P&gt;Can you please help me with a search to display a list of servers with a status Running or Shutdown?&lt;/P&gt;
&lt;P&gt;I have a list of hostnames, but I am not sure how to show if the server status is Running or Shutdown. Eventually I have to build a dashboard out of it.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 23:11:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-that-pulls-the-server-status-of-running-vs/m-p/517503#M145525</guid>
      <dc:creator>Uday</dc:creator>
      <dc:date>2020-09-02T23:11:42Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query to pull the server status</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-that-pulls-the-server-status-of-running-vs/m-p/517504#M145526</link>
      <description>&lt;P&gt;Do you have events in Splunk that show the status of the servers?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 15:05:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-that-pulls-the-server-status-of-running-vs/m-p/517504#M145526</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-09-02T15:05:41Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query to pull the server status</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-that-pulls-the-server-status-of-running-vs/m-p/517507#M145528</link>
      <description>&lt;P&gt;No, unfortunately the logs does n't have any thing that indicates what time the server started or shutdown.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 15:11:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-that-pulls-the-server-status-of-running-vs/m-p/517507#M145528</guid>
      <dc:creator>Uday</dc:creator>
      <dc:date>2020-09-02T15:11:26Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query to pull the server status</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-that-pulls-the-server-status-of-running-vs/m-p/517508#M145529</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225702"&gt;@Uday&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I can image that you have the Splunk UNiversal Forwarder installed in each of the monitored servers, so you can monitor the internal Splunk logs to know if the server is up or down.&lt;/P&gt;&lt;P&gt;You have to put the servers to monitor list in a lookup (called e.g. perimeter) with at least one field contaning hostnames (called host).&lt;/P&gt;&lt;P&gt;With these premises, you can run something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| metasearch index=_internal
| eval host=lower(host)
| stats count BY host
| append [ | inputlookup perimeter | eval host=lower(host), count=0 | fields host count ]
| stats sum(count) AS total BY host
| eval status=if(total=0,"Down","Up")
| table host status&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can display the results in a dashboard, that you can also have in graphic mode following the example "Table Icon Set (Rangemap)" that you can find in the Splunk Dashboard Examples app (&lt;A href="https://splunkbase.splunk.com/app/1603/" target="_blank"&gt;https://splunkbase.splunk.com/app/1603/&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;Or simply in an alert deleting the last two rows and adding the condition | where total=0&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| metasearch index=_internal
| eval host=lower(host)
| stats count BY host
| append [ | inputlookup perimeter | eval host=lower(host), count=0 | fields host count ]
| stats sum(count) AS total BY host
| where total=0&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 15:13:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-that-pulls-the-server-status-of-running-vs/m-p/517508#M145529</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-02T15:13:02Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query to pull the server status</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-that-pulls-the-server-status-of-running-vs/m-p/517586#M145555</link>
      <description>&lt;P&gt;Thank you. Is there a way we can do it based on the last event in the log?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2020 21:01:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-that-pulls-the-server-status-of-running-vs/m-p/517586#M145555</guid>
      <dc:creator>Uday</dc:creator>
      <dc:date>2020-09-02T21:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query to pull the server status</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-that-pulls-the-server-status-of-running-vs/m-p/517653#M145581</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225702"&gt;@Uday&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;as I said, you use the Splunk internal logs that are always present.&lt;/P&gt;&lt;P&gt;Using | metasearch you have a very quick search, so you don't need to use only one event.&lt;/P&gt;&lt;P&gt;You can run this search as an alert every e.g. 5 minutes on a timeframe of 5 minutes having a very quick answer.&lt;/P&gt;&lt;P&gt;In this way you almost immediately have an alert when a server is down.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 07:11:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-that-pulls-the-server-status-of-running-vs/m-p/517653#M145581</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-03T07:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query to pull the server status</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-that-pulls-the-server-status-of-running-vs/m-p/517771#M145613</link>
      <description>&lt;P&gt;I just tried this and the query helped. Can you please help with the query using range map to display the status Up/Down on the dashboard?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 17:20:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-that-pulls-the-server-status-of-running-vs/m-p/517771#M145613</guid>
      <dc:creator>Uday</dc:creator>
      <dc:date>2020-09-03T17:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query to pull the server status</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-that-pulls-the-server-status-of-running-vs/m-p/517774#M145614</link>
      <description>&lt;P&gt;Can you please help me to plug in the rangemap query to the below ?&lt;/P&gt;&lt;PRE&gt;| metasearch index=_internal
| eval host=lower(host)
| stats count BY host
| append [ | inputlookup perimeter | eval host=lower(host), count=0 | fields host count ]
| stats sum(count) AS total BY host
| eval status=if(total=0,"Down","Up")
| table host status&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Sep 2020 17:28:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-that-pulls-the-server-status-of-running-vs/m-p/517774#M145614</guid>
      <dc:creator>Uday</dc:creator>
      <dc:date>2020-09-03T17:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Query to pull the server status</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-that-pulls-the-server-status-of-running-vs/m-p/517867#M145643</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225702"&gt;@Uday&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please, try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| metasearch index=_internal
| eval host=lower(host)
| stats count BY host
| append [ | inputlookup perimeter | eval host=lower(host), count=0 | fields host count ]
| stats sum(count) AS total BY host
| rangemap field=total severe=0-0 low=1-1000000000 default=severe
| eval status=if(total=0,"Down","Up")
| table host status range&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the table you can eventually choose to display only host and range.&lt;/P&gt;&lt;P&gt;You can also display results in graphic mode, following the instruction in"Table Icon Set (Rangemap)" dashboard in the "Splunk Dashboard Examples" App (&lt;A href="https://splunkbase.splunk.com/app/1603/" target="_blank"&gt;https://splunkbase.splunk.com/app/1603/&lt;/A&gt;).&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 04 Sep 2020 06:57:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-create-search-that-pulls-the-server-status-of-running-vs/m-p/517867#M145643</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-09-04T06:57:52Z</dc:date>
    </item>
  </channel>
</rss>

