Dashboards & Visualizations

How to create a new variable using Eval and then pass it in Timechart

aditsss
Motivator

Hi Everyone,

I need to create one variable using Eval my variable name is  - JOB_EXEC_TIME how can I create a variable using eval.

And then I need to pass it in below query:

timechart sum(JOB_EXEC_TIME) as TotalExecTime by JOB_NM

Can someone guide me How can I do this in splunk.

Labels (3)
0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust

@aditsss 

 

Can you please share more details where you want to create variable like (from input or search result) and how you want to use in time chart?

0 Karma

aditsss
Motivator

@kamlesh_vaghela 

Currently I am passing JOB_EXEC_TIME is my timechart like below:

 

 timechart sum(JOB_EXEC_TIME) as TotalExecTime by JOB_NM

 

Now I want to pass -JOB_EXEC_TIME(reverse order) in timechart.How can I pass that.

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust
Did you tried?

|timechart sum("JOB_EXEC_TIME(reverse order)") as TotalExecTime by JOB_NM
0 Karma

aditsss
Motivator

@kamlesh_vaghela 

nothing is coming

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust
Is it possible to share sample OP of search before time chart?
0 Karma

aditsss
Motivator

@kamlesh_vaghela 

what is OP?

0 Karma

kamlesh_vaghela
SplunkTrust
SplunkTrust
Output
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...