Splunk Search

problem using lookup output field

changux
Builder

Hi all.
I have an automatic file lookup configured to output some fields and works very well (using the sourcetype):

sourcetype=datavalue *

The field from the automatic lookup is GOAL1. This field only has a integer numeric value.

Next, i tried to run:

sourcetype=datavalue ORDER=pending | stats count AS s | eval FINAL = (s * 100)/GOAL1

But the result of FINAL is not shown. If i remove the division per GOAL1, is fine (s * 100). First, i reckoned that maybe GOAL1 has some problem, but with

sourcetype=datavalue | table GOAL1

i can see the integer as unique value.

Any idea?

0 Karma

mhpark
Path Finder

you would like to check if your GOAL1 is really an numeric, not a string.
try

| eval GOAL1 = tonumber(GOAL1)

or something and do the math again

gcusello
SplunkTrust
SplunkTrust

how is your lookup done?
I tried with a lookup not automatic, but called in the search, and it's ok!
Bye?
Giuseppe

0 Karma
Get Updates on the Splunk Community!

Leveraging Detections from the Splunk Threat Research Team & Cisco Talos

  Now On Demand  Stay ahead of today’s evolving threats with the combined power of the Splunk Threat Research ...

New in Splunk Observability Cloud: Automated Archiving for Unused Metrics

Automated Archival is a new capability within Metrics Management; which is a robust usage & cost optimization ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...