<?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 different monitors for different hosts under the same index in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/different-monitors-for-different-hosts-under-the-same-index/m-p/538266#M90231</link>
    <description>&lt;P&gt;hi!&lt;/P&gt;&lt;P&gt;I have a case where I need to onboard data from different hosts and paths but under the same index. As an example, I need to onboard from server1 logfile /foo/bar1.log, and from server2 /foo/bar2.log.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I create one app and in the inputs.conf place [monitor:///foo/bar*.log] and in the serverclass add server1 and server2, it will start to gather data from both files from both servers (I assume that they both exists on both servers).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, the only workaround that comes to my mind is to separate them into 2 different apps, like:&lt;/P&gt;&lt;P&gt;app1:&lt;/P&gt;&lt;P&gt;inputs.conf -&amp;nbsp;[monitor:///foo/bar1.log]&amp;nbsp;&lt;/P&gt;&lt;P&gt;serverclass: server1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;app2:&lt;/P&gt;&lt;P&gt;inputs.conf -&amp;nbsp;[monitor:///foo/bar2.log]&amp;nbsp;&lt;/P&gt;&lt;P&gt;serverclass: server2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The question is, if it is possible to do it within one app?&lt;/P&gt;</description>
    <pubDate>Tue, 02 Feb 2021 12:01:34 GMT</pubDate>
    <dc:creator>przemysaw</dc:creator>
    <dc:date>2021-02-02T12:01:34Z</dc:date>
    <item>
      <title>different monitors for different hosts under the same index</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/different-monitors-for-different-hosts-under-the-same-index/m-p/538266#M90231</link>
      <description>&lt;P&gt;hi!&lt;/P&gt;&lt;P&gt;I have a case where I need to onboard data from different hosts and paths but under the same index. As an example, I need to onboard from server1 logfile /foo/bar1.log, and from server2 /foo/bar2.log.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I create one app and in the inputs.conf place [monitor:///foo/bar*.log] and in the serverclass add server1 and server2, it will start to gather data from both files from both servers (I assume that they both exists on both servers).&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, the only workaround that comes to my mind is to separate them into 2 different apps, like:&lt;/P&gt;&lt;P&gt;app1:&lt;/P&gt;&lt;P&gt;inputs.conf -&amp;nbsp;[monitor:///foo/bar1.log]&amp;nbsp;&lt;/P&gt;&lt;P&gt;serverclass: server1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;app2:&lt;/P&gt;&lt;P&gt;inputs.conf -&amp;nbsp;[monitor:///foo/bar2.log]&amp;nbsp;&lt;/P&gt;&lt;P&gt;serverclass: server2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The question is, if it is possible to do it within one app?&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 12:01:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/different-monitors-for-different-hosts-under-the-same-index/m-p/538266#M90231</guid>
      <dc:creator>przemysaw</dc:creator>
      <dc:date>2021-02-02T12:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: different monitors for different hosts under the same index</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/different-monitors-for-different-hosts-under-the-same-index/m-p/538268#M90232</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/167517"&gt;@przemysaw&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the fact that you have all data in the same index isn't relevant: an index in Splunk is a container and the only reasono to use different indexer (also for different data) are.&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;data retention (data with different retention values must be in different indexes);&lt;/LI&gt;&lt;LI&gt;access grants (data with different access grants must be in different indexes).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;After this introduction, you can have all the data in the same index.&lt;/P&gt;&lt;P&gt;This is a normal problem of all the people that approach Splunk coming from database world: Splunk isn't a database and it's very different!&lt;/P&gt;&lt;P&gt;Then you can identify data from a server from the other using the host field that has always a value.&lt;/P&gt;&lt;P&gt;About the question of using one or two apps (it's better call these apps Technical Add-ons or TAs not Apps, apps are the ones on Search Heads), it depends if you have data from both the paths in both the servers and if you want to take all of them or not.&lt;/P&gt;&lt;P&gt;In other words:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;if you want all thepaths in all the servers, you can have only one TA with both the paths in inputs.conf, otherwise you can use two TAs in diferent ServerClasses;&lt;/LI&gt;&lt;LI&gt;you can use one stanza if you have to assign to the data the same sourcetype, otherwise you have to use two stanzas, each one with its own sourcetype;&lt;/LI&gt;&lt;LI&gt;you can recognize data from a server using the host field.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 12:15:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/different-monitors-for-different-hosts-under-the-same-index/m-p/538268#M90232</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-02-02T12:15:11Z</dc:date>
    </item>
    <item>
      <title>Re: different monitors for different hosts under the same index</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/different-monitors-for-different-hosts-under-the-same-index/m-p/538269#M90233</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/167517"&gt;@przemysaw&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;A server class is configured in &lt;STRONG&gt;serverclass.conf&lt;/STRONG&gt; on the deployment server.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes, you can deploy the same app with the same monitor configurations on both server1 and server2.&lt;BR /&gt;&lt;STRONG&gt;myapp/default/inputs.conf&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[monitor:///foo/bar*.log]
index = index_name
sourcetype = sourcetype_name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And to deploy this app on forwarder on both server1 and server2, configure server classes in &lt;STRONG&gt;serverclass.conf&lt;/STRONG&gt; on deployment server and reload deployment server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[serverClass:myserver_class]
whitelist.1=client_name_of_forwarder_on_server1
whitelist.2=client_name_of_forwarder_on_server2

[serverClass:myserver_class:app:my_app]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this reply helps you, an upvote/like would be appreciated.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 12:16:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/different-monitors-for-different-hosts-under-the-same-index/m-p/538269#M90233</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-02-02T12:16:56Z</dc:date>
    </item>
  </channel>
</rss>

