<?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: Monitor statement for syslog server in Monitoring Splunk</title>
    <link>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-statement-for-syslog-server/m-p/455580#M6252</link>
    <description>&lt;P&gt;Hello @basketballah21,&lt;/P&gt;

&lt;P&gt;The advantage of each remote server having its own subdirectory is you can use the "host_segment" option:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# inputs.conf
[monitor:///var/data/syslog/*/*.log]
index = YOURINDEX
sourcetype = syslog
host_segment = 4
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So, for example, log files under /var/log/syslog/server1.net.domain/server1.net.domain.log will get host=server1.net.domain.&lt;/P&gt;

&lt;P&gt;You will need a small modification though:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# props.conf
[syslog]
TRANSFORMS =
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The syslog sourcetype has the property "TRANSFORMS = syslog-host" (etc/system/default/props.conf). This will set the host value based on a regex. You should disable this via "TRANSFORMS =" if you are using the "host_segment" option.&lt;/P&gt;

&lt;P&gt;Put these two conf files under etc/apps/yourapp/default or etc/system/local. Restart Splunk after making changes to configuration files.&lt;/P&gt;

&lt;P&gt;If necessary, you can also create your own sourcetype via props.conf. This might be the case if the default syslog sourcetype does not correctly recognize the timestamps for your logs.&lt;/P&gt;</description>
    <pubDate>Mon, 25 Mar 2019 07:49:24 GMT</pubDate>
    <dc:creator>whrg</dc:creator>
    <dc:date>2019-03-25T07:49:24Z</dc:date>
    <item>
      <title>Monitor statement for syslog server</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-statement-for-syslog-server/m-p/455579#M6251</link>
      <description>&lt;P&gt;Trying to figure out the correct monitor statement for my inputs.conf for logs being sent to my syslog server. &lt;BR /&gt;
/var/log/syslog is where the logs are coming to.&lt;BR /&gt;
Under /var/log/syslog each remote server has its own directory (some are hostnames, some named IPs) and the logs files are underneath there.&lt;/P&gt;

&lt;P&gt;The location of the logs: &lt;BR /&gt;
/var/log/syslog/server1.net.domain/server1.net.domain.log&lt;BR /&gt;
/var/log/syslog/server.2.net.fw.domain/server.2.net.fw.domain.log&lt;BR /&gt;
/var/log/syslog/192.168.45.21/192.168.45.21.log&lt;BR /&gt;
/var/log/syslog/10.4.5.1/10.4.5.1.log&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 02:57:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-statement-for-syslog-server/m-p/455579#M6251</guid>
      <dc:creator>basketballah21</dc:creator>
      <dc:date>2019-03-25T02:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: Monitor statement for syslog server</title>
      <link>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-statement-for-syslog-server/m-p/455580#M6252</link>
      <description>&lt;P&gt;Hello @basketballah21,&lt;/P&gt;

&lt;P&gt;The advantage of each remote server having its own subdirectory is you can use the "host_segment" option:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# inputs.conf
[monitor:///var/data/syslog/*/*.log]
index = YOURINDEX
sourcetype = syslog
host_segment = 4
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;So, for example, log files under /var/log/syslog/server1.net.domain/server1.net.domain.log will get host=server1.net.domain.&lt;/P&gt;

&lt;P&gt;You will need a small modification though:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# props.conf
[syslog]
TRANSFORMS =
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The syslog sourcetype has the property "TRANSFORMS = syslog-host" (etc/system/default/props.conf). This will set the host value based on a regex. You should disable this via "TRANSFORMS =" if you are using the "host_segment" option.&lt;/P&gt;

&lt;P&gt;Put these two conf files under etc/apps/yourapp/default or etc/system/local. Restart Splunk after making changes to configuration files.&lt;/P&gt;

&lt;P&gt;If necessary, you can also create your own sourcetype via props.conf. This might be the case if the default syslog sourcetype does not correctly recognize the timestamps for your logs.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Mar 2019 07:49:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Monitoring-Splunk/Monitor-statement-for-syslog-server/m-p/455580#M6252</guid>
      <dc:creator>whrg</dc:creator>
      <dc:date>2019-03-25T07:49:24Z</dc:date>
    </item>
  </channel>
</rss>

