<?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: how to sedcmd?? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/how-to-sedcmd/m-p/250474#M48208</link>
    <description>&lt;P&gt;The problem is that &lt;CODE&gt;SEDCMD&lt;/CODE&gt; and &lt;CODE&gt;REPORT&lt;/CODE&gt; must be in ALL-CAPS.&lt;BR /&gt;
Another problem is that &lt;CODE&gt;SEDCMD&lt;/CODE&gt; must have a unique (but arbitrary) suffix, like this: &lt;CODE&gt;SEDCMD-arbitraryname =&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 31 Mar 2017 21:49:44 GMT</pubDate>
    <dc:creator>woodcock</dc:creator>
    <dc:date>2017-03-31T21:49:44Z</dc:date>
    <item>
      <title>how to sedcmd??</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-sedcmd/m-p/250470#M48204</link>
      <description>&lt;P&gt;In the form of logs is as follows&lt;/P&gt;

&lt;P&gt;SNMPv2-SMI::mib-"2.2.1.2.1" = "lo" SNMPv2-SMI::mib-"2.2.1.2.2" = "eth0" SNMPv2-SMI::mib-"2.2.1.2.3" = "eth1" ~~~~~&lt;/P&gt;

&lt;P&gt;props.conf setting is as follows.&lt;/P&gt;

&lt;P&gt;[snmp_test]&lt;BR /&gt;
sedcmd=s/SNMPv2::mib-2."2.2.1.2. ￦d+￦"//g s/" //g"&lt;BR /&gt;
report-snmp_del=snmp_del&lt;/P&gt;

&lt;P&gt;transforms.conf setting is as follows.&lt;BR /&gt;
[snmp_del]&lt;BR /&gt;
DELIMS="="&lt;BR /&gt;
FIELDS=a1,a2,a3,........a10&lt;/P&gt;

&lt;P&gt;I want this result.&lt;/P&gt;

&lt;P&gt;a1="lo"&lt;BR /&gt;
a2="eth0"&lt;BR /&gt;
a3="eth1"&lt;/P&gt;

&lt;P&gt;But, restart splunk this error.&lt;/P&gt;

&lt;P&gt;Invalid key in stanza [snmp_test] in ~~/props.conf, line 123: sedcmd (value: .......)&lt;/P&gt;

&lt;P&gt;How do you fix it?&lt;/P&gt;

&lt;P&gt;thanks!!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 11:24:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-sedcmd/m-p/250470#M48204</guid>
      <dc:creator>jihoon</dc:creator>
      <dc:date>2020-09-29T11:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: how to sedcmd??</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-sedcmd/m-p/250471#M48205</link>
      <description>&lt;P&gt;Are you sure that your question is formatted correctly? Your sedcmd regex looks a little odd ...&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 01:44:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-sedcmd/m-p/250471#M48205</guid>
      <dc:creator>lquinn</dc:creator>
      <dc:date>2016-10-11T01:44:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to sedcmd??</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-sedcmd/m-p/250472#M48206</link>
      <description>&lt;P&gt;Hi Jihoon, &lt;/P&gt;

&lt;P&gt;Please note that SEDCMD is used only to mask or delete raw data and is configured in props.conf. &lt;/P&gt;

&lt;P&gt;For example, if you want to hide the first 5 digits of an account number in the vendor_sales.log source: &lt;/P&gt;

&lt;P&gt;[22/Oct/2014:00:46:27] VendorID=9112 Code=B AcctID=4902636948&lt;BR /&gt;
[22/Oct/2014:00:48:40] VendorID=1004 Code=J AcctID=4236256056&lt;BR /&gt;
[22/Oct/2014:00:50:02] VendorID=5034 Code=H AcctID=8462999288&lt;/P&gt;

&lt;P&gt;You configure the following in props.conf: &lt;BR /&gt;
[source::.../vendor_sales.log]&lt;BR /&gt;
SEDCMD-1acct = s/AcctID=\d{5}(\d{5})/AcctID=xxxxx\1/g&lt;/P&gt;

&lt;P&gt;SEDCMD provides "search and replace" using regular expressions and substitutions and in the example, \1 indicates the captured group. &lt;/P&gt;

&lt;P&gt;Hope this helps. Thanks!&lt;BR /&gt;
Hunter Shen&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2016 02:07:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-sedcmd/m-p/250472#M48206</guid>
      <dc:creator>hunters_splunk</dc:creator>
      <dc:date>2016-10-11T02:07:28Z</dc:date>
    </item>
    <item>
      <title>Re: how to sedcmd??</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-sedcmd/m-p/250473#M48207</link>
      <description>&lt;P&gt;Your regex string doesn't match the data.  Try &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sedcmd=s/SNMPv2-SMI::mib-"2\.2\.1\.2\.\d+"//g
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 11 Oct 2016 02:10:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-sedcmd/m-p/250473#M48207</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-10-11T02:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: how to sedcmd??</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/how-to-sedcmd/m-p/250474#M48208</link>
      <description>&lt;P&gt;The problem is that &lt;CODE&gt;SEDCMD&lt;/CODE&gt; and &lt;CODE&gt;REPORT&lt;/CODE&gt; must be in ALL-CAPS.&lt;BR /&gt;
Another problem is that &lt;CODE&gt;SEDCMD&lt;/CODE&gt; must have a unique (but arbitrary) suffix, like this: &lt;CODE&gt;SEDCMD-arbitraryname =&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 31 Mar 2017 21:49:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/how-to-sedcmd/m-p/250474#M48208</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-03-31T21:49:44Z</dc:date>
    </item>
  </channel>
</rss>

