<?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: transform for Cisco ironport Web Security Appliance log in squid detail format in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/transform-for-Cisco-ironport-Web-Security-Appliance-log-in-squid/m-p/113342#M71600</link>
    <description>&lt;P&gt;Thank you alacercogitatus for taking time to respond to my post.&lt;/P&gt;

&lt;P&gt;Field extractions using squid sourcetype is fine for squid log type only and not squid_detail logs.  I have tried to import a squid_detail log using squid sourcetype and field extractions does not work. &lt;/P&gt;

&lt;P&gt;I even don't mind discarding any additional information in squid_detail log during extraction process as long as I can get all the fields those are specified in squid sourcetype.&lt;/P&gt;

&lt;P&gt;By the way, if you are playing with sample data, I had to modify the content http with hxxp as splunk web site won't allow me to post otherwise.&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 15:04:25 GMT</pubDate>
    <dc:creator>ashabc</dc:creator>
    <dc:date>2020-09-28T15:04:25Z</dc:date>
    <item>
      <title>transform for Cisco ironport Web Security Appliance log in squid detail format</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/transform-for-Cisco-ironport-Web-Security-Appliance-log-in-squid/m-p/113338#M71596</link>
      <description>&lt;P&gt;I have installed splunk Cisco Ironport web security appliance (WSA) apps. All seems to be working OK. It uses sourcetype &lt;CODE&gt;cisco_wsa_squid&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;However, I have a problem. The splunk apps for wsa supports only squid format log. However, I have a huge number of historical logs those were collected in &lt;CODE&gt;squid_detail&lt;/CODE&gt; format instead of squid format. If I try to import squid_detail log into the apps, it does not extract the fields correctly, making the data useless.&lt;/P&gt;

&lt;P&gt;I hope someone can help me with tweaking the transform file so that I can import historical (squid_detail format log file) into Cisco Ironport web security appliance (WSA) apps. Below, I have included the header for &lt;CODE&gt;squid&lt;/CODE&gt; and &lt;CODE&gt;squid_detail&lt;/CODE&gt; logs along with a sample line of data and the relevant contents of &lt;CODE&gt;props.conf&lt;/CODE&gt; and &lt;CODE&gt;transforms.conf&lt;/CODE&gt; file. My objective is to create a sourcetype called &lt;CODE&gt;cisco_wsa_squid_detail&lt;/CODE&gt; and use it for historical logs within the apps. Need your help to create the correct transform.&lt;/P&gt;

&lt;HR /&gt;

&lt;P&gt;log format &lt;CODE&gt;squid&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;header
#Fields: %t %e %a %w/%h %s %2r %A %H/%d %c %D %Xr %?BLOCK_SUSPECT_USER_AGENT,MONITOR_SUSPECT_USER_AGENT?%&amp;lt;User-Agent:%!%-%.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;sample data&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;1381962068.488 538 10.71.66.56 TCP_CLIENT_REFRESH_MISS/200 287 POST hxxp://202.7.177.46/idle/K2emdz02xSLyCk3Z/81 "WILDFIRE\davidm2@RFS_NTLM" DIRECT/202.7.177.46 text/plain DEFAULT_CASE_11-Internet_Access-RFS_AD-NONE-NONE-NONE-DefaultGroup &amp;lt;IW_srch,-5.9,0,"-",0,0,0,1,"-",-,-,-,"-",1,-,"-","-",-,-,IW_srch,-,"-","trojan","Flash Video","Media","-","-",4.27,0,-,"-","-"&amp;gt; -
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;log format &lt;CODE&gt;squid_detail&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;header
#Fields: %t %e %a %w/%h %s %2r %A %H/%d %c CMF:%M DCF:%j ERR:%E %D %Xr %?BLOCK_SUSPECT_USER_AGENT,MONITOR_SUSPECT_USER_AGENT?%&amp;lt;User-Agent:%!%-%. %u,%N
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;sample data&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;1381840464.285 363273 10.72.4.25 TCP_MISS/200 41070 CONNECT tunnel://216.115.208.230:443/ "WILDFIRE\warwickh@RFS_NTLM" DIRECT/216.115.208.230 application/octet-stream CMF:40 DCF:20 ERR:0 DEFAULT_CASE_11-Internet_Access-RFS_AD-NONE-NONE-NONE-DefaultGroup &amp;lt;nc,-3.5,1,"-",-,-,-,1,"-",-,-,-,"-",1,-,"-","-",-,-,nc,-,"-","-","Unknown","Unknown","-","-",0.90,0,-,"-","-"&amp;gt; - "Mozilla/4.0 (compatible)",216.115.208.230
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;relevant contents of props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;################
# Squid Format #
################

