Splunk Search

about Extract the field

xsstest
Communicator

This is a problem that occurs on the cluster

I have a index is "apache_access",It mainly collects apache access information.

Its events come from multiple hosts of the apache log.

so their sourcetype is not the same, now ,There are now 5 sourcetype

Now 。I'm going to extract the fields of the apache access log, which requires me to choose a source type. But there is only one source type, and other source types are not shown。

If i chose this sourcetype, then I extracted the field can only be applied to this sourcetype

question:

How can I extract a field that can be applied to all sourcetype on the apache_access index

alt text

alt text

Tags (1)
0 Karma
1 Solution

dineshraj9
Builder

If you have a pattern matching all the five sources, then set the EXTRACT at source level in props.conf.

[source::...*apache_access*]
EXTRACT-field = ....

View solution in original post

0 Karma

aakwah
Builder

Hello,

From my point of view, as long as all the logs from different hosts have he same format, so you can assign the same sourcetype for all hosts.

To have sourcetype selected in field extraction page, try to launch the filed extraction ( at the bottom of the side bar) after you have run this search for example:

index=apache_access sourcetype=web2_apache_access

Regards

0 Karma

dineshraj9
Builder

If you have a pattern matching all the five sources, then set the EXTRACT at source level in props.conf.

[source::...*apache_access*]
EXTRACT-field = ....
0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...