<?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 Can I test SECCMD from command line using oneshot? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-test-SECCMD-from-command-line-using-oneshot/m-p/348830#M64065</link>
    <description>&lt;P&gt;I am attempting to test a SEDCMD for event manipulation and it does not appear this is possible via oneshot?&lt;BR /&gt;
When I try to test SEDCMD in my props.conf it never appears to work.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[testst]
SEDCMD-xml = s/"xml":/"chicken":/
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;my command line attempt to test it&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$./splunk add oneshot test.json -sourcetype testst -index mytest
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;my test event&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{ "xml":"&amp;lt;Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:awsse=\"http://xml.chicken.com/2010/06/Session_v3\" xmlns:wsa=\"http://www.w3.org/2005/08/addressing\"&amp;gt;&amp;lt;Header&amp;gt;&amp;lt;To&amp;gt;http://www.w3.org/2005/08/addressing/anonymous&amp;lt;/To&amp;gt;&amp;lt;From&amp;gt;&amp;lt;Address&amp;gt;..... AND SO ON BIG GIANT NASTEY XML",
  "other3":"even more stuff"}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;proof this sed works on the command line&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$ cat fakeevent.json | sed -e 's/"xml":/"chicken":/'
    { "chicken":"&amp;lt;Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:awsse=\"http://xml.chicken.com/2010/06/Session_v3\" xmlns:wsa=\"http://www.w3.org/2005/08/addressing\"&amp;gt;&amp;lt;Header&amp;gt;&amp;lt;To&amp;gt;http://www.w3.org/2005/08/addressing/anonymous&amp;lt;/To&amp;gt;&amp;lt;From&amp;gt;&amp;lt;Address&amp;gt;..... AND SO ON BIG GIANT NASTEY XML", "other3":"even more stuff"}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Fri, 04 Aug 2017 21:23:59 GMT</pubDate>
    <dc:creator>markconlin</dc:creator>
    <dc:date>2017-08-04T21:23:59Z</dc:date>
    <item>
      <title>Can I test SECCMD from command line using oneshot?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-test-SECCMD-from-command-line-using-oneshot/m-p/348830#M64065</link>
      <description>&lt;P&gt;I am attempting to test a SEDCMD for event manipulation and it does not appear this is possible via oneshot?&lt;BR /&gt;
When I try to test SEDCMD in my props.conf it never appears to work.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[testst]
SEDCMD-xml = s/"xml":/"chicken":/
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;my command line attempt to test it&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$./splunk add oneshot test.json -sourcetype testst -index mytest
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;my test event&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;{ "xml":"&amp;lt;Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:awsse=\"http://xml.chicken.com/2010/06/Session_v3\" xmlns:wsa=\"http://www.w3.org/2005/08/addressing\"&amp;gt;&amp;lt;Header&amp;gt;&amp;lt;To&amp;gt;http://www.w3.org/2005/08/addressing/anonymous&amp;lt;/To&amp;gt;&amp;lt;From&amp;gt;&amp;lt;Address&amp;gt;..... AND SO ON BIG GIANT NASTEY XML",
  "other3":"even more stuff"}
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;proof this sed works on the command line&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;$ cat fakeevent.json | sed -e 's/"xml":/"chicken":/'
    { "chicken":"&amp;lt;Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:awsse=\"http://xml.chicken.com/2010/06/Session_v3\" xmlns:wsa=\"http://www.w3.org/2005/08/addressing\"&amp;gt;&amp;lt;Header&amp;gt;&amp;lt;To&amp;gt;http://www.w3.org/2005/08/addressing/anonymous&amp;lt;/To&amp;gt;&amp;lt;From&amp;gt;&amp;lt;Address&amp;gt;..... AND SO ON BIG GIANT NASTEY XML", "other3":"even more stuff"}
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 04 Aug 2017 21:23:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-test-SECCMD-from-command-line-using-oneshot/m-p/348830#M64065</guid>
      <dc:creator>markconlin</dc:creator>
      <dc:date>2017-08-04T21:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Can I test SECCMD from command line using oneshot?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-test-SECCMD-from-command-line-using-oneshot/m-p/348831#M64066</link>
      <description>&lt;P&gt;Ah - I forgot to restart. All is well. oneshot will test sourcetype SEDCMD lines in props.conf IF you remember to restart. &lt;/P&gt;</description>
      <pubDate>Fri, 04 Aug 2017 21:58:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-test-SECCMD-from-command-line-using-oneshot/m-p/348831#M64066</guid>
      <dc:creator>markconlin</dc:creator>
      <dc:date>2017-08-04T21:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: Can I test SECCMD from command line using oneshot?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Can-I-test-SECCMD-from-command-line-using-oneshot/m-p/698452#M115793</link>
      <description>&lt;P&gt;Correct.&amp;nbsp; We have to make sure that changing the configs via cli editor we need to restart the splunkd service for the configs to take effect.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Sep 2024 16:30:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Can-I-test-SECCMD-from-command-line-using-oneshot/m-p/698452#M115793</guid>
      <dc:creator>anwarmian</dc:creator>
      <dc:date>2024-09-07T16:30:22Z</dc:date>
    </item>
  </channel>
</rss>

