Splunk Search

INGEST_EVAL field returning no results

sarit_s
Communicator

Hello

i have this configuration in transforms.conf:
[adjust_flight_fields]
INGEST_EVAL = flight_id=Designator.Flight_no."_".strftime(strptime(Schedule_time_departure, "%Y-%m-%d %H:%M"), "%s"), registration_prefix:=if(isnull(registration_prefix), "", registration_prefix), Tail_no:=registration_prefix.Tail_no

i see the flight_id field under "selected fields" but when im trying to use it in search such as

index=* flight_id=dhdhd

i get no results.

also, if im searching for

flight_id !=fdfd
then im getting results without the id i selected

can someone tell me what is the problem ?

thanks

Tags (2)
0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

INGEST_EVAL creates index-time fields, searching for custom index-time fields is special. Either:

  • define the field as indexed in fields.conf and search using =
  • use tstats with =
  • search using :: instead of =, e.g. flight_id::dhdhd

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

INGEST_EVAL creates index-time fields, searching for custom index-time fields is special. Either:

  • define the field as indexed in fields.conf and search using =
  • use tstats with =
  • search using :: instead of =, e.g. flight_id::dhdhd

sarit_s
Communicator

thanks for your answer
i tried the third option but still no results
any suggestions ?

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Option 1, Option 2?

0 Karma

sarit_s
Communicator

didn't try option 1. the configuration placed in transforms.conf.
is there any difference ?

option 2 : this is the only way its returning any results :

| tstats count where flight_id=BY125_1567729200 index=prod sourcetype=flights

is there a way to return the event list instead of count number ?

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

If tstats works then flight_id::TERM(BY125_1567729200) will work too.

0 Karma

sarit_s
Communicator

well.. this is the query :

index=prod sourcetype=flights flight_id::TERM(BY125_1567729200)

and it's returning no results

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Maybe it was TERM(flight_id::BY125_1567729200)

0 Karma

sarit_s
Communicator

still no results

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Paste the full search you are running.

0 Karma

sarit_s
Communicator

index=prod sourcetype=flights TERM(flight_id::BY125_1567729200)

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Mkay, and without any TERM() around it?

0 Karma

sarit_s
Communicator

awesome ! thanks
please make it as answer so i will approve it

0 Karma

martin_mueller
SplunkTrust
SplunkTrust

Edited the answer.

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...