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
Revered Legend

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
Revered Legend

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!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...