<?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: REGEX filtering http headers to null queue in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/REGEX-filtering-http-headers-to-null-queue/m-p/37087#M6858</link>
    <description>&lt;P&gt;I'm afraid that your regex would never do what you want it to. Sending stuff to the nullQueue works on a per-event basis, not on separate lines in a multiline event.&lt;/P&gt;

&lt;P&gt;You're probably better off looking at the SEDCMD-name in props.conf. In the docs there is an example of masking credit card numbers and other sensitive data, but you could easily filter out the unwanted lines with a sed script.&lt;/P&gt;

&lt;P&gt;EDIT: typo&lt;BR /&gt;
/k &lt;/P&gt;</description>
    <pubDate>Thu, 16 Aug 2012 15:28:28 GMT</pubDate>
    <dc:creator>kristian_kolb</dc:creator>
    <dc:date>2012-08-16T15:28:28Z</dc:date>
    <item>
      <title>REGEX filtering http headers to null queue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REGEX-filtering-http-headers-to-null-queue/m-p/37086#M6857</link>
      <description>&lt;P&gt;Trying to strip the header out of an incoming http post and only index the json for parsing with spath. Having an issue with the regex I believe.&lt;/P&gt;

&lt;P&gt;props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[akamai_post_json]
TRANSFORMS-t1=nullqueue_httpheader
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[nullqueue_httpheader]
REGEX=^(?:POST|User-Agent|Accept|Content-Length|Expect|Content-Type|Content-Disposition)gm
DEST_KEY=queue
FORMAT=nullQueue
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here's a sample event:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;POST / HTTP/1.1
User-Agent: curl/7.26.0
Host: localhost
Accept: */*
Content-Length: 2552
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------0b1c32056fc5
------------------------------0b1c32056fc5
Content-Disposition: form-data; name="fileupload"; filename="default_connector_schema_1.0.json"
Content-Type: application/octet-stream
{
  "apiType" : "String",
  "apiFormat" : "String",
  "apiVersion" : 0,
  "ID" : "String",
  "startTime" : "String",
  "eventType" : "String",
  "cpCode" : 0,
  "message" : {
    "protocol" : "0",
    "protoVersion" : 0,
    "clientIP" : "String",
    "reqPort" : 0,
    "reqHost" : "String",
    "reqMethod" : "String",
    "reqPath" : "String",
    "reqQuery" : "String",
    "reqContType" : "String",
    "reqContLen" : 0,
    "sslProtocol" : "String",
    "sslVersion" : 0,
    "respStatus" : 0,
    "respRedirURL" : "String",
    "respContType" : "String",
    "respContLen" : 0,
    "respBytesServed" : 0,
    "userAgent" : "String",
    "originHostname" : "String"
  },
  "httpHeaders" : {
    "reqHeader" : {
      "accEnc" : "String",
      "accLang" : "String",
      "auth" : "String",
      "cacheCtl" : "String",
      "connection" : "String",
      "contMD5" : "String",
      "cookie" : "String",
      "DNT" : "String",
      "ifMatch" : "String",
      "ifMod" : "String",
      "ifNoMatch" : "String",
      "pragma" : "String",
      "range" : "String",
      "referer" : "String",
      "TE" : "String",
      "upgrade" : "String",
      "via" : "String",
      "xFrwdFor" : "String",
      "xReqWith" : "String"
    },
    "respHeader" : {
      "cacheCtl" : "String",
      "connection" : "String",
      "contEnc" : "String",
      "contLang" : "String",
      "contLen" : "String",
      "contMD5" : "String",
      "contDisp" : "String",
      "contRange" : "String",
      "date" : "String",
      "eTag" : "String",
      "expires" : "String",
      "lastMod" : "String",
      "p3p" : "String",
      "pragma" : "String",
      "server" : "String",
      "setCookie" : "String",
      "trailer" : "String",
      "transEnc" : "String",
      "vary" : "String",
      "warning" : "String",
      "wwwAuth" : "String"
    }
  },
  "performance" : {
    "reqHeadSize" : 0,
    "reqBodySize" : 0,
    "respHeadSize" : 0,
    "respBodySize" : "String",
    "downloadTime" : "String",
    "originName" : "String",
    "originIP" : "String",
    "originInitIP" : "String",
    "originRetry" : 0,
    "lastMileRTT" : 0,
    "lastMileBW" : 0,
    "netOriginRTT" : 0,
    "cacheStatus" : "String",
    "lastByte" : true,
    "cliCountry" : "String",
    "edgeIP" : "String",
    "reqID" : "String"
  }
}
------------------------------0b1c32056fc5--
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Aug 2012 15:09:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REGEX-filtering-http-headers-to-null-queue/m-p/37086#M6857</guid>
      <dc:creator>beaunewcomb</dc:creator>
      <dc:date>2012-08-16T15:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX filtering http headers to null queue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REGEX-filtering-http-headers-to-null-queue/m-p/37087#M6858</link>
      <description>&lt;P&gt;I'm afraid that your regex would never do what you want it to. Sending stuff to the nullQueue works on a per-event basis, not on separate lines in a multiline event.&lt;/P&gt;

&lt;P&gt;You're probably better off looking at the SEDCMD-name in props.conf. In the docs there is an example of masking credit card numbers and other sensitive data, but you could easily filter out the unwanted lines with a sed script.&lt;/P&gt;

&lt;P&gt;EDIT: typo&lt;BR /&gt;
/k &lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2012 15:28:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REGEX-filtering-http-headers-to-null-queue/m-p/37087#M6858</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2012-08-16T15:28:28Z</dc:date>
    </item>
    <item>
      <title>Re: REGEX filtering http headers to null queue</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/REGEX-filtering-http-headers-to-null-queue/m-p/37088#M6859</link>
      <description>&lt;P&gt;So instead of the transform in props.conf, I use SEDCMD, but I'm still not seeing ANY change. Is the below correct for remove the POST line? &lt;/P&gt;

&lt;P&gt;props.conf:&lt;/P&gt;

&lt;P&gt;[akamai_post_json]&lt;BR /&gt;
SEDCMD-httpheader = s/(?mg)^POST.*$\n//g&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 12:16:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/REGEX-filtering-http-headers-to-null-queue/m-p/37088#M6859</guid>
      <dc:creator>beaunewcomb</dc:creator>
      <dc:date>2020-09-28T12:16:52Z</dc:date>
    </item>
  </channel>
</rss>