[cisco_wsa_squid]
KV_MODE = none
SHOULD_LINEMERGE = True
MAX_TIMESTAMP_LOOKAHEAD=19
REPORT-extract = kv_for_cisco_wsa_squid
REPORT-x_webroot_threat_name_as_signature = x_webroot_threat_name_as_signature
REPORT-x_mcafee_virus_name_as_signature = x_mcafee_virus_name_as_signature
lookup_table = cat_lookup x_webcat_code_abbr
EXTRACT-cs_username = "(?P&amp;lt;cs_username&amp;gt;[^-@]*)@
FIELDALIAS-srcip = c_ip AS src_ip
LOOKUP-vendor_info_for_cisco_wsa = cisco_wsa_vendor_info_lookup sourcetype OUTPUT vendor,product,ids_type
FIELDALIAS-url = cs_url AS url
FIELDALIAS-http_method = cs_method AS http_method 
FIELDALIAS-user = cs_username AS user
FIELDALIAS-http_content_type  = cs_mime_type AS http_content_type
FIELDALIAS-dest = s_hostname AS dest
FIELDALIAS-src = c_ip AS src
FIELDALIAS-status = sc_http_status AS status
FIELDALIAS-action = sc_result_code AS action
FIELDALIAS-bytes_in = sc_bytes AS bytes_in
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;relevant conents of transform.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;##################################
# Regex to read WSA squid format #
##################################

[kv_for_cisco_wsa_squid]
REGEX = ^([0-9.]*) *[0-9]* ([0-9.]*) ([A-Z_]*)/([0-9]*) ([0-9]*) ([A-Z]*) ([^ ]*) ([^ ]*) ([^/]*)/([^ ]*) ([^ ]*) ([^ ]+) &amp;lt;([^,]+),([^,]+),[^,]+,([^,]+),[^,]+,[^,]+,[^,]+,[^,]+,[^,]+,[^,]+,[^,]+,[^,]+,([^,&amp;gt;]+)
FORMAT = end_time::$1 c_ip::$2 sc_result_code::$3 sc_http_status::$4 sc_bytes::$5 cs_method::$6 cs_url::$7 cs_username::$8 s_hierarchy::$9 s_hostname::$10 cs_mime_type::$11 x_acltag::$12 x_webcat_code_abbr::$13 x_wbrs_score::$14 x_webroot_threat_name::$15 x_mcafee_virus_name::$16
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:03:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/transform-for-Cisco-ironport-Web-Security-Appliance-log-in-squid/m-p/113338#M71596</guid>
      <dc:creator>ashabc</dc:creator>
      <dc:date>2020-09-28T15:03:34Z</dc:date>
    </item>
    <item>
      <title>Re: transform for Cisco ironport Web Security Appliance log in squid detail format</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/transform-for-Cisco-ironport-Web-Security-Appliance-log-in-squid/m-p/113339#M71597</link>
      <description>&lt;P&gt;props.conf&lt;/P&gt;

