Splunk Search

Combinig two graphs into one

matansocher
Contributor

I have two graphs (I put example and their search code) and I want to display them on a single graph.
Is there a way to create that kind of graph?

1

| inputcsv MPSMilstonesCSV 
| dedup Report_Milestone 
| eval Report_Milestone1 = if((substr(Report_Milestone, 1, 1)  == "S"), substr(Report_Milestone, (len(Report_Milestone)-6), len(Report_Milestone)), Report_Milestone) 
| fieldformat TaskDeadline = strftime(TaskDeadline, "%d/%m/%Y") 
| streamstats count as milestoneNumber
| eval legend = milestoneNumber+" = "+Report_Milestone1
| table TaskDeadline Report_Milestone1 milestoneNumber legend
| chart sum(milestoneNumber) over TaskDeadline by legend

alt text

2

index=clearquest ("Project Name"=ipa_4*) 
    ("Task Type"="Enhancement A*" OR "Task Type"=Defe* OR "Task Type"=Doc*) 
    "Resolution"=* ("Severity"=*) "Task ID"=* 
| dedup "Task ID" 
| reverse 
| timechart span=1w dc("Task ID") AS sum_of_tasks_per_week by Severity 
| accum "S0-Critical" 
| accum "S1-High Impact" 
| accum "S2-Medium Impact" 
| accum "S3-Low Impact" 
| accum "S4-Unknown" 
| accum "No Value"

alt text

Thank you

0 Karma
1 Solution

somesoni2
SplunkTrust
SplunkTrust

Give this a try. In dashboard panel visualization edit, add the fields from lookup (or from index) as overlay fields.

index=clearquest ("Project Name"=ipa_4*) 
     ("Task Type"="Enhancement A*" OR "Task Type"=Defe* OR "Task Type"=Doc*) 
     "Resolution"=* ("Severity"=*) "Task ID"=* 
 | dedup "Task ID" 
 | reverse 
 | timechart span=1w dc("Task ID") AS sum_of_tasks_per_week by Severity 
 | accum "S0-Critical" 
 | accum "S1-High Impact" 
 | accum "S2-Medium Impact" 
 | accum "S3-Low Impact" 
 | accum "S4-Unknown" 
 | accum "No Value"
| append [| inputcsv MPSMilstonesCSV 
 | dedup Report_Milestone 
 | eval Report_Milestone1 = if((substr(Report_Milestone, 1, 1)  == "S"), substr(Report_Milestone, (len(Report_Milestone)-6), len(Report_Milestone)), Report_Milestone) 
 | eval _time= TaskDeadline
 | streamstats count as milestoneNumber
 | eval legend = milestoneNumber+" = "+Report_Milestone1
 | chart sum(milestoneNumber) over _timeby legend]
| timechart values(*) as *

View solution in original post

somesoni2
SplunkTrust
SplunkTrust

Give this a try. In dashboard panel visualization edit, add the fields from lookup (or from index) as overlay fields.

index=clearquest ("Project Name"=ipa_4*) 
     ("Task Type"="Enhancement A*" OR "Task Type"=Defe* OR "Task Type"=Doc*) 
     "Resolution"=* ("Severity"=*) "Task ID"=* 
 | dedup "Task ID" 
 | reverse 
 | timechart span=1w dc("Task ID") AS sum_of_tasks_per_week by Severity 
 | accum "S0-Critical" 
 | accum "S1-High Impact" 
 | accum "S2-Medium Impact" 
 | accum "S3-Low Impact" 
 | accum "S4-Unknown" 
 | accum "No Value"
| append [| inputcsv MPSMilstonesCSV 
 | dedup Report_Milestone 
 | eval Report_Milestone1 = if((substr(Report_Milestone, 1, 1)  == "S"), substr(Report_Milestone, (len(Report_Milestone)-6), len(Report_Milestone)), Report_Milestone) 
 | eval _time= TaskDeadline
 | streamstats count as milestoneNumber
 | eval legend = milestoneNumber+" = "+Report_Milestone1
 | chart sum(milestoneNumber) over _timeby legend]
| timechart values(*) as *

matansocher
Contributor

the answer did not give me the exact result I wanted, but it gave me a direction of how I need to cimbine the 2 queries into 1.

thank you

0 Karma

woodcock
Esteemed Legend

Your desire is to overlay the graphs semi-transparently as-is to merge the images, right?

0 Karma

matansocher
Contributor

Yes, exactly.

0 Karma
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...