Refine your search:

2
4

We have Splunk running on a server at each of our locations. The NIC on the server has two IPs, one is a unique IP for communications back to our headquarters, the second IP is the same on all servers and is used to communicate with the cash registers running Snare agents to forward their windows events.

The way that the application that manages the terminal works, every location has a Terminal1, Terminal2, and Terminal3. The hostname and IP addresses are the same at every location. So, when a terminal generates a Windows security log message, we can't tell which location it originated at since the hostname/IP are the same everywhere.

How can I add some metadata to the UDP input so that we can uniquely identify each terminal?

asked 15 Apr '10, 21:31

mctester's gravatar image

mctester
6523324
accept rate: 75%


5 Answers:

If I am understanding correctly, each Splunk instance gets data that looks the same, and when you use distributed search, the results from each place can't be distinguished? If that's so, all you would need to do is display (or search on) the field splunk_server to distinguish the events at each location.

Update:

So in fact the Splunk instances are forwarders, not indexers. Are they light or heavy? This can be done, but how will be different depending. With a light forwarder, you can just add a key to the input stanza and use a transform on the indexer to write the key to a field. With a heavy forwarder, the transform occurs on the forwarder. You will not not be able to use environment variables in the key value field, unfortunately. This ability is targets for version 4.0.11 however.

inputs:

[udp://1030]
location = mylocation
# in some future release, you should be able to specify location = $HOSTNAME

props:

[source::udp:1030]
TRANSFORMS-location = addlocation

transforms:

[addlocation]
SOURCE_KEY = location
REGEX = (.*)
FORMAT = location::$1
WRITE_META = true

Will add an indexed field location to your data.

link

answered 15 Apr '10, 23:49

gkanapathy's gravatar image

gkanapathy ♦
26.2k1622
accept rate: 42%

edited 16 Apr '10, 18:53

On the forwarder, you can specify a new metadata field in inputs.conf using the '_meta' setting. For example -

[WinEventLog:Security]
disabled = 0
_meta = Terminal::1

This will added to all events coming in from this input source, and will appear as an indexed field on your indexing instance

link

answered 15 Apr '10, 21:33

Mick's gravatar image

Mick ♦
4.0k1327
accept rate: 52%

edited 16 Jun '11, 17:41

Genti's gravatar image

Genti ♦
3.5k122

I believe he's not using a forwarder, but sending via Snare UDP syslog

(15 Apr '10, 23:34) gkanapathy ♦

This works like a charm!!!!

(16 Jun '11, 17:53) Genti ♦

The servers in the stores are forwarding to a central splunk server. They listen on UDP 1030 for incoming syslog messages from snare agents running on the POS terminals. The terminals in each store all use the same names (term1, term2, term3).

The forwarders aren't indexing events. They are just forwarding. So, when we look at the splunk_server field, they all appear as the central splunk server.

The documentation says you can't add metadata to UDP ports. Since we need to push this change out to 500+ stores, I'd like to use the deployment server. If we can add metadata to UDP ports, can we use a variable like:

_meta = $HOSTNAME

Thx.

link

answered 16 Apr '10, 00:01

jambajuice's gravatar image

jambajuice
46114
accept rate: 9%

what type of forwarder? light or heavy?

(16 Apr '10, 08:31) gkanapathy ♦

They are heavy forwarders, but we could turn them into light forwarders if this will solve the problem.

We're not using distributed search, just a single central splunk server.

How do I implement this on a light/heavy forwarder?

link

answered 16 Apr '10, 17:57

jambajuice's gravatar image

jambajuice
46114
accept rate: 9%

Is the syntax for the props.conf file correct:

[source::udp:1030]

rather than

[source:udp:1030] or [source::udp::1030]

link

answered 10 May '10, 18:38

jambajuice's gravatar image

jambajuice
46114
accept rate: 9%

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:

×400
×72
×15

Asked: 15 Apr '10, 21:31

Seen: 1,343 times

Last updated: 16 Jun '11, 17:53

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