&lt;P&gt;cisco_wsa_squid]&lt;BR /&gt;
KV_MODE = none&lt;BR /&gt;
SHOULD_LINEMERGE = True&lt;BR /&gt;
MAX_TIMESTAMP_LOOKAHEAD=19&lt;BR /&gt;
REPORT-extract = kv_for_cisco_wsa_squid&lt;BR /&gt;
REPORT-x_webroot_threat_name_as_signature = x_webroot_threat_name_as_signature&lt;BR /&gt;
REPORT-x_mcafee_virus_name_as_signature = x_mcafee_virus_name_as_signature&lt;BR /&gt;
lookup_table = cat_lookup x_webcat_code_abbr&lt;BR /&gt;
EXTRACT-cs_username = "(?P&lt;CS_USERNAME&gt;[^-@]*)@&lt;BR /&gt;
FIELDALIAS-srcip = c_ip AS src_ip&lt;BR /&gt;
LOOKUP-vendor_info_for_cisco_wsa = cisco_wsa_vendor_info_lookup sourcetype OUTPUT vendor,product,ids_type&lt;BR /&gt;
FIELDALIAS-url = cs_url AS url&lt;BR /&gt;
FIELDALIAS-user = cs_username AS user&lt;/CS_USERNAME&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:03:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/transform-for-Cisco-ironport-Web-Security-Appliance-log-in-squid/m-p/113339#M71597</guid>
      <dc:creator>ashabc</dc:creator>
      <dc:date>2020-09-28T15:03:36Z</dc:date>
    </item>
    <item>
      <title>Re: transform for Cisco ironport Web Security Appliance log in squid detail format</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/transform-for-Cisco-ironport-Web-Security-Appliance-log-in-squid/m-p/113340#M71598</link>
      <description>&lt;P&gt;transform.conf&lt;/P&gt;

&lt;P&gt;[kv_for_cisco_wsa_squid]&lt;BR /&gt;
REGEX = ^([0-9.]&lt;EM&gt;) *[0-9]&lt;/EM&gt; ([0-9.]&lt;EM&gt;) ([A-Z_]&lt;/EM&gt;)/([0-9]&lt;EM&gt;) ([0-9]&lt;/EM&gt;) ([A-Z]&lt;EM&gt;) ([^ ]&lt;/EM&gt;) ([^ ]&lt;EM&gt;) ([^/]&lt;/EM&gt;)/([^ ]&lt;EM&gt;) ([^ ]&lt;/EM&gt;) ([^ ]+) &amp;lt;([^,]+),([^,]+),[^,]+,([^,]+),[^,]+,[^,]+,[^,]+,[^,]+,[^,]+,[^,]+,[^,]+,[^,]+,([^,&amp;gt;]+)&lt;BR /&gt;
FORMAT = end_time::$1 c_ip::$2 sc_result_code::$3 sc_http_status::$4 sc_bytes::$5 cs_method::$6 cs_url::$7 cs_username::$8 s_hierarchy::$9 s_hostname::$10 cs_mime_type::$11 x_acltag::$12 x_webcat_code_abbr::$13 x_wbrs_score::$14 x_webroot_threat_name::$15 x_mcafee_virus_name::$16&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:03:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/transform-for-Cisco-ironport-Web-Security-Appliance-log-in-squid/m-p/113340#M71598</guid>
      <dc:creator>ashabc</dc:creator>
      <dc:date>2020-09-28T15:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: transform for Cisco ironport Web Security Appliance log in squid detail format</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/transform-for-Cisco-ironport-Web-Security-Appliance-log-in-squid/m-p/113341#M71599</link>
      <description>&lt;P&gt;Before I run down all of the extractions and stuff you posted, I'll say this. If your &lt;CODE&gt;squid_detail&lt;/CODE&gt; sourcetype is extracting fields correctly [ meaning if you search for &lt;CODE&gt;sourcetype=squid_detail&lt;/CODE&gt; and you get fields that match those of the &lt;CODE&gt;cisco_wsa_squid&lt;/CODE&gt; sourcetypes], then you can go into the application folder and add this to &lt;CODE&gt;Splunk_CiscoIronportWebSecurity/local/eventtypes.conf&lt;/CODE&gt;:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;[ironport_proxy]&lt;BR /&gt;
search = sourcetype="cisco_wsa_*" OR sourcetype=squid_detail&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;This will override the app defaults and allow your second source to be used with minimal work.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Oct 2013 11:47:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/transform-for-Cisco-ironport-Web-Security-Appliance-log-in-squid/m-p/113341#M71599</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2013-10-24T11:47:14Z</dc:date>
    </item>
    <item>
      <title>Re: transform for Cisco ironport Web Security Appliance log in squid detail format</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/transform-for-Cisco-ironport-Web-Security-Appliance-log-in-squid/m-p/113342#M71600</link>
      <description>&lt;P&gt;Thank you alacercogitatus for taking time to respond to my post.&lt;/P&gt;

