Splunk Search

How do I get the Hosts list in Search to not show syslog words as hosts?

mikeely
Path Finder

I've set up two linux machines as forwarders, and suddenly I have a very large number of entries in the hosts field which appear to simply be distinct words in the various syslog files. The host adding the vast majority of the fake hosts is running OpenSuSE 11.4, but a RHEL box also created two host entries (one upper case and one lower case). The inputs.conf for both hosts couldn't be any simpler:

[monitor:///var/log]

disabled=false

followTail=1

sourcetype=syslog

Here's a screenshot of the problem so you can see what I mean. The blurred names are actual hosts: Too many hosts

1 Solution

mikelanghorst
Motivator

I would recommend removing the "sourcetype=syslog" from your monitor stanza. Many logs under that path may not be syslog format. Telling it to treat all of these logs as a syslog file, which will extract the 4th field of the line to be the hostname.

Then if you have specific file sources, add them to props.conf entries and assign them to sourcetype=syslog.

View solution in original post

mikelanghorst
Motivator

I would recommend removing the "sourcetype=syslog" from your monitor stanza. Many logs under that path may not be syslog format. Telling it to treat all of these logs as a syslog file, which will extract the 4th field of the line to be the hostname.

Then if you have specific file sources, add them to props.conf entries and assign them to sourcetype=syslog.

Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...