|
29 | 29 | import org.elasticsearch.action.support.TransportAction; |
30 | 30 | import org.elasticsearch.client.internal.node.NodeClient; |
31 | 31 | import org.elasticsearch.cluster.ClusterName; |
| 32 | +import org.elasticsearch.cluster.metadata.ProjectId; |
32 | 33 | import org.elasticsearch.cluster.node.DiscoveryNode; |
33 | 34 | import org.elasticsearch.cluster.node.VersionInformation; |
34 | 35 | import org.elasticsearch.cluster.project.ProjectResolver; |
@@ -71,9 +72,8 @@ public class WhatIsMyClusterDoingAction extends ActionType<WhatIsMyClusterDoingA |
71 | 72 | public static final String NAME = "cluster:monitor/what_is_my_cluster_doing"; |
72 | 73 | // private static final String diagLocation = "/Users/keithmassey/sdh/8676/api-diagnostics-20241231-112131"; |
73 | 74 | // private static final String diagLocation = "/Users/keithmassey/sdh/8689/api-diagnostics-20250108-163913"; |
74 | | - private static final String[] diagLocations = { |
75 | | - "/Users/keithmassey/sdh/8924/20240414_2200/api-diagnostics-20250414-152548", |
76 | | - "/Users/keithmassey/sdh/8924/20240414_2000/api-diagnostics-20250414-130554" }; |
| 75 | + private static final String[] diagLocations = { "/Users/keithmassey/sdh/9271/api-diagnostics-20250910-183143" }; |
| 76 | + // "/Users/keithmassey/sdh/8924/20240414_2000/api-diagnostics-20250414-130554" }; |
77 | 77 |
|
78 | 78 | private WhatIsMyClusterDoingAction() { |
79 | 79 | super(NAME); |
@@ -558,7 +558,7 @@ private void fetchNodesStatsFromDisk(ActionListener<NodesStatsResponse> listener |
558 | 558 | bytesProduced = producedBytes.longValue(); |
559 | 559 | } |
560 | 560 | IngestStats.ByteStats byteStats = new IngestStats.ByteStats(bytesIngested, bytesProduced); |
561 | | - IngestStats.PipelineStat pipelineStat = new IngestStats.PipelineStat(pipelineName, stats, byteStats); |
| 561 | + IngestStats.PipelineStat pipelineStat = new IngestStats.PipelineStat(ProjectId.DEFAULT, pipelineName, stats, byteStats); |
562 | 562 | pipelineStats.add(pipelineStat); |
563 | 563 |
|
564 | 564 | List<Map<String, Map<String, Object>>> processors = (List<Map<String, Map<String, Object>>>) pipelineMap.get( |
@@ -590,7 +590,7 @@ private void fetchNodesStatsFromDisk(ActionListener<NodesStatsResponse> listener |
590 | 590 | } |
591 | 591 | } |
592 | 592 |
|
593 | | - IngestStats ingestStats = new IngestStats(totalStats, pipelineStats, processorStats); |
| 593 | + IngestStats ingestStats = new IngestStats(totalStats, pipelineStats, Map.of(ProjectId.DEFAULT, processorStats)); |
594 | 594 | NodeStats nodeStats = new NodeStats( |
595 | 595 | discoveryNode, |
596 | 596 | 0, |
@@ -682,7 +682,9 @@ private Map<String, Map<String, PipelineDetails>> getNodeToPipelineMap( |
682 | 682 | pipelineName, |
683 | 683 | new PipelineDetails(pipelineName, pipelineTime, totalTimeInMillis, processorMessages) |
684 | 684 | ); |
685 | | - List<IngestStats.ProcessorStat> processors = ingestStats.processorStats().get(pipelineName); |
| 685 | + List<IngestStats.ProcessorStat> processors = ingestStats.processorStats() |
| 686 | + .get(ProjectId.DEFAULT) |
| 687 | + .get(pipelineName); |
686 | 688 | Collection<Long> nonZeroProcessorTimes = processors.stream() |
687 | 689 | .map(stat -> stat.stats().ingestTimeInMillis()) |
688 | 690 | .filter(stat -> stat > 0) |
@@ -938,6 +940,9 @@ private static Tuple<List<String>, String> getSummaryOfElasticStackForOneThread( |
938 | 940 | } else if (stackElement.contains("org.apache.lucene.search.TaskExecutor")) { |
939 | 941 | reasons.add("executing search requests"); |
940 | 942 | potentialClassifications.add(Classification.SEARCH); |
| 943 | + } else { |
| 944 | + reasons.add("unknown"); |
| 945 | + potentialClassifications.add(Classification.UNKNOWN); |
941 | 946 | } |
942 | 947 | if (stackElement.contains("elastic") && stackElement.contains("%") == false) { |
943 | 948 | products.add("elastic"); |
|
0 commit comments