Splunk Search

How to display a timechart of the Health Score as a function of time?

danishv
Loves-to-Learn Everything

I am calculating a health rate for projects based on specific criteria, generaly its the SUM of projects ranked A or B divided by the total number of projects.   I am trying to display a timechart of the Health Score as a function of time but with no luck.

Here is my search:

 

 

basesearch
| streamstats values(pipelineRun{}) as pipelines dc(pipelineRun{}) as num_pipelines by fullPath 
| spath path=project.Findings output=Findings 
| mvexpand Findings 
| spath input=Findings 
| eval ProjectRank=mvappend(ProjectRank, case(A>0 OR B>9, "F",
    A=1 OR (B<9 AND B>2) , "B",
    A=0 AND B=0, "A")) 
| eval PipelinesRank=mvappend(PipelinesRank, if(num_pipelines>8, "A", "F")) 
| eval ProjectFinalRank=mvappend(ProjectFinalRank, case(ProjectRank="F" OR PipelinesRank="F", "F",
    PipelinesRank="A" AND ProjectRank="B", "B",
    PipelinesRank="A" AND ProjectRank="A", "A")) 
| stats count by group ProjectFinalRank 
| stats sum(eval(if(ProjectFinalRank="A" OR ProjectFinalRank="B",count,0)))       AS HIGH sum(count) AS Total by group 
| eval HealthRate=round(HIGH*100/Total,2)

 

 

Labels (3)
0 Karma

danishv
Loves-to-Learn Everything

"with no luck" is with no success.

 

 

0 Karma

yuanliu
SplunkTrust
SplunkTrust

What I mean is: What does "no success" mean?  What is success?  What is your data like?  What is the expected result?  What is the logic connecting your data and your result?  It is hard for volunteers to read other people's mind (and speculate data characteristics) based on complex code snippets.

0 Karma

yuanliu
SplunkTrust
SplunkTrust

What does "with no luck" mean?

0 Karma
Get Updates on the Splunk Community!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...