Refine your search:

Hi guys,

I've tried several transformations and even field extractor but I can't get Splunk to extract the hostname out of Kiwi's syslog files.

I have created the following transformation: (?i)^[^.]*.w+t(?P<host>[^t]+) using the field extractor but even after nuking the index I can't get it to extract the hostname/IP out of my .txt syslog files, we have 1 for each device rotated once a day.

I even created a new sourcetype with no luck.

Any ideas would be appreciated.

Thank you

asked 04 Jun '12, 14:21

ihoffmann_wth's gravatar image

ihoffmann_wth
211
accept rate: 0%


One Answer:

Being a New Zealander , I feel compelled to answer :)

For the "host" field , you might want to consider performing an index time transform (via entrys in props.conf and transforms.conf)

props.conf

[kiwisourcetype]
TRANSFORMS-host=extract-kiwi-host

transforms.conf

[extract-kiwi-host]
DEST_KEY = MetaData:Host
REGEX = (?i)^[^.]*.w+t([^t]+)
FORMAT = host::$1

Can you also post an example from the syslog file so I can check the accuracy of your regex ?

link

answered 04 Jun '12, 15:08

Damien%20Dallimore's gravatar image

Damien Dalli...
4.7k2314
accept rate: 23%

Post your answer
toggle preview

Follow this question

Log In to enable email subscriptions

RSS:

Answers

Answers + Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×285
×2

Asked: 04 Jun '12, 14:21

Seen: 528 times

Last updated: 04 Jun '12, 15:08

Copyright © 2005-2012 Splunk Inc. All rights reserved.