Getting Data In

strip fqdn from hostname field

hanijamal
New Member

hey guys, i am pretty sure we have something in place which is stripping the hostname from the fqdn. just cannot figure it out.

for example host=ab12345.domain.com gets stripped and when searched only shows host=ab12345

we have a few thousand hosts that are coming in fine, however a handful show up WITH fqdn when i make a search.

why would only a few hosts be showing with fqdn when 99% are showing in search fine.

background: we have a host data coming in from ucmd via lookup

thanks

Tags (1)
0 Karma
1 Solution

gcusello
SplunkTrust
SplunkTrust

Hi hanijamal,
I don't know if you can intervene on your forwarders, but the hostname is setted in two conf files sited in $SPLUNK_HOME/etc/system/local:

  • output.conf
  • inputs.conf Your should verify what is the hostname you receive.

If you cannot modify hostname in your forwarders, the only way is to override hosts using props.conf and transforms.conf (see https://docs.splunk.com/Documentation/Splunk/6.5.1/Data/Overridedefaulthostassignments#Configuration...

Bye.
Giuseppe

View solution in original post

0 Karma

inventsekar
SplunkTrust
SplunkTrust

for logs which are not yet indexed, you can use props and transform, as mentioned above.

for the data which is already indexed, you can use regular expressions to pick only the hostnames

your search | rex field=_raw "host=(?<hostname>\w+)\." | table _raw hostname
thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !
0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi hanijamal,
I don't know if you can intervene on your forwarders, but the hostname is setted in two conf files sited in $SPLUNK_HOME/etc/system/local:

  • output.conf
  • inputs.conf Your should verify what is the hostname you receive.

If you cannot modify hostname in your forwarders, the only way is to override hosts using props.conf and transforms.conf (see https://docs.splunk.com/Documentation/Splunk/6.5.1/Data/Overridedefaulthostassignments#Configuration...

Bye.
Giuseppe

0 Karma

gokadroid
Motivator

transforms.conf and props.conf might be the right place to start with and from. Please have a look here:
https://docs.splunk.com/Documentation/Splunk/6.5.1/Data/Overridedefaulthostassignments#Configuration

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!

Community Content Calendar, September edition

Welcome to another insightful post from our Community Content Calendar! We're thrilled to continue bringing ...

Splunkbase Unveils New App Listing Management Public Preview

Splunkbase Unveils New App Listing Management Public PreviewWe're thrilled to announce the public preview of ...

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...