<?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: WinHostMon Props and Transforms to redact field? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-redact-the-description-field-from-the-Service-WinHostMon/m-p/618293#M106699</link>
    <description>&lt;P&gt;SEDCMD will work with the right regex.&amp;nbsp; Linefeeds are removed by the default line breaker so a regex is unlikely to find them.&amp;nbsp; Try this, instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[source::service]
SEDCMD-redact=s/Description=".+"/Description="redacted"/&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 25 Oct 2022 23:47:24 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2022-10-25T23:47:24Z</dc:date>
    <item>
      <title>How to redact the description field from the Service WinHostMon?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-redact-the-description-field-from-the-Service-WinHostMon/m-p/618291#M106698</link>
      <description>&lt;P&gt;I'm trying to redact the description field from the Service WinHostMon to have something like that:&lt;/P&gt;
&lt;P&gt;Before:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Type=Service
Name="LoremIpsum"
DisplayName="Lipsum service"
Description="Bla bla bla bla bla."
Path="C:\path\to\software.exe"
ServiceType="Unknown"
StartMode="Manual"
Started=false
State="Stopped"
Status="OK"
ProcessId=123&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Type=Service
Name="LoremIpsum"
DisplayName="Lipsum service"
Description="redacted"
Path="C:\path\to\software.exe"
ServiceType="Unknown"
StartMode="Manual"
Started=false
State="Stopped"
Status="OK"
ProcessId=123&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a Windows host running Splunk UF, which then sends the data to a Splunk HF, which then sends it to Splunk Cloud. In the Splunk HF I already tried 2 approaches, both failed:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Approach 1:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Splunk HF &amp;gt; system/local/props.conf&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[source::service]
SEDCMD-redact=s/\/Description=.+\n/\/Description="redacted"\n/g&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Approach 2:&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Splunk HF &amp;gt; system/local/props.conf&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[source::service]
TRANSFORMS-my_transf = remove-desc&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Splunk HF &amp;gt; system/local/transforms.conf&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[remove-desc]
REGEX = (?mi)((?:.|\n)+Description=).+(\n(?:.|\n)+)
FORMAT = $1"redacted"$2
DEST_KEY = _raw&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, how can I redact the description field?&lt;/P&gt;</description>
      <pubDate>Wed, 26 Oct 2022 00:06:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-redact-the-description-field-from-the-Service-WinHostMon/m-p/618291#M106698</guid>
      <dc:creator>JChris_</dc:creator>
      <dc:date>2022-10-26T00:06:59Z</dc:date>
    </item>
    <item>
      <title>Re: WinHostMon Props and Transforms to redact field?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-redact-the-description-field-from-the-Service-WinHostMon/m-p/618293#M106699</link>
      <description>&lt;P&gt;SEDCMD will work with the right regex.&amp;nbsp; Linefeeds are removed by the default line breaker so a regex is unlikely to find them.&amp;nbsp; Try this, instead.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[source::service]
SEDCMD-redact=s/Description=".+"/Description="redacted"/&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Oct 2022 23:47:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-redact-the-description-field-from-the-Service-WinHostMon/m-p/618293#M106699</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-10-25T23:47:24Z</dc:date>
    </item>
  </channel>
</rss>

