Deployment Architecture

forwarded data remove timestamp and host

KhalidAlharthi
Explorer

is there a way to remove the header comes with non syslog source types that include hostname and timestamp with priority at the begnning of the event sended

 

i have configuered outputs.conf,props.conf,transforms.conf

 

is there a way to remove the priority and hostname associated with timestamp on the third-party system

 

thanks

Labels (1)
0 Karma

KhalidAlharthi
Explorer

@KendallW Thanks for responding to this matter 

 

could you please give example cuz i don't understand it quite good .

for example this log 

Jul 14 14:15:56 10.128.213.50 Jul 14 14:15:56 my-host-int02 snmpd[7777]: Received SNMP packet(s) from UDP: [10.128.30.20]:54900

 

i want to remove the timestamp and host at the beginning of the event 

 

this happened because the non syslog source type i guess and i want this to be removed

0 Karma

KendallW
Contributor

Hi @KhalidAlharthi try this in props.conf (on indexer or HF)
PREAMBLE_REGEX = \w{3}\s(\d{2}[\s\:]){4}(\d{1,3}\.){3}\d{1,3}\s\w{3}\s(\d{2}[\s\:]){4}[^\s]+\s

0 Karma

KhalidAlharthi
Explorer

Can you see your private messages if you don't mind

0 Karma

KendallW
Contributor

Hi @KhalidAlharthi 

You can do this with PREAMBLE_REGEX in props.conf

PREAMBLE_REGEX = <regex>
* A regular expression that lets Splunk software ignore "preamble lines",
  or lines that occur before lines that represent structured data.
* When set, Splunk software ignores these preamble lines,
  based on the pattern you specify.
* Default: not set
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Unlock What’s Next: The Splunk Cloud Platform at .conf25

In just a few days, Boston will be buzzing as the Splunk team and thousands of community members come together ...