All Apps and Add-ons

Cannot disable field transformation

Mark_S
New Member

I am using the Splunk for Citrix NetScaler app, with somewhat mixed success. It seems that Citrix has changed some of their message formats over the versions. While I'm monitoring a NetScaler version that the Splunk app nominally supports, it mis-parses some of the messages.

I've tried to disable the transform that is mis-parsing the messages, and replace it with ones that match the messages, but the old one is still being used.

The app comes with a default transform for app firewall log messages. From splunk/etc/apps/SplunkforCitrixNetScaler/default/transforms.conf:

[ns_firewall_extract]
REGEX = APPFW\sAPPFW_(\S+)\s\d+\s+:\s+(\S+)\s(\S+)\s(\S+)\s(\S+)\s(.*)<(.*)\>
FORMAT = violation::$1 src_ip::$2 session_id::$3 profile::$4 url::$5 msg::$6 action::$7

I've written two transforms that match what the NetScaler is actually sending, and disabled the non-functioning one. From splunk/etc/apps/SplunkforCitrixNetScaler/local/transforms.conf:



[ns_firewall_extract]
disabled = 1
FORMAT = violation::$1 src_ip::$2 session_id::$3 profile::$4 url::$5 msg::$6 action::$7
REGEX = APPFW\sAPPFW_(\S+)\s\d+\s+:\s+(\S+)\s(\S+)\s(\S+)\s(\S+)\s(.*)<(.*)\>

[ns_firewall_extract_1]
CLEAN_KEYS = 1
FORMAT = violation::$1 src_ip::$2 profile::$3 msg::$4 url::$5 action::$6
MV_ADD = 0
REGEX = APPFW\sAPPFW_(STARTURL|DENYURL|BUFFEROVERFLOW_URL|BUFFEROVERFLOW_COOKIE|BUFFEROVERFLOW_HDR)\s\d+\s+:\s+(\S+)\s(\S+)\s(\.*):\s(.*)\s<(.*)\>

[ns_firewall_extract_2]
CLEAN_KEYS = 1
FORMAT = violation::$1 src_ip::$2 profile::$3 url::$4 msg::$5 action::$6
MV_ADD = 0
REGEX = APPFW\sAPPFW_(XSS|SQL|COOKIE|FIELDFORMAT|SAFECOMMERCE|SAFEOBJECT)\s\d+\s+\:\s+(S+)\s(S+)\s(\S+)\s(.*)<(.*)\>

And yet the messages are still being parsed into fields using the old definitions, that don't match our NetScaler version.

In case it's relevant, I haven't been editing the .conf files directly, but only through the web GUI.

0 Karma
1 Solution

Takajian
Builder

You are editing the configuration file "transforms.conf". I think you also need to edit the configuration file "props.conf". The stanza [ns_firewall_extract_1] or [ns_firewall_extract_2] are required to combine to the attribute in props.conf.

View solution in original post

0 Karma

Takajian
Builder

You are editing the configuration file "transforms.conf". I think you also need to edit the configuration file "props.conf". The stanza [ns_firewall_extract_1] or [ns_firewall_extract_2] are required to combine to the attribute in props.conf.

0 Karma

Mark_S
New Member

Thank you, that fixed the problem I was having!

It also highlighted that I'm out of practice at regexes - I had to fix about three errors in those two small regexes...

Incidentally, I had to edit the file manually - when I tried to change the entry in props.conf using the GUI (Manager - Fields - Field Extractions) I got an error message every time I tried to save the changes. I got the same error message if I tried to save the existing configuration without changes. I'm not sure what that implies...

0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...