Getting Data In

Manipulate logs in upload

alisaf
New Member

Hi,
I have logs that have in the top some data that doesn't relevant for me and I would like that it won't appear.

This is the data that I would like to remove:

Device version: D02.20.33
MCFG Version: Unknown

UP TIME: 00:05:24.292

emory pool at 0x000000008f000000, size 8 MiB

also, I have some rows in the log that not include a timestamp and I want to add the same timestamp as the one in the next line. for example, this is the logs:
--------- beginning of events
01-15 04:17:19.370 453 453 I auditd : type=2000 audit(0.0:1): initialized

and I would like that it will be:
01-15 04:17:19.370 453 453 --------- beginning of events
01-15 04:17:19.370 453 453 I auditd : type=2000 audit(0.0:1): initialized

can I do that with Splunk when I'm uploading the logs?
Thank you!

0 Karma

richgalloway
SplunkTrust
SplunkTrust

The first part probably can be done using SEDCMD in props.conf if you can come up with a regex that matches the lines to remove.
The second part, however, is not possible in Splunk. You'll need to create a scripted input or use a pre-processor such as Cribl (not sure Cribl can do that, though).

---
If this reply helps you, Karma would be appreciated.
0 Karma

alisaf
New Member

Thank you!
Splunk default associates this line to the previous event, maybe there is some option to associate this line with the next event?

0 Karma

richgalloway
SplunkTrust
SplunkTrust

There is no such option. That's why I said "not possible".

---
If this reply helps you, Karma would be appreciated.
0 Karma

alisaf
New Member

thanks 🙂

0 Karma
Get Updates on the Splunk Community!

New in Observability - Improvements to Custom Metrics SLOs, Log Observer Connect & ...

The latest enhancements to the Splunk observability portfolio deliver improved SLO management accuracy, better ...

Improve Data Pipelines Using Splunk Data Management

  Register Now   This Tech Talk will explore the pipeline management offerings Edge Processor and Ingest ...

3-2-1 Go! How Fast Can You Debug Microservices with Observability Cloud?

Register Join this Tech Talk to learn how unique features like Service Centric Views, Tag Spotlight, and ...