<?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: Forward data input copy to syslog without apply SEDCMD in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Forward-data-input-copy-to-syslog-without-apply-SEDCMD/m-p/123896#M25559</link>
    <description>&lt;P&gt;So, in order to solve my problem I had to re-think about it and thanks God it´s worked.&lt;/P&gt;

&lt;P&gt;I will put config first, and them I will explain the idea behind it.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;outputs.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;[tcpout:LB_indexers]&lt;/P&gt;

&lt;P&gt;server=SPLUNK-IDX-IP:9997&lt;/P&gt;

&lt;P&gt;[tcpout]&lt;/P&gt;

&lt;P&gt;defaultGroup=LB_indexers&lt;/P&gt;

&lt;P&gt;disabled=false&lt;/P&gt;

&lt;P&gt;[syslog:my_syslog]&lt;/P&gt;

&lt;P&gt;server = SYSLOG-IP:514&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;[WinEventLog:Application]&lt;/P&gt;

&lt;P&gt;SEDCMD-remove_eol = s/[\n\r]/ /g&lt;/P&gt;

&lt;P&gt;SEDCMD-remove_message_flag = s/(\d{2}\/\d{2}\/\d{4}\s\d{2}:\d{2}:\d{2}\s\w{2})(.&lt;EM&gt;)(VtexMetric|VtexMachineMetric)(.&lt;/EM&gt;)(Message=# )(.*)/\1 \3 \6/g&lt;/P&gt;

&lt;P&gt;TRANSFORMS-sendData = send2Syslog,sendNull,setLogger&lt;/P&gt;

&lt;P&gt;TRANSFORMS-setDataSource = setMetricSource,setMachineMetricSource&lt;/P&gt;

&lt;P&gt;TRANSFORMS-setDataIndex = setLoggerLogsIndex,setRequestCaptureIndex,setLogisticsIndex&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;[send2Syslog]&lt;/P&gt;

&lt;P&gt;REGEX = VtexLog&lt;/P&gt;

&lt;P&gt;DEST_KEY = _SYSLOG_ROUTING&lt;/P&gt;

&lt;P&gt;FORMAT = sumologic_syslog&lt;/P&gt;

&lt;P&gt;[sendNull]&lt;/P&gt;

&lt;P&gt;REGEX = ^(?!.&lt;EM&gt;VtexLog|VtexMetric|VtexMachineMetric).&lt;/EM&gt;$&lt;/P&gt;

&lt;P&gt;DEST_KEY = queue&lt;/P&gt;

&lt;P&gt;FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;[setLogger]&lt;/P&gt;

&lt;P&gt;REGEX = VtexLog|VtexMetric|VtexMachineMetric&lt;/P&gt;

&lt;P&gt;DEST_KEY = queue&lt;/P&gt;

&lt;P&gt;FORMAT = indexQueue&lt;/P&gt;

&lt;P&gt;[setMetricSource]&lt;/P&gt;

&lt;P&gt;REGEX = VtexMetric&lt;/P&gt;

&lt;P&gt;FORMAT = sourcetype::VtexMetric&lt;/P&gt;

&lt;P&gt;DEST_KEY = MetaData:Sourcetype&lt;/P&gt;

&lt;P&gt;[setMachineMetricSource]&lt;/P&gt;

&lt;P&gt;REGEX = VtexMachineMetric&lt;/P&gt;

&lt;P&gt;FORMAT = sourcetype::VtexMachineMetric&lt;/P&gt;

&lt;P&gt;DEST_KEY = MetaData:Sourcetype&lt;/P&gt;

&lt;P&gt;[setLoggerLogsIndex]&lt;/P&gt;

&lt;P&gt;REGEX = VtexLog&lt;/P&gt;

&lt;P&gt;FORMAT = logger_logs&lt;/P&gt;

&lt;P&gt;DEST_KEY = _MetaData:Index&lt;/P&gt;

&lt;P&gt;[setRequestCaptureIndex]&lt;/P&gt;

&lt;P&gt;REGEX = VtexMetric|VtexMachineMetric.*AppName=vtex.requestcapture&lt;/P&gt;

&lt;P&gt;FORMAT = rc&lt;/P&gt;

&lt;P&gt;DEST_KEY = _MetaData:Index&lt;/P&gt;

&lt;P&gt;[setLogisticsIndex]&lt;/P&gt;

&lt;P&gt;REGEX = VtexMetric|VtexMachineMetric.*AppName=vtex.commerce.logistics&lt;/P&gt;

&lt;P&gt;FORMAT = logistics&lt;/P&gt;

&lt;P&gt;DEST_KEY = _MetaData:Index&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;The objetive was to send to Splunk index only data generated from &lt;EM&gt;EventView&lt;/EM&gt; with source &lt;STRONG&gt;VtexMetric&lt;/STRONG&gt; or &lt;STRONG&gt;VtexMachineMetric&lt;/STRONG&gt;. At same time I would like to forward data with source &lt;STRONG&gt;VtexLog&lt;/STRONG&gt; to a third system syslog.&lt;/P&gt;

&lt;P&gt;On Props file first the line breaks are removed, then for VtexMetric and VtexMachineMetric data is cleaned it has the EventViewer header removed and only Message data is keeped.&lt;/P&gt;

&lt;P&gt;The tricks are on transforms, first data that has VtexLog is forwarder to &lt;EM&gt;_SYSLOG_ROUTING&lt;/EM&gt; at same time there is a selective filtering running on &lt;EM&gt;sendNull&lt;/EM&gt; and &lt;EM&gt;setLogger&lt;/EM&gt; stanza. On &lt;EM&gt;sendNull&lt;/EM&gt; all data that aren´t VtexLog or VtexMetric or VtexMachineMetric is discarded, that way I avoided windows logs. The oposite is made on &lt;EM&gt;setLogger&lt;/EM&gt; where I set to indexQueue data that has desired sources.&lt;/P&gt;

&lt;P&gt;On &lt;EM&gt;setMetricSource&lt;/EM&gt; and &lt;EM&gt;setMachineMetricSource&lt;/EM&gt; transforms the sourcetype is changed based on windows event viewer source.&lt;/P&gt;

&lt;P&gt;Things stats to be cool on &lt;STRONG&gt;setLoggerLogsIndex&lt;/STRONG&gt; transformation, since I allow logs to be indexed on &lt;EM&gt;setLogger&lt;/EM&gt; transformation now I redirect all logs to this specific indexs. Remember that I don´t want to have those data indexed and I only keep it in order to continue to send it to third party syslog system. So the trick is create the index on Splunk Indexer and then &lt;STRONG&gt;disable&lt;/STRONG&gt; it. If you desire you can send your not wanted data to a non-created index but it will put a warning on your SearchHead.&lt;/P&gt;

&lt;P&gt;On &lt;EM&gt;setRequestCaptureIndex&lt;/EM&gt; and &lt;EM&gt;setLogisticsIndex&lt;/EM&gt; I finish my needs sending rest of data to correct index.&lt;/P&gt;

&lt;P&gt;And that how I made to send data to a third party syslog server without index what I don´t want.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 15:12:48 GMT</pubDate>
    <dc:creator>fabiocaldas</dc:creator>
    <dc:date>2020-09-28T15:12:48Z</dc:date>
    <item>
      <title>Forward data input copy to syslog without apply SEDCMD</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forward-data-input-copy-to-syslog-without-apply-SEDCMD/m-p/123895#M25558</link>
      <description>&lt;P&gt;I collect my data using UniveralForwarder, them send it to HeavyForwarder.&lt;/P&gt;

&lt;P&gt;I would like to send a copy of data that enter into HF to a syslog server. On my HF, I have the following configs:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;inputs.conf&lt;/STRONG&gt; &lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;[splunktcp://9997]&lt;/P&gt;

&lt;P&gt;disabled = 0&lt;/P&gt;

&lt;P&gt;_SYSLOG_ROUTING = syslogserver&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;&lt;STRONG&gt;outputs.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;[syslog:syslogserver]&lt;/P&gt;

&lt;P&gt;server = MY-SYSLOG-IP:514&lt;/P&gt;

&lt;P&gt;sendCookedData = false&lt;/P&gt;

&lt;P&gt;[tcpout:LB_indexers]&lt;/P&gt;

&lt;P&gt;server=MY-SPLUNK-IDX-SERVER:9997&lt;/P&gt;

&lt;P&gt;[tcpout]&lt;/P&gt;

&lt;P&gt;defaultGroup=LB_indexers&lt;/P&gt;

&lt;P&gt;disabled=false&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;[WinEventLog:Application]&lt;/P&gt;

&lt;P&gt;SEDCMD-remove_eol = s/[\n\r]/ /g&lt;/P&gt;

&lt;P&gt;SEDCMD-remove_message_flag = s/(\d{2}\/\d{2}\/\d{4}\s\d{2}:\d{2}:\d{2}\s\w{2})(.&lt;EM&gt;)(VtexLog|VtexMetric|VtexMachineMetric)(.&lt;/EM&gt;)(Message=# )(.*)/\1 \3 \6/g&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;The point is that, I would like to apply those SEDCMD only to data that is sent to Splunk Indexer. I would like to send to syslog the data without any cut.&lt;/P&gt;

&lt;P&gt;I need suggestions, thanks folks !!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:09:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forward-data-input-copy-to-syslog-without-apply-SEDCMD/m-p/123895#M25558</guid>
      <dc:creator>fabiocaldas</dc:creator>
      <dc:date>2020-09-28T15:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: Forward data input copy to syslog without apply SEDCMD</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Forward-data-input-copy-to-syslog-without-apply-SEDCMD/m-p/123896#M25559</link>
      <description>&lt;P&gt;So, in order to solve my problem I had to re-think about it and thanks God it´s worked.&lt;/P&gt;

&lt;P&gt;I will put config first, and them I will explain the idea behind it.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;outputs.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;[tcpout:LB_indexers]&lt;/P&gt;

&lt;P&gt;server=SPLUNK-IDX-IP:9997&lt;/P&gt;

&lt;P&gt;[tcpout]&lt;/P&gt;

&lt;P&gt;defaultGroup=LB_indexers&lt;/P&gt;

&lt;P&gt;disabled=false&lt;/P&gt;

&lt;P&gt;[syslog:my_syslog]&lt;/P&gt;

&lt;P&gt;server = SYSLOG-IP:514&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;[WinEventLog:Application]&lt;/P&gt;

&lt;P&gt;SEDCMD-remove_eol = s/[\n\r]/ /g&lt;/P&gt;

&lt;P&gt;SEDCMD-remove_message_flag = s/(\d{2}\/\d{2}\/\d{4}\s\d{2}:\d{2}:\d{2}\s\w{2})(.&lt;EM&gt;)(VtexMetric|VtexMachineMetric)(.&lt;/EM&gt;)(Message=# )(.*)/\1 \3 \6/g&lt;/P&gt;

&lt;P&gt;TRANSFORMS-sendData = send2Syslog,sendNull,setLogger&lt;/P&gt;

&lt;P&gt;TRANSFORMS-setDataSource = setMetricSource,setMachineMetricSource&lt;/P&gt;

&lt;P&gt;TRANSFORMS-setDataIndex = setLoggerLogsIndex,setRequestCaptureIndex,setLogisticsIndex&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;&lt;STRONG&gt;transforms.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;BLOCKQUOTE&gt;
&lt;P&gt;[send2Syslog]&lt;/P&gt;

&lt;P&gt;REGEX = VtexLog&lt;/P&gt;

&lt;P&gt;DEST_KEY = _SYSLOG_ROUTING&lt;/P&gt;

&lt;P&gt;FORMAT = sumologic_syslog&lt;/P&gt;

&lt;P&gt;[sendNull]&lt;/P&gt;

&lt;P&gt;REGEX = ^(?!.&lt;EM&gt;VtexLog|VtexMetric|VtexMachineMetric).&lt;/EM&gt;$&lt;/P&gt;

&lt;P&gt;DEST_KEY = queue&lt;/P&gt;

&lt;P&gt;FORMAT = nullQueue&lt;/P&gt;

&lt;P&gt;[setLogger]&lt;/P&gt;

&lt;P&gt;REGEX = VtexLog|VtexMetric|VtexMachineMetric&lt;/P&gt;

&lt;P&gt;DEST_KEY = queue&lt;/P&gt;

&lt;P&gt;FORMAT = indexQueue&lt;/P&gt;

&lt;P&gt;[setMetricSource]&lt;/P&gt;

&lt;P&gt;REGEX = VtexMetric&lt;/P&gt;

&lt;P&gt;FORMAT = sourcetype::VtexMetric&lt;/P&gt;

&lt;P&gt;DEST_KEY = MetaData:Sourcetype&lt;/P&gt;

&lt;P&gt;[setMachineMetricSource]&lt;/P&gt;

&lt;P&gt;REGEX = VtexMachineMetric&lt;/P&gt;

&lt;P&gt;FORMAT = sourcetype::VtexMachineMetric&lt;/P&gt;

&lt;P&gt;DEST_KEY = MetaData:Sourcetype&lt;/P&gt;

&lt;P&gt;[setLoggerLogsIndex]&lt;/P&gt;

&lt;P&gt;REGEX = VtexLog&lt;/P&gt;

&lt;P&gt;FORMAT = logger_logs&lt;/P&gt;

&lt;P&gt;DEST_KEY = _MetaData:Index&lt;/P&gt;

&lt;P&gt;[setRequestCaptureIndex]&lt;/P&gt;

&lt;P&gt;REGEX = VtexMetric|VtexMachineMetric.*AppName=vtex.requestcapture&lt;/P&gt;

&lt;P&gt;FORMAT = rc&lt;/P&gt;

&lt;P&gt;DEST_KEY = _MetaData:Index&lt;/P&gt;

&lt;P&gt;[setLogisticsIndex]&lt;/P&gt;

&lt;P&gt;REGEX = VtexMetric|VtexMachineMetric.*AppName=vtex.commerce.logistics&lt;/P&gt;

&lt;P&gt;FORMAT = logistics&lt;/P&gt;

&lt;P&gt;DEST_KEY = _MetaData:Index&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;The objetive was to send to Splunk index only data generated from &lt;EM&gt;EventView&lt;/EM&gt; with source &lt;STRONG&gt;VtexMetric&lt;/STRONG&gt; or &lt;STRONG&gt;VtexMachineMetric&lt;/STRONG&gt;. At same time I would like to forward data with source &lt;STRONG&gt;VtexLog&lt;/STRONG&gt; to a third system syslog.&lt;/P&gt;

&lt;P&gt;On Props file first the line breaks are removed, then for VtexMetric and VtexMachineMetric data is cleaned it has the EventViewer header removed and only Message data is keeped.&lt;/P&gt;

&lt;P&gt;The tricks are on transforms, first data that has VtexLog is forwarder to &lt;EM&gt;_SYSLOG_ROUTING&lt;/EM&gt; at same time there is a selective filtering running on &lt;EM&gt;sendNull&lt;/EM&gt; and &lt;EM&gt;setLogger&lt;/EM&gt; stanza. On &lt;EM&gt;sendNull&lt;/EM&gt; all data that aren´t VtexLog or VtexMetric or VtexMachineMetric is discarded, that way I avoided windows logs. The oposite is made on &lt;EM&gt;setLogger&lt;/EM&gt; where I set to indexQueue data that has desired sources.&lt;/P&gt;

&lt;P&gt;On &lt;EM&gt;setMetricSource&lt;/EM&gt; and &lt;EM&gt;setMachineMetricSource&lt;/EM&gt; transforms the sourcetype is changed based on windows event viewer source.&lt;/P&gt;

&lt;P&gt;Things stats to be cool on &lt;STRONG&gt;setLoggerLogsIndex&lt;/STRONG&gt; transformation, since I allow logs to be indexed on &lt;EM&gt;setLogger&lt;/EM&gt; transformation now I redirect all logs to this specific indexs. Remember that I don´t want to have those data indexed and I only keep it in order to continue to send it to third party syslog system. So the trick is create the index on Splunk Indexer and then &lt;STRONG&gt;disable&lt;/STRONG&gt; it. If you desire you can send your not wanted data to a non-created index but it will put a warning on your SearchHead.&lt;/P&gt;

&lt;P&gt;On &lt;EM&gt;setRequestCaptureIndex&lt;/EM&gt; and &lt;EM&gt;setLogisticsIndex&lt;/EM&gt; I finish my needs sending rest of data to correct index.&lt;/P&gt;

&lt;P&gt;And that how I made to send data to a third party syslog server without index what I don´t want.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:12:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Forward-data-input-copy-to-syslog-without-apply-SEDCMD/m-p/123896#M25559</guid>
      <dc:creator>fabiocaldas</dc:creator>
      <dc:date>2020-09-28T15:12:48Z</dc:date>
    </item>
  </channel>
</rss>

