Getting Data In

Noob question regarding sourcetypes

mattelliott
Engager

I have splunk running with the Cisco Firewall app installed. I'm still learning my way around but I'm slowly getting the hang of it. Along with getting data from multiple firewalls (all working as expected), I'm also collecting syslog data from about 300 routers and switches. Some of the entries show up as sourcetype "cisco", and some just show up as "syslog". Unless I'm mistaken, it's because this bit of config in the Splunk_CiscoFirewalls/default/transforms.conf:

[force_sourcetype_for_cisco_catchall]
DEST_KEY = MetaData:Sourcetype   
REGEX = :\s\%((SNMP|CDP|FAN|LINE|LINEPROTO|RTD|SYS|C\d+_[^-]+)-\d+-\S+)      
FORMAT = sourcetype::cisco

So anything with SNMP,CDP,FAN,etc. gets the sourcetype cisco, the rest just goes to syslog. I would like some guidance about either getting all non-ASA entries categorized as cisco. If that's not feasible, I don't mind categorizing them all as syslog, but I'd like to make sure I'm not going to break the firewall app if I comment out that section.

Also, in the process of trying to do this on my own, I accidentally created a bunch of bunk sourcetypes that I don't want to keep. They're along the lines of

"Sourcetype::cisco Severity::Jan Message_Type::%ASA-2-106006"    
"Sourcetype::cisco Severity::Jan Message_Type::%ASA-2-106001"

There are about 20 of them that got created when I screwed up the transforms.conf file. When I try to search on those events to delete them, I always get zero results. Did I screw myself over or is there way to clean those up?

Thanks,
Matt

Tags (3)
0 Karma
1 Solution

MarioM
Motivator

regarding getting all non-ASA entries categorized as cisco if all your syslog is only cisco you could change the regex to match everything which is not ASA:

[force_sourcetype_for_cisco_catchall]
DEST_KEY = MetaData:Sourcetype   
REGEX = :\s\%(([^ASA]\d+_[^-]+)-\d+-\S+)      
FORMAT = sourcetype::cisco

Regarding the wrong sourcetype i am afraid you might have to do a ./splunk clean eventdata -index <index_name> in CLI

View solution in original post

MarioM
Motivator

regarding getting all non-ASA entries categorized as cisco if all your syslog is only cisco you could change the regex to match everything which is not ASA:

[force_sourcetype_for_cisco_catchall]
DEST_KEY = MetaData:Sourcetype   
REGEX = :\s\%(([^ASA]\d+_[^-]+)-\d+-\S+)      
FORMAT = sourcetype::cisco

Regarding the wrong sourcetype i am afraid you might have to do a ./splunk clean eventdata -index <index_name> in CLI

mattelliott
Engager

That almost did it. Thanks for your help. I ended up with

REGEX = :\s\%((?!ASA)\w+)-(\d)-\S+

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 ...