<?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: Shell Script to Check if Multiple Servers are Correctly Forwarding Data in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Shell-Script-to-Check-if-Multiple-Servers-are-Correctly/m-p/252476#M48535</link>
    <description>&lt;P&gt;On Unix/Linux you could take a similar approach if you setup ssh keys.&lt;/P&gt;

&lt;P&gt;ssh user1@server1 command1&lt;/P&gt;</description>
    <pubDate>Fri, 29 Jan 2016 20:21:42 GMT</pubDate>
    <dc:creator>lycollicott</dc:creator>
    <dc:date>2016-01-29T20:21:42Z</dc:date>
    <item>
      <title>Shell Script to Check if Multiple Servers are Correctly Forwarding Data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Shell-Script-to-Check-if-Multiple-Servers-are-Correctly/m-p/252474#M48533</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;

&lt;P&gt;I have a list of servers in a text file "servers.txt."&lt;/P&gt;

&lt;P&gt;I am trying to create a shell script that will see if all of my servers are sending data to Splunk on a daily basis. I have some scripting knowledge and created a script to see if the server is up or down by simply pinging it. I want to take this one step further. I want to know when the Splunk Forwarder has stopped working or something along those lines. &lt;/P&gt;

&lt;P&gt;Any help would be appreciated. &lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2016 19:57:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Shell-Script-to-Check-if-Multiple-Servers-are-Correctly/m-p/252474#M48533</guid>
      <dc:creator>mmensch</dc:creator>
      <dc:date>2016-01-29T19:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Script to Check if Multiple Servers are Correctly Forwarding Data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Shell-Script-to-Check-if-Multiple-Servers-are-Correctly/m-p/252475#M48534</link>
      <description>&lt;P&gt;You could script a remote "splunk status"&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$serverlist = get-content splunk80uf.list

foreach ($server in $serverlist)
{
$result = Invoke-WmiMethod -ComputerName $server -Class Win32_Process -Name Create -ArgumentList "cmd.exe /c e:\app\SplunkUniversalForwarder\bin\splunk.exe status &amp;gt;E:\app\status80uf.log" 
if ($result.ReturnValue -ne 0)
    {
       ##$exception = New-Object System.ComponentModel.Win32Exception([int]$result.ReturnValue)
        ##Write-Error "Error launching installer on computer ${server}: $($exception.Message)"
        echo Crap
    }
}

sleep 5

foreach ($server in $serverlist)
{
write-host "$server`t" -nonewline
Get-content \\$server\e$\app\status80uf.log
}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 29 Jan 2016 20:19:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Shell-Script-to-Check-if-Multiple-Servers-are-Correctly/m-p/252475#M48534</guid>
      <dc:creator>lycollicott</dc:creator>
      <dc:date>2016-01-29T20:19:34Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Script to Check if Multiple Servers are Correctly Forwarding Data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Shell-Script-to-Check-if-Multiple-Servers-are-Correctly/m-p/252476#M48535</link>
      <description>&lt;P&gt;On Unix/Linux you could take a similar approach if you setup ssh keys.&lt;/P&gt;

&lt;P&gt;ssh user1@server1 command1&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2016 20:21:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Shell-Script-to-Check-if-Multiple-Servers-are-Correctly/m-p/252476#M48535</guid>
      <dc:creator>lycollicott</dc:creator>
      <dc:date>2016-01-29T20:21:42Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Script to Check if Multiple Servers are Correctly Forwarding Data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Shell-Script-to-Check-if-Multiple-Servers-are-Correctly/m-p/252477#M48536</link>
      <description>&lt;P&gt;I think it would be a lot easier to verify the completion of data being forwarded by searching 1.) the index the data is being forwarded to, and 2.) the &lt;CODE&gt;_internal&lt;/CODE&gt; index to verify connection. Then, if you don't see data in 1, you can check 2 to make sure the connection is alive, and if 1 &amp;amp; 2 are blank, then you can investigate further.&lt;/P&gt;

&lt;P&gt;Splunk is actually &lt;STRONG&gt;really great&lt;/STRONG&gt; at doing this, so I would suggest avoiding a scripting language or shell scripts if possible.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2016 22:33:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Shell-Script-to-Check-if-Multiple-Servers-are-Correctly/m-p/252477#M48536</guid>
      <dc:creator>aljohnson_splun</dc:creator>
      <dc:date>2016-01-29T22:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Script to Check if Multiple Servers are Correctly Forwarding Data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Shell-Script-to-Check-if-Multiple-Servers-are-Correctly/m-p/252478#M48537</link>
      <description>&lt;P&gt;I understand Splunk is great at doing this, but this does not scale to thousands of servers. I have a list of 250 servers currently and it will grow into the tens of thousands. &lt;/P&gt;</description>
      <pubDate>Mon, 01 Feb 2016 17:10:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Shell-Script-to-Check-if-Multiple-Servers-are-Correctly/m-p/252478#M48537</guid>
      <dc:creator>mmensch</dc:creator>
      <dc:date>2016-02-01T17:10:57Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Script to Check if Multiple Servers are Correctly Forwarding Data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Shell-Script-to-Check-if-Multiple-Servers-are-Correctly/m-p/252479#M48538</link>
      <description>&lt;P&gt;This is not working for me.&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 14:18:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Shell-Script-to-Check-if-Multiple-Servers-are-Correctly/m-p/252479#M48538</guid>
      <dc:creator>mmensch</dc:creator>
      <dc:date>2016-02-05T14:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Shell Script to Check if Multiple Servers are Correctly Forwarding Data</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Shell-Script-to-Check-if-Multiple-Servers-are-Correctly/m-p/252480#M48539</link>
      <description>&lt;P&gt;What kind of errors or messages do you get?&lt;/P&gt;</description>
      <pubDate>Fri, 05 Feb 2016 15:06:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Shell-Script-to-Check-if-Multiple-Servers-are-Correctly/m-p/252480#M48539</guid>
      <dc:creator>lycollicott</dc:creator>
      <dc:date>2016-02-05T15:06:15Z</dc:date>
    </item>
  </channel>
</rss>