&lt;P&gt;Field extractions using squid sourcetype is fine for squid log type only and not squid_detail logs.  I have tried to import a squid_detail log using squid sourcetype and field extractions does not work. &lt;/P&gt;

&lt;P&gt;I even don't mind discarding any additional information in squid_detail log during extraction process as long as I can get all the fields those are specified in squid sourcetype.&lt;/P&gt;

&lt;P&gt;By the way, if you are playing with sample data, I had to modify the content http with hxxp as splunk web site won't allow me to post otherwise.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:04:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/transform-for-Cisco-ironport-Web-Security-Appliance-log-in-squid/m-p/113342#M71600</guid>
      <dc:creator>ashabc</dc:creator>
      <dc:date>2020-09-28T15:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: transform for Cisco ironport Web Security Appliance log in squid detail format</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/transform-for-Cisco-ironport-Web-Security-Appliance-log-in-squid/m-p/113343#M71601</link>
      <description>&lt;P&gt;Why not just import the squid_detail log as sourcetype=squid_detail? Then make the edit I listed for eventtypes.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 15:04:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/transform-for-Cisco-ironport-Web-Security-Appliance-log-in-squid/m-p/113343#M71601</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2020-09-28T15:04:56Z</dc:date>
    </item>
    <item>
      <title>Re: transform for Cisco ironport Web Security Appliance log in squid detail format</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/transform-for-Cisco-ironport-Web-Security-Appliance-log-in-squid/m-p/113344#M71602</link>
      <description>&lt;P&gt;I ended up writing a vb script that converts squid_detail log to squid format. I am posting it here. Hope it helps someone in future.&lt;/P&gt;

&lt;HR /&gt;

&lt;PRE&gt;&lt;CODE&gt;function ereg_replace(strOriginalString, strPattern, strReplacement, varIgnoreCase) 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;' Function replaces pattern with replacement &lt;BR /&gt;
' varIgnoreCase must be TRUE (match is case insensitive) or FALSE (match is case sensitive) &lt;BR /&gt;
dim objRegExp : set objRegExp = new RegExp &lt;BR /&gt;
with objRegExp &lt;BR /&gt;
    .Pattern = strPattern &lt;BR /&gt;
    .IgnoreCase = varIgnoreCase &lt;BR /&gt;
    .Global = True &lt;BR /&gt;
end with &lt;BR /&gt;
ereg_replace = objRegExp.replace(strOriginalString, strReplacement) &lt;BR /&gt;
set objRegExp = nothing &lt;BR /&gt;
end function&lt;/P&gt;

&lt;P&gt;Const ForReading = 1&lt;BR /&gt;
Const ForWriting = 2&lt;BR /&gt;
Const ForAppending = 8&lt;BR /&gt;
const TriStateTrue = -1&lt;/P&gt;

&lt;P&gt;Set objFSO = CreateObject("Scripting.FileSystemObject")&lt;BR /&gt;
Set folder = objFSO.GetFolder("D:\Ash\Download\splunk\data\squiddetail\")&lt;/P&gt;

&lt;P&gt;for each file in folder.Files&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Set testfile = objFSO.OpenTextFile(file.path, ForReading)
Set outfile = objFSO.CreateTextFile("D:\Ash\Download\splunk\data\modified\" &amp;amp; file.name)

Do While Not testfile.AtEndOfStream
    line = testfile.readline
    line1 = ereg_replace(line, "CMF:[^ ]* [^ ]* [^ ]* ", "", varIgnoreCase)
    line2 =  ereg_replace(line1, "&amp;gt; -.*", "&amp;gt; -", varIgnoreCase)
    outfile.writeline(line2)
Loop

testfile.close
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;next&lt;/P&gt;

&lt;P&gt;outfile.close&lt;/P&gt;

&lt;HR /&gt;</description>
      <pubDate>Sat, 26 Oct 2013 10:47:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/transform-for-Cisco-ironport-Web-Security-Appliance-log-in-squid/m-p/113344#M71602</guid>
      <dc:creator>ashabc</dc:creator>
      <dc:date>2013-10-26T10:47:48Z</dc:date>
    </item>
  </channel>
</rss>

