Getting Data In

How to index HTML files?

sergeyvinnik
Explorer

I have source log files with HTML formatting. After indexing I get 12000 lines in one record.
I need to remove HTML mark-ups to index every particular line in the log file.
Can I do it in Splunk?
What source type should I use?

Tags (3)

LukeMurphey
Champion

There is an app called Website Input that was designed to pull information from websites. That might handle your case if the HTML files are accessible via an HTTP server.

sergeyvinnik
Explorer

Can I use TRANSFORM with following REGEX?

/<[a-zA-Z_/=]*>/ /g

It should replace all tags like .. by spaces

0 Karma

edschembor
Path Finder

Remember tho that this transformation will have to occur everytime you run the query. It would be much more efficient to create script to pre-process and just do it once

0 Karma

chanfoli
Builder

If I understand correctly, you want to strip HTML tags from an input file. I do not believe that any built-in sourcetype or extraction is going to handle this. I would approach this by pre-processing the logs. Many scripting languages have facilities to strip tags out of streams/files. It is probably something you could do with a SEDCMD or regex transform, but that may not be the best way to go.

Regards,
Sean

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...