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
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Observe and Secure All Apps with Splunk

 Join Us for Our Next Tech Talk: Observe and Secure All Apps with SplunkAs organizations continue to innovate ...

What's New in Splunk Observability - August 2025

What's New We are excited to announce the latest enhancements to Splunk Observability Cloud as well as what is ...

Introduction to Splunk AI

How are you using AI in Splunk? Whether you see AI as a threat or opportunity, AI is here to stay. Lucky for ...