Refine your search:

What do I need to do to set the correct hostname for an event?

asked 15 Jan '10, 04:37

matt's gravatar image

matt ♦♦
3.1k2427
accept rate: 82%

edited 07 Sep '11, 15:37

jlaw's gravatar image

jlaw ♦
20113


3 Answers:

Hostnames in splunk can be set in many ways.

You can set it explicitly in inputs.conf.

For incoming TCP traffic, the host can be set with the following in your inputs.conf connection_host = ip | dns

The host value can always be overwritten via props/transforms configurations. This is how the host value is set when the event is sourcetyped as syslog. Props/transforms configs will trump what is defined in inputs.conf

More details can be found here

link

answered 15 Jan '10, 04:43

matt's gravatar image

matt ♦♦
3.1k2427
accept rate: 82%

an important thing to note: if you're indexing syslog data, set the sourcetype to "syslog" and your host will be extracted automatically from your events. you can set a default host that will get assigned to any event that doesn't contain a host name or IP address.

link

answered 15 Jan '10, 19:48

emma's gravatar image

emma ♦
7331412
accept rate: 42%

Corrolary to emma: be wary of sourcetyping things as 'syslog' which aren't, as you may get other strings pulled out as a hostname.

link

answered 15 Jan '10, 21:20

jrodman's gravatar image

jrodman ♦
5.8k2515
accept rate: 42%

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:

×185
×163
×98
×30

Asked: 15 Jan '10, 04:37

Seen: 1,463 times

Last updated: 07 Sep '11, 15:37

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