Getting Data In

Does Splunk allow you to validate structure of a file?

mahbs
Path Finder

Hi,

I need to be able to validate the format of a file. This entails checking if a date column is actually a date column and if the format of the date value is in the correct format.
I'm not concerned with the content of the data, i.e. im not validating the content, rather I'm more focused on the structure of the data.

Does splunk allow this? And if so how would I go about achieving this?

Thanks

0 Karma

afamoyib
Path Finder

No splunk does not do this. However you can write a script outside splunk and use that script to validate the file meets the format you want before moving it to a folder splunk is ingesting. This is the work around i used to get around files with weird or unreadable formats to splunk

0 Karma

mahbs
Path Finder

Could you recommend me the best platform to do this?

0 Karma

lycollicott
Motivator

Splunk recognizes lots of file formats (https://docs.splunk.com/Documentation/Splunk/7.0.0/Data/Listofpretrainedsourcetypes)

If your file is something unique to your business then I suggest that you make sure that whatever process which creates it does so correctly.

0 Karma

mahbs
Path Finder

Hi,

I'm focused mainly on writing queries that basically validates whether a file is in the correct format and then outputting those files that fail validation. I'm not focused on the content, rather the structure - Does Splunk enable this?

0 Karma

lycollicott
Motivator

No, it does not. You would have to do that externally.

0 Karma
Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...