Skip to content

[feat:podCount] Recommendations API endpoint implementation#1963

Open
mbvreddy wants to merge 7 commits into
kruize:mvp_demofrom
mbvreddy:pc-new-api
Open

[feat:podCount] Recommendations API endpoint implementation#1963
mbvreddy wants to merge 7 commits into
kruize:mvp_demofrom
mbvreddy:pc-new-api

Conversation

@mbvreddy

@mbvreddy mbvreddy commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Description

Please describe the issue or feature and the summary of changes made to fix this.

Fixes # (issue)

Type of change

  • Bug fix
  • New feature
  • Docs update
  • Breaking change (What changes might users need to make in their application due to this PR?)
  • Requires DB changes

How has this been tested?

Please describe the tests that were run to verify your changes and steps to reproduce. Please specify any test configuration required.

  • New Test X
  • Functional testsuite

Test Configuration

  • Kubernetes clusters tested on:

Checklist 🎯

  • Followed coding guidelines
  • Comments added
  • Dependent changes merged
  • Documentation updated
  • Tests added or updated

Additional information

Include any additional information such as links, test results, screenshots here

Summary by Sourcery

Introduce a new v1 recommendations REST API endpoint and wire it into the analyzer, along with related metrics and versioning updates.

New Features:

  • Add a /kruize/api/v1/recommendations servlet (RecommendationsResource) to expose recommendations using the new schema with pod_count and nested resources.
  • Support generating recommendations via POST and listing them via GET on the new recommendations endpoint, including filtering by experiment, time range, and bulk job ID.

Enhancements:

  • Update recommendation API version constants and enum values to reflect the new recommendations schema.
  • Extend metrics configuration to track latency for the new recommendations resource endpoint.

@mbvreddy mbvreddy added this to the Kruize 0.11.0 Release milestone Jun 15, 2026
@mbvreddy mbvreddy added enhancement New feature or request remote_monitoring labels Jun 15, 2026
@sourcery-ai

sourcery-ai Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

Implements a new v1 REST servlet /kruize/api/v1/recommendations for listing and generating recommendations using the new schema (including pod_count and nested resources), wires it into the analyzer server context, updates related API version constants, and extends metrics instrumentation to time the new endpoint and bump list/update recommendation API versions to v3.0.

Sequence diagram for the new v1 recommendations POST endpoint

sequenceDiagram
    actor Client
    participant RecommendationsResource
    participant RecommendationEngine
    participant HttpServletResponse
    participant MetricsConfig

    Client->>RecommendationsResource: doPost(request, response)
    RecommendationsResource->>MetricsConfig: meterRegistry()
    activate RecommendationsResource
    Note over RecommendationsResource: Timer.Sample timerBRecommendationResource = Timer.start(...)

    RecommendationsResource->>RecommendationsResource: request.getParameter(EXPERIMENT_NAME / INTERVAL_START_TIME / INTERVAL_END_TIME / JOB_ID)
    RecommendationsResource->>RecommendationsResource: determine target using KruizeDeploymentInfo.local

    RecommendationsResource->>RecommendationEngine: new RecommendationEngine(experimentName, intervalEndTimeStr, intervalStartTimeStr)

    alt target == LOCAL
        RecommendationsResource->>RecommendationEngine: validate_local()
    else target == REMOTE
        RecommendationsResource->>RecommendationEngine: validate()
    end

    alt validation succeeds
        RecommendationsResource->>RecommendationEngine: prepareRecommendations(calCount, target, bulkJobID)
        RecommendationEngine-->>RecommendationsResource: KruizeObject
        alt kruizeObject.validation_data.success
            RecommendationsResource->>RecommendationsResource: Utils.DateUtils.getTimeStampFrom(...)
            RecommendationsResource->>HttpServletResponse: sendRecommendationsResponse(..., List.of(kruizeObject), ..., SC_CREATED)
        else validation_data failure
            RecommendationsResource->>HttpServletResponse: sendErrorResponse(..., kruizeObject.validation_data.errorCode, ...)
        end
    else validation fails
        RecommendationsResource->>HttpServletResponse: sendErrorResponse(..., SC_BAD_REQUEST, errorMessage)
    end

    RecommendationsResource->>MetricsConfig: timerBRecomendationResource.tag(...).register(meterRegistry())
    MetricsConfig-->>RecommendationsResource: timerRecomendationResource
    RecommendationsResource->>MetricsConfig: timerBRecommendationResource.stop(timerRecomendationResource)
    deactivate RecommendationsResource

    RecommendationsResource-->>Client: HTTP 201/4xx with JSON body
Loading

File-Level Changes

Change Details Files
Introduce a new RecommendationsResource servlet that exposes a v1 recommendations REST API supporting GET for listing recommendations and POST for generating recommendations using the new schema.
  • Add RecommendationsResource HttpServlet with GET handler that loads experiments and recommendations from the database (optionally filtered by experiment name, monitoring end time, bulk job ID, and rm flag), validates timestamp parameters, and returns recommendations via a shared response builder
  • Implement POST handler that validates input using RecommendationEngine, generates recommendations for a given experiment and interval, and returns them in the v1 schema while handling both local and remote monitoring targets
  • Factor common response logic into sendRecommendationsResponse to convert KruizeObject instances into ListRecommendationsAPIObject, post-process recommendation structures (including currentConfig, config, and variation) into a nested resources map, set the API version to the latest recommendation version, and serialize with custom Gson adapters and exclusions
  • Add helper methods processRecommendations and restructureConfigObj to migrate requests/limits into a resources map per Config and null out legacy fields, and centralize error handling in sendErrorResponse
src/main/java/com/autotune/analyzer/services/RecommendationsResource.java
Wire the new recommendations resource endpoint into the analyzer server context and define its URL path constant.
  • Register RecommendationsResource servlet in Analyzer.addServlets with the new ServerContext.RECOMMENDATIONS path
  • Introduce ServerContext.RECOMMENDATIONS constant pointing to ROOT_CONTEXT + "kruize/api/v1/recommendations"
src/main/java/com/autotune/analyzer/Analyzer.java
src/main/java/com/autotune/utils/ServerContext.java
Update recommendation API versioning to reflect the new v1 recommendations schema and bump list/update recommendations REST API versions to v3.0.
  • Change CURRENT_LIST_RECOMMENDATIONS_VERSION and CURRENT_UPDATE_RECOMMENDATIONS_VERSION constants to "v3.0" in AnalyzerConstants.VersionConstants.APIVersionConstants
  • Simplify KRUIZE_RECOMMENDATION_API_VERSION enum to only expose LATEST with value "v1.0" for the new recommendations schema
src/main/java/com/autotune/analyzer/utils/AnalyzerConstants.java
src/main/java/com/autotune/utils/KruizeConstants.java
Extend metrics configuration to capture timing for the new recommendations resource endpoint.
  • Add Timer timerRecomendationResource and Timer.Builder timerBRecomendationResource to MetricsConfig for timing the new recommendations resource servlet
  • Use micrometer Timer in RecommendationsResource GET and POST handlers to record request timing with status tags, leveraging the new metrics fields
src/main/java/com/autotune/utils/MetricsConfig.java
src/main/java/com/autotune/analyzer/services/RecommendationsResource.java

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@mbvreddy mbvreddy marked this pull request as draft June 15, 2026 11:35

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 3 issues, and left some high level feedback:

  • The new KRUIZE_RECOMMENDATION_API_VERSION.LATEST value uses "v1.0" while other version constants (e.g., CURRENT_LIST_RECOMMENDATIONS_VERSION/CURRENT_UPDATE_RECOMMENDATIONS_VERSION) use "v3.0" or non-v-prefixed formats; consider aligning the version string format and retaining explicit version enum values if anything else relies on them.
  • The new recommendation metrics (timerRecomendationResource and timerBRecomendationResource) are declared but not shown being initialized like the other timers in MetricsConfig; ensure they are wired up consistently so the POST handler cannot hit a null builder or timer at runtime.
  • The new RecommendationsResource class header lists copyright year 2026, which is in the future compared to the rest of the project; consider updating this to match the current year convention used elsewhere.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The new KRUIZE_RECOMMENDATION_API_VERSION.LATEST value uses "v1.0" while other version constants (e.g., CURRENT_LIST_RECOMMENDATIONS_VERSION/CURRENT_UPDATE_RECOMMENDATIONS_VERSION) use "v3.0" or non-`v`-prefixed formats; consider aligning the version string format and retaining explicit version enum values if anything else relies on them.
- The new recommendation metrics (timerRecomendationResource and timerBRecomendationResource) are declared but not shown being initialized like the other timers in MetricsConfig; ensure they are wired up consistently so the POST handler cannot hit a null builder or timer at runtime.
- The new RecommendationsResource class header lists copyright year 2026, which is in the future compared to the rest of the project; consider updating this to match the current year convention used elsewhere.

## Individual Comments

### Comment 1
<location path="src/main/java/com/autotune/analyzer/services/RecommendationsResource.java" line_range="91" />
<code_context>
+public class RecommendationsResource extends HttpServlet {
+    private static final long serialVersionUID = 1L;
+    private static final Logger LOGGER = LoggerFactory.getLogger(RecommendationsResource.class);
+    private static int requestCount = 0;
+
+    @Override
</code_context>
<issue_to_address>
**issue (bug_risk):** Static requestCount is not thread-safe in a multi-threaded servlet environment

Because servlet instances are shared across threads, `++requestCount` in `doPost` can race and produce incorrect counts under load. If you need this counter, make it thread‑safe (e.g., use `AtomicInteger.incrementAndGet()`), or remove it to avoid misleading metrics and data races.
</issue_to_address>

### Comment 2
<location path="src/main/java/com/autotune/analyzer/services/RecommendationsResource.java" line_range="343-345" />
<code_context>
+                for (KubernetesAPIObject kubernetesAPIObject : listRecommendationsAPIObject.getKubernetesObjects()) {
+
+                    // Handle container recommendations
+                    if (kubernetesAPIObject.getContainerAPIObjects() != null) {
+                        for (ContainerAPIObject containerAPIObject : kubernetesAPIObject.getContainerAPIObjects()) {
+                            ContainerRecommendations recommendations = containerAPIObject.getContainerRecommendations();
+                            processRecommendations(recommendations.getData().values());
+                        }
</code_context>
<issue_to_address>
**issue (bug_risk):** Missing null-check for container/namespace recommendations can lead to NPEs

In `sendRecommendationsResponse`, `containerAPIObject.getContainerRecommendations()` (and similarly `kubernetesAPIObject.getNamespaceAPIObject().getNamespaceRecommendations()`) are dereferenced without a null check. If recommendations are absent, `processRecommendations(recommendations.getData().values())` will throw. Please guard these calls (or treat missing recommendations as empty) before accessing `getData()`.
</issue_to_address>

### Comment 3
<location path="src/main/java/com/autotune/analyzer/services/RecommendationsResource.java" line_range="135-144" />
<code_context>
+        }
+
+        List<KruizeObject> kruizeObjectList = new ArrayList<>();
+        try {
+            if (null != experimentName) {
+                experimentName = experimentName.trim();
+                try {
+                    if (rmTable) {
+                        new ExperimentDBService().loadExperimentAndRecommendationsFromDBByName(mKruizeExperimentMap, experimentName);
+                    } else {
+                        new ExperimentDBService().loadLMExperimentAndRecommendationsFromDBByName(mKruizeExperimentMap, experimentName, bulkJobID);
+                    }
+                } catch (Exception e) {
+                    LOGGER.error("Loading saved experiment {} failed: {} ", experimentName, e.getMessage());
+                }
+
</code_context>
<issue_to_address>
**suggestion (bug_risk):** Database load failures are logged but reported back as "invalid experiment name" to the client

In the `experimentName != null` branch of `doGet`, if `loadExperimentAndRecommendationsFromDBByName` throws, we only log the exception and then fall through, so the client can still get `INVALID_EXPERIMENT_NAME`. This masks DB/infra failures as user input errors. Consider returning an appropriate 5xx response on DB load failure instead of continuing to the "invalid experiment name" path.

Suggested implementation:

```java
                try {
                    if (rmTable) {
                        new ExperimentDBService().loadExperimentAndRecommendationsFromDBByName(mKruizeExperimentMap, experimentName);
                    } else {
                        new ExperimentDBService().loadLMExperimentAndRecommendationsFromDBByName(mKruizeExperimentMap, experimentName, bulkJobID);
                    }
                } catch (Exception e) {
                    LOGGER.error("Loading saved experiment {} failed", experimentName, e);
                    // Database/infra failure – return 5xx instead of continuing to "invalid experiment name" handling
                    response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR,
                            "Failed to load experiment from database. Please try again later.");
                    return;
                }

```

1. Ensure this code is inside the `doGet` method that has a `HttpServletResponse response` parameter; if the parameter is named differently, update `response` accordingly.
2. Make sure `javax.servlet.http.HttpServletResponse` is imported in this file if it is not already.
3. If `doGet` currently declares `throws IOException`, no further changes are needed; otherwise either add `throws IOException` to the method signature or wrap `response.sendError(...)` in a try/catch that handles `IOException`.
4. If this resource is not a `HttpServlet` but uses a different response abstraction (e.g. JAX-RS `Response`), adapt the catch block to build and return an appropriate 5xx `Response` object instead of using `HttpServletResponse`.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread src/main/java/com/autotune/analyzer/services/RecommendationsResource.java Outdated
Signed-off-by: Bhaktavatsal Reddy <bhamaram@in.ibm.com>
@mbvreddy mbvreddy changed the title [feat:update] Recommendations API endpoint implementation [feat:podCount] Recommendations API endpoint implementation Jun 15, 2026
@mbvreddy mbvreddy marked this pull request as ready for review June 15, 2026 13:57

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 3 issues, and left some high level feedback:

  • The static requestCount field in RecommendationsResource is incremented without any synchronization, which can lead to race conditions under concurrent load; consider using an AtomicInteger or avoiding a mutable static counter.
  • The doPost Javadoc mentions selecting the target via a "target" query parameter, but the implementation derives target solely from KruizeDeploymentInfo.local; either wire in the query parameter or update the Javadoc to reflect the actual behavior.
  • For metrics consistency, the GET handler in RecommendationsResource currently uses the shared timerBListRec while POST uses the new timerBRecomendationResource; consider using the new recommendation-specific timer for both methods or clearly separating metrics for legacy vs v1 endpoints.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The static `requestCount` field in `RecommendationsResource` is incremented without any synchronization, which can lead to race conditions under concurrent load; consider using an `AtomicInteger` or avoiding a mutable static counter.
- The `doPost` Javadoc mentions selecting the target via a `"target"` query parameter, but the implementation derives `target` solely from `KruizeDeploymentInfo.local`; either wire in the query parameter or update the Javadoc to reflect the actual behavior.
- For metrics consistency, the GET handler in `RecommendationsResource` currently uses the shared `timerBListRec` while POST uses the new `timerBRecomendationResource`; consider using the new recommendation-specific timer for both methods or clearly separating metrics for legacy vs v1 endpoints.

## Individual Comments

### Comment 1
<location path="src/main/java/com/autotune/utils/KruizeConstants.java" line_range="45" />
<code_context>
     public static enum KRUIZE_RECOMMENDATION_API_VERSION {
-        V1_0("1.0"),
-        LATEST("1.0");
+        LATEST("v1.0");
         private final String versionNumber;

</code_context>
<issue_to_address>
**issue (bug_risk):** Changing the enum values and removing `V1_0` may break callers and introduces a different version string format.

This change removes `V1_0("1.0")` and changes the remaining value to `LATEST("v1.0")`. That means:
1) Any code referencing `KRUIZE_RECOMMENDATION_API_VERSION.V1_0` will no longer compile.
2) The version string has changed from `"1.0"` to `"v1.0"`, while other APIs already use `"v2.0"` / `"v3.0"`. If any clients or comparisons rely on the old `"1.0"` value, this will be a breaking change.

Consider keeping `V1_0("1.0")` for compatibility and adding a new constant for the `v`-prefixed form, or verify and update all consumers before making this change.
</issue_to_address>

### Comment 2
<location path="src/main/java/com/autotune/utils/MetricsConfig.java" line_range="19-22" />
<code_context>
 public class MetricsConfig {

-    public static Timer timerListRec, timerListExp, timerCreateExp, timerUpdateResults, timerUpdateRecomendations;
+    public static Timer timerListRec, timerListExp, timerCreateExp, timerUpdateResults, timerUpdateRecomendations, timerRecomendationResource;
     public static Timer timerLoadRecExpName, timerLoadResultsExpName, timerLoadExpName, timerLoadRecExpNameDate, timerLoadBulkJobId, timerUpdateBulkJobId,  timerBoxPlots, timerUpdateExpDate;
     public static Timer timerLoadAllRec, timerLoadAllExp, timerLoadAllResults;
</code_context>
<issue_to_address>
**nitpick (typo):** Consider correcting the spelling in the new timer names to avoid confusion and make metrics easier to query.

The new field `timerRecomendationResource` (and similarly named metrics) use `Recomendation` with one `m`, which is inconsistent with standard spelling and other concept names. If possible, please rename these to use `Recommendation` to keep metric identifiers consistent and easier to query.

Suggested implementation:

```java
    public static Timer timerListRec, timerListExp, timerCreateExp, timerUpdateResults, timerUpdateRecommendations, timerRecommendationResource;

```

```java
    public static Timer.Builder timerBListRec, timerBListExp, timerBCreateExp, timerBUpdateResults, timerBUpdateRecommendations, timerBUpdateExpDate, timerBRecommendationResource;

```

To fully apply this rename, you should:
1. Update all usages of `timerUpdateRecomendations` to `timerUpdateRecommendations` across the project (e.g., metric registration, timers, and any references where this field is used).
2. Update all usages of `timerRecomendationResource` to `timerRecommendationResource`.
3. Update all usages of `timerBRecomendationResource` to `timerBRecommendationResource`.
4. If the metric names are set via strings (e.g., `Timer.builder("...")` or with tags), ensure those string metric identifiers also use the corrected "recommendation" spelling to keep metrics consistent in your monitoring system.
</issue_to_address>

### Comment 3
<location path="src/main/java/com/autotune/analyzer/services/RecommendationsResource.java" line_range="91" />
<code_context>
+public class RecommendationsResource extends HttpServlet {
+    private static final long serialVersionUID = 1L;
+    private static final Logger LOGGER = LoggerFactory.getLogger(RecommendationsResource.class);
+    private static int requestCount = 0;
+
+    @Override
</code_context>
<issue_to_address>
**issue (bug_risk):** Using a plain static int for `requestCount` is not thread-safe in a servlet environment.

Because servlets are accessed by multiple threads, `++requestCount` in `doPost` is a racy update and can produce incorrect counts. If this counter is only loosely informative, consider removing it; otherwise use a thread-safe alternative like `AtomicInteger` or integrate it with your metrics system.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment thread src/main/java/com/autotune/utils/KruizeConstants.java Outdated
Comment thread src/main/java/com/autotune/utils/MetricsConfig.java Outdated
Comment thread src/main/java/com/autotune/analyzer/services/RecommendationsResource.java Outdated
@mbvreddy

Copy link
Copy Markdown
Contributor Author

Please find below the API response with this change.

GET kruize/api/v1/recommendations

Your Hidden Content Here

  • You can include bullet points.
  • You can also include code blocks or logs:
root@kruize01:~/workarea/github/autotune/tests/scripts/remote_monitoring_tests/rest_apis# curl 'http://172.18.0.2:31900/kruize/api/v1/recommendations?rm=true&experiment_name=quarkus-resteasy-kruize-min-http-response-time-db_0'
[
{
  "cluster_name": "cluster-one-division-bell",
  "experiment_type": "container",
  "kubernetes_objects": [
    {
      "type": "deployment",
      "name": "tfb-qrh-deployment_0",
      "namespace": "default_0",
      "containers": [
        {
          "container_image_name": "kruize/tfb-qrh:1.13.2.F_et17",
          "container_name": "tfb-server-1",
          "recommendations": {
            "version": "v1.0",
            "notifications": {
              "111000": {
                "type": "info",
                "message": "Recommendations Are Available",
                "code": 111000
              }
            },
            "data": {
              "2026-06-16T20:25:09.410Z": {
                "notifications": {
                  "111101": {
                    "type": "info",
                    "message": "Short Term Recommendations Available",
                    "code": 111101
                  }
                },
                "monitoring_end_time": "2026-06-16T20:25:09.410Z",
                "current": {
                  "replicas": 7,
                  "resources": {
                    "requests": {
                      "cpu": {
                        "amount": 1.1,
                        "format": "cores"
                      },
                      "memory": {
                        "amount": 50.21,
                        "format": "MiB"
                      }
                    },
                    "limits": {
                      "cpu": {
                        "amount": 0.5,
                        "format": "cores"
                      },
                      "memory": {
                        "amount": 100.0,
                        "format": "MiB"
                      }
                    }
                  }
                },
                "recommendation_terms": {
                  "short_term": {
                    "duration_in_hours": 24.0,
                    "notifications": {
                      "112101": {
                        "type": "info",
                        "message": "Cost Recommendations Available",
                        "code": 112101
                      },
                      "112102": {
                        "type": "info",
                        "message": "Performance Recommendations Available",
                        "code": 112102
                      },
                      "321001": {
                        "type": "notice",
                        "message": "Pod count is derived from CPU usage metric data",
                        "code": 321001
                      }
                    },
                    "metrics_info": {
                      "pod_count": {
                        "avg": 7,
                        "min": 7,
                        "max": 7
                      }
                    },
                    "monitoring_start_time": "2026-06-15T20:25:09.410Z",
                    "recommendation_engines": {
                      "cost": {
                        "pods_count": 7,
                        "confidence_level": 0.0,
                        "config": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": 0.9299999999999999,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 0.9299999999999999,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "variation": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": -0.17000000000000015,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 187.98999999999998,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 0.42999999999999994,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 138.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "notifications": {}
                      },
                      "performance": {
                        "pods_count": 7,
                        "confidence_level": 0.0,
                        "config": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": 0.9299999999999999,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 0.9299999999999999,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "variation": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": -0.17000000000000015,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 187.98999999999998,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 0.42999999999999994,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 138.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "notifications": {}
                      }
                    },
                    "plots": {
                      "datapoints": 4,
                      "plots_data": {
                        "2026-06-16T02:25:09.410Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T08:25:09.410Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T14:25:09.410Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T20:25:09.410Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        }
                      }
                    }
                  },
                  "medium_term": {
                    "duration_in_hours": 25.0,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  },
                  "long_term": {
                    "duration_in_hours": 25.0,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  }
                }
              }
            }
          }
        },
        {
          "container_image_name": "kruize/tfb-db:1.15",
          "container_name": "tfb-server-0",
          "recommendations": {
            "version": "v1.0",
            "notifications": {
              "111000": {
                "type": "info",
                "message": "Recommendations Are Available",
                "code": 111000
              }
            },
            "data": {
              "2026-06-16T20:25:09.410Z": {
                "notifications": {
                  "111101": {
                    "type": "info",
                    "message": "Short Term Recommendations Available",
                    "code": 111101
                  }
                },
                "monitoring_end_time": "2026-06-16T20:25:09.410Z",
                "current": {
                  "replicas": 5,
                  "resources": {
                    "requests": {
                      "cpu": {
                        "amount": 2.1,
                        "format": "cores"
                      },
                      "memory": {
                        "amount": 50.21,
                        "format": "MiB"
                      }
                    },
                    "limits": {
                      "cpu": {
                        "amount": 1.5,
                        "format": "cores"
                      },
                      "memory": {
                        "amount": 100.0,
                        "format": "MiB"
                      }
                    }
                  }
                },
                "recommendation_terms": {
                  "short_term": {
                    "duration_in_hours": 24.0,
                    "notifications": {
                      "112101": {
                        "type": "info",
                        "message": "Cost Recommendations Available",
                        "code": 112101
                      },
                      "112102": {
                        "type": "info",
                        "message": "Performance Recommendations Available",
                        "code": 112102
                      },
                      "321001": {
                        "type": "notice",
                        "message": "Pod count is derived from CPU usage metric data",
                        "code": 321001
                      }
                    },
                    "metrics_info": {
                      "pod_count": {
                        "avg": 5,
                        "min": 5,
                        "max": 5
                      }
                    },
                    "monitoring_start_time": "2026-06-15T20:25:09.410Z",
                    "recommendation_engines": {
                      "cost": {
                        "pods_count": 5,
                        "confidence_level": 0.0,
                        "config": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": 1.03,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 1.03,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "variation": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": -1.07,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 187.98999999999998,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": -0.47,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 138.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "notifications": {}
                      },
                      "performance": {
                        "pods_count": 5,
                        "confidence_level": 0.0,
                        "config": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": 1.03,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 1.03,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "variation": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": -1.07,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 187.98999999999998,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": -0.47,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 138.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "notifications": {}
                      }
                    },
                    "plots": {
                      "datapoints": 4,
                      "plots_data": {
                        "2026-06-16T02:25:09.410Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T08:25:09.410Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T14:25:09.410Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T20:25:09.410Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        }
                      }
                    }
                  },
                  "medium_term": {
                    "duration_in_hours": 25.0,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  },
                  "long_term": {
                    "duration_in_hours": 25.0,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  }
                }
              }
            }
          }
        }
      ]
    }
  ],
  "version": "v1.0",
  "experiment_name": "quarkus-resteasy-kruize-min-http-response-time-db_0"
}
]
POST kruize/api/v1/recommendations

Your Hidden Content Here

  • You can include bullet points.
  • You can also include code blocks or logs:
root@kruize01:~/workarea/github/autotune/tests/scripts/remote_monitoring_tests/rest_apis# curl -X POST 'http://172.18.0.2:31900/kruize/api/v1/recommendations?rm=true&experiment_name=quarkus-resteasy-kruize-min-http-response-time-db_0&interval_end_time=2026-06-16T20:19:35.661Z'
[
{
  "cluster_name": "cluster-one-division-bell",
  "experiment_type": "container",
  "kubernetes_objects": [
    {
      "type": "deployment",
      "name": "tfb-qrh-deployment_0",
      "namespace": "default_0",
      "containers": [
        {
          "container_image_name": "kruize/tfb-qrh:1.13.2.F_et17",
          "container_name": "tfb-server-1",
          "recommendations": {
            "version": "v1.0",
            "notifications": {
              "111000": {
                "type": "info",
                "message": "Recommendations Are Available",
                "code": 111000
              }
            },
            "data": {
              "2026-06-16T20:10:09.410Z": {
                "notifications": {
                  "111101": {
                    "type": "info",
                    "message": "Short Term Recommendations Available",
                    "code": 111101
                  }
                },
                "monitoring_end_time": "2026-06-16T20:10:09.410Z",
                "current": {
                  "replicas": 7,
                  "resources": {
                    "requests": {
                      "cpu": {
                        "amount": 1.1,
                        "format": "cores"
                      },
                      "memory": {
                        "amount": 50.21,
                        "format": "MiB"
                      }
                    },
                    "limits": {
                      "cpu": {
                        "amount": 0.5,
                        "format": "cores"
                      },
                      "memory": {
                        "amount": 100.0,
                        "format": "MiB"
                      }
                    }
                  }
                },
                "recommendation_terms": {
                  "short_term": {
                    "duration_in_hours": 24.0,
                    "notifications": {
                      "112101": {
                        "type": "info",
                        "message": "Cost Recommendations Available",
                        "code": 112101
                      },
                      "112102": {
                        "type": "info",
                        "message": "Performance Recommendations Available",
                        "code": 112102
                      },
                      "321001": {
                        "type": "notice",
                        "message": "Pod count is derived from CPU usage metric data",
                        "code": 321001
                      }
                    },
                    "metrics_info": {
                      "pod_count": {
                        "avg": 7,
                        "min": 7,
                        "max": 7
                      }
                    },
                    "monitoring_start_time": "2026-06-15T20:10:09.410Z",
                    "recommendation_engines": {
                      "cost": {
                        "pods_count": 7,
                        "confidence_level": 0.0,
                        "config": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": 0.9299999999999999,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 0.9299999999999999,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "variation": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": -0.17000000000000015,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 187.98999999999998,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 0.42999999999999994,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 138.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "notifications": {}
                      },
                      "performance": {
                        "pods_count": 7,
                        "confidence_level": 0.0,
                        "config": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": 0.9299999999999999,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 0.9299999999999999,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "variation": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": -0.17000000000000015,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 187.98999999999998,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 0.42999999999999994,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 138.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "notifications": {}
                      }
                    },
                    "plots": {
                      "datapoints": 4,
                      "plots_data": {
                        "2026-06-16T20:10:09.410Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T08:10:09.410Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T14:10:09.410Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T02:10:09.410Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        }
                      }
                    }
                  },
                  "medium_term": {
                    "duration_in_hours": 24.75,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  },
                  "long_term": {
                    "duration_in_hours": 24.75,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  }
                }
              }
            }
          }
        },
        {
          "container_image_name": "kruize/tfb-db:1.15",
          "container_name": "tfb-server-0",
          "recommendations": {
            "version": "v1.0",
            "notifications": {
              "111000": {
                "type": "info",
                "message": "Recommendations Are Available",
                "code": 111000
              }
            },
            "data": {
              "2026-06-16T20:10:09.410Z": {
                "notifications": {
                  "111101": {
                    "type": "info",
                    "message": "Short Term Recommendations Available",
                    "code": 111101
                  }
                },
                "monitoring_end_time": "2026-06-16T20:10:09.410Z",
                "current": {
                  "replicas": 5,
                  "resources": {
                    "requests": {
                      "cpu": {
                        "amount": 2.1,
                        "format": "cores"
                      },
                      "memory": {
                        "amount": 50.21,
                        "format": "MiB"
                      }
                    },
                    "limits": {
                      "cpu": {
                        "amount": 1.5,
                        "format": "cores"
                      },
                      "memory": {
                        "amount": 100.0,
                        "format": "MiB"
                      }
                    }
                  }
                },
                "recommendation_terms": {
                  "short_term": {
                    "duration_in_hours": 24.0,
                    "notifications": {
                      "112101": {
                        "type": "info",
                        "message": "Cost Recommendations Available",
                        "code": 112101
                      },
                      "112102": {
                        "type": "info",
                        "message": "Performance Recommendations Available",
                        "code": 112102
                      },
                      "321001": {
                        "type": "notice",
                        "message": "Pod count is derived from CPU usage metric data",
                        "code": 321001
                      }
                    },
                    "metrics_info": {
                      "pod_count": {
                        "avg": 5,
                        "min": 5,
                        "max": 5
                      }
                    },
                    "monitoring_start_time": "2026-06-15T20:10:09.410Z",
                    "recommendation_engines": {
                      "cost": {
                        "pods_count": 5,
                        "confidence_level": 0.0,
                        "config": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": 1.03,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 1.03,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "variation": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": -1.07,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 187.98999999999998,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": -0.47,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 138.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "notifications": {}
                      },
                      "performance": {
                        "pods_count": 5,
                        "confidence_level": 0.0,
                        "config": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": 1.03,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 1.03,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "variation": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": -1.07,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 187.98999999999998,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": -0.47,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 138.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "notifications": {}
                      }
                    },
                    "plots": {
                      "datapoints": 4,
                      "plots_data": {
                        "2026-06-16T20:10:09.410Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T08:10:09.410Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T14:10:09.410Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T02:10:09.410Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        }
                      }
                    }
                  },
                  "medium_term": {
                    "duration_in_hours": 24.75,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  },
                  "long_term": {
                    "duration_in_hours": 24.75,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  }
                }
              }
            }
          }
        }
      ]
    }
  ],
  "version": "v1.0",
  "experiment_name": "quarkus-resteasy-kruize-min-http-response-time-db_0"
}
]
POST /updateRecommendations

Your Hidden Content Here

  • You can include bullet points.
  • You can also include code blocks or logs:
root@kruize01:~/workarea/github/autotune/tests/scripts/remote_monitoring_tests/rest_apis# curl -X POST 'http://172.18.0.2:31900/updateRecommendations?experiment_name=quarkus-resteasy-kruize-min-http-response-time-db_0&interval_end_time=2026-06-16T20:19:35.661Z'
[
{
  "cluster_name": "cluster-one-division-bell",
  "experiment_type": "container",
  "kubernetes_objects": [
    {
      "type": "deployment",
      "name": "tfb-qrh-deployment_0",
      "namespace": "default_0",
      "containers": [
        {
          "container_image_name": "kruize/tfb-qrh:1.13.2.F_et17",
          "container_name": "tfb-server-1",
          "recommendations": {
            "version": "v1.0",
            "notifications": {
              "111000": {
                "type": "info",
                "message": "Recommendations Are Available",
                "code": 111000
              }
            },
            "data": {
              "2026-06-16T20:10:09.410Z": {
                "notifications": {
                  "111101": {
                    "type": "info",
                    "message": "Short Term Recommendations Available",
                    "code": 111101
                  }
                },
                "monitoring_end_time": "2026-06-16T20:10:09.410Z",
                "current": {
                  "replicas": 7,
                  "requests": {
                    "cpu": {
                      "amount": 1.1,
                      "format": "cores"
                    },
                    "memory": {
                      "amount": 50.21,
                      "format": "MiB"
                    }
                  },
                  "limits": {
                    "cpu": {
                      "amount": 0.5,
                      "format": "cores"
                    },
                    "memory": {
                      "amount": 100.0,
                      "format": "MiB"
                    }
                  }
                },
                "recommendation_terms": {
                  "short_term": {
                    "duration_in_hours": 24.0,
                    "notifications": {

                      "112101": {
                        "type": "info",
                        "message": "Cost Recommendations Available",
                        "code": 112101
                      },
                      "112102": {
                        "type": "info",
                        "message": "Performance Recommendations Available",
                        "code": 112102
                      },
                      "321001": {
                        "type": "notice",
                        "message": "Pod count is derived from CPU usage metric data",
                        "code": 321001
                      }
                    },
                    "metrics_info": {
                      "pod_count": {
                        "avg": 7,
                        "min": 7,
                        "max": 7
                      }
                    },
                    "monitoring_start_time": "2026-06-15T20:10:09.410Z",
                    "recommendation_engines": {
                      "cost": {
                        "pods_count": 7,
                        "confidence_level": 0.0,
                        "config": {
                          "requests": {
                            "cpu": {
                              "amount": 0.9299999999999999,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 0.9299999999999999,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "variation": {
                          "requests": {
                            "cpu": {
                              "amount": -0.17000000000000015,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 187.98999999999998,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 0.42999999999999994,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 138.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "notifications": {}
                      },
                      "performance": {
                        "pods_count": 7,
                        "confidence_level": 0.0,
                        "config": {
                          "requests": {
                            "cpu": {
                              "amount": 0.9299999999999999,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 0.9299999999999999,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "variation": {
                          "requests": {
                            "cpu": {
                              "amount": -0.17000000000000015,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 187.98999999999998,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 0.42999999999999994,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 138.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "notifications": {}
                      }
                    },
                    "plots": {
                      "datapoints": 4,
                      "plots_data": {
                        "2026-06-16T20:10:09.410Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T08:10:09.410Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T14:10:09.410Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T02:10:09.410Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        }
                      }
                    }
                  },
                  "medium_term": {
                    "duration_in_hours": 24.75,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  },
                  "long_term": {
                    "duration_in_hours": 24.75,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  }
                }
              }
            }
          }
        },
        {
          "container_image_name": "kruize/tfb-db:1.15",
          "container_name": "tfb-server-0",
          "recommendations": {
            "version": "v1.0",
            "notifications": {
              "111000": {
                "type": "info",
                "message": "Recommendations Are Available",
                "code": 111000
              }
            },
            "data": {
              "2026-06-16T20:10:09.410Z": {
                "notifications": {
                  "111101": {
                    "type": "info",
                    "message": "Short Term Recommendations Available",
                    "code": 111101
                  }
                },
                "monitoring_end_time": "2026-06-16T20:10:09.410Z",
                "current": {
                  "replicas": 5,
                  "requests": {
                    "cpu": {
                      "amount": 2.1,
                      "format": "cores"
                    },
                    "memory": {
                      "amount": 50.21,
                      "format": "MiB"
                    }
                  },
                  "limits": {
                    "cpu": {
                      "amount": 1.5,
                      "format": "cores"
                    },
                    "memory": {
                      "amount": 100.0,
                      "format": "MiB"
                    }
                  }
                },
                "recommendation_terms": {
                  "short_term": {
                    "duration_in_hours": 24.0,
                    "notifications": {
                      "112101": {
                        "type": "info",
                        "message": "Cost Recommendations Available",
                        "code": 112101
                      },
                      "112102": {
                        "type": "info",
                        "message": "Performance Recommendations Available",
                        "code": 112102
                      },
                      "321001": {
                        "type": "notice",
                        "message": "Pod count is derived from CPU usage metric data",
                        "code": 321001
                      }
                    },
                    "metrics_info": {
                      "pod_count": {
                        "avg": 5,
                        "min": 5,
                        "max": 5
                      }
                    },
                    "monitoring_start_time": "2026-06-15T20:10:09.410Z",
                    "recommendation_engines": {
                      "cost": {
                        "pods_count": 5,
                        "confidence_level": 0.0,
                        "config": {
                          "requests": {
                            "cpu": {
                              "amount": 1.03,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 1.03,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "variation": {
                          "requests": {
                            "cpu": {
                              "amount": -1.07,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 187.98999999999998,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": -0.47,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 138.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "notifications": {}
                      },
                      "performance": {
                        "pods_count": 5,
                        "confidence_level": 0.0,
                        "config": {
                          "requests": {
                            "cpu": {
                              "amount": 1.03,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 1.03,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "variation": {
                          "requests": {
                            "cpu": {
                              "amount": -1.07,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 187.98999999999998,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": -0.47,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 138.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "notifications": {}
                      }
                    },
                    "plots": {
                      "datapoints": 4,
                      "plots_data": {
                        "2026-06-16T20:10:09.410Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T08:10:09.410Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T14:10:09.410Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T02:10:09.410Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        }
                      }
                    }
                  },
                  "medium_term": {
                    "duration_in_hours": 24.75,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  },
                  "long_term": {
                    "duration_in_hours": 24.75,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  }
                }
              }
            }
          }
        }
      ]
    }
  ],
  "version": "v3.0",
  "experiment_name": "quarkus-resteasy-kruize-min-http-response-time-db_0"
}
]
GET /listRecommendations

Your Hidden Content Here

  • You can include bullet points.
  • You can also include code blocks or logs:
root@kruize01:~/workarea/github/autotune/tests/scripts/remote_monitoring_tests/rest_apis# curl 'http://172.18.0.2:31900/listRecommendations?rm=true&experiment_name=quarkus-resteasy-kruize-min-http-response-time-db_0'
[
{
  "cluster_name": "cluster-one-division-bell",
  "experiment_type": "container",
  "kubernetes_objects": [
    {
      "type": "deployment",
      "name": "tfb-qrh-deployment_0",
      "namespace": "default_0",
      "containers": [
        {
          "container_image_name": "kruize/tfb-qrh:1.13.2.F_et17",
          "container_name": "tfb-server-1",
          "recommendations": {
            "version": "v1.0",
            "notifications": {
              "111000": {
                "type": "info",
                "message": "Recommendations Are Available",
                "code": 111000
              }
            },
            "data": {
              "2026-06-16T20:25:09.410Z": {
                "notifications": {
                  "111101": {
                    "type": "info",
                    "message": "Short Term Recommendations Available",
                    "code": 111101
                  }
                },
                "monitoring_end_time": "2026-06-16T20:25:09.410Z",
                "current": {
                  "replicas": 7,
                  "requests": {
                    "cpu": {
                      "amount": 1.1,
                      "format": "cores"
                    },
                    "memory": {
                      "amount": 50.21,
                      "format": "MiB"
                    }
                  },
                  "limits": {
                    "cpu": {
                      "amount": 0.5,
                      "format": "cores"
                    },
                    "memory": {
                      "amount": 100.0,
                      "format": "MiB"
                    }
                  }
                },
                "recommendation_terms": {
                  "short_term": {
                    "duration_in_hours": 24.0,
                    "notifications": {
                      "112101": {
                        "type": "info",
                        "message": "Cost Recommendations Available",
                        "code": 112101
                      },
                      "112102": {
                        "type": "info",
                        "message": "Performance Recommendations Available",
                        "code": 112102
                      },
                      "321001": {
                        "type": "notice",
                        "message": "Pod count is derived from CPU usage metric data",
                        "code": 321001
                      }
                    },
                    "metrics_info": {
                      "pod_count": {
                        "avg": 7,
                        "min": 7,
                        "max": 7
                      }
                    },
                    "monitoring_start_time": "2026-06-15T20:25:09.410Z",
                    "recommendation_engines": {
                      "cost": {
                        "pods_count": 7,
                        "confidence_level": 0.0,
                        "config": {
                          "requests": {
                            "cpu": {
                              "amount": 0.9299999999999999,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 0.9299999999999999,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "variation": {
                          "requests": {
                            "cpu": {
                              "amount": -0.17000000000000015,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 187.98999999999998,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 0.42999999999999994,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 138.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "notifications": {}
                      },
                      "performance": {
                        "pods_count": 7,
                        "confidence_level": 0.0,
                        "config": {
                          "requests": {
                            "cpu": {
                              "amount": 0.9299999999999999,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 0.9299999999999999,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "variation": {
                          "requests": {
                            "cpu": {
                              "amount": -0.17000000000000015,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 187.98999999999998,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 0.42999999999999994,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 138.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "notifications": {}
                      }
                    },
                    "plots": {
                      "datapoints": 4,
                      "plots_data": {
                        "2026-06-16T02:25:09.410Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T08:25:09.410Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T14:25:09.410Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T20:25:09.410Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        }
                      }
                    }
                  },
                  "medium_term": {
                    "duration_in_hours": 25.0,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  },
                  "long_term": {
                    "duration_in_hours": 25.0,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  }
                }
              }
            }
          }
        },
        {
          "container_image_name": "kruize/tfb-db:1.15",
          "container_name": "tfb-server-0",
          "recommendations": {
            "version": "v1.0",
            "notifications": {
              "111000": {
                "type": "info",
                "message": "Recommendations Are Available",
                "code": 111000
              }
            },
            "data": {
              "2026-06-16T20:25:09.410Z": {
                "notifications": {
                  "111101": {
                    "type": "info",
                    "message": "Short Term Recommendations Available",
                    "code": 111101
                  }
                },
                "monitoring_end_time": "2026-06-16T20:25:09.410Z",
                "current": {
                  "replicas": 5,
                  "requests": {
                    "cpu": {
                      "amount": 2.1,
                      "format": "cores"
                    },
                    "memory": {
                      "amount": 50.21,
                      "format": "MiB"
                    }
                  },
                  "limits": {
                    "cpu": {
                      "amount": 1.5,
                      "format": "cores"
                    },
                    "memory": {
                      "amount": 100.0,
                      "format": "MiB"
                    }
                  }
                },
                "recommendation_terms": {
                  "short_term": {
                    "duration_in_hours": 24.0,
                    "notifications": {
                      "112101": {
                        "type": "info",
                        "message": "Cost Recommendations Available",
                        "code": 112101
                      },
                      "112102": {
                        "type": "info",
                        "message": "Performance Recommendations Available",
                        "code": 112102
                      },
                      "321001": {
                        "type": "notice",
                        "message": "Pod count is derived from CPU usage metric data",
                        "code": 321001
                      }
                    },
                    "metrics_info": {
                      "pod_count": {
                        "avg": 5,
                        "min": 5,
                        "max": 5
                      }
                    },
                    "monitoring_start_time": "2026-06-15T20:25:09.410Z",
                    "recommendation_engines": {
                      "cost": {
                        "pods_count": 5,
                        "confidence_level": 0.0,
                        "config": {
                          "requests": {
                            "cpu": {
                              "amount": 1.03,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 1.03,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "variation": {
                          "requests": {
                            "cpu": {
                              "amount": -1.07,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 187.98999999999998,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": -0.47,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 138.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "notifications": {}
                      },
                      "performance": {
                        "pods_count": 5,
                        "confidence_level": 0.0,
                        "config": {
                          "requests": {
                            "cpu": {
                              "amount": 1.03,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 1.03,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "variation": {
                          "requests": {
                            "cpu": {
                              "amount": -1.07,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 187.98999999999998,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": -0.47,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 138.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "notifications": {}
                      }
                    },
                    "plots": {
                      "datapoints": 4,
                      "plots_data": {
                        "2026-06-16T02:25:09.410Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T08:25:09.410Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T14:25:09.410Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T20:25:09.410Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        }
                      }
                    }
                  },
                  "medium_term": {
                    "duration_in_hours": 25.0,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  },
                  "long_term": {
                    "duration_in_hours": 25.0,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  }
                }
              }
            }
          }
        }
      ]
    }
  ],
  "version": "v3.0",
  "experiment_name": "quarkus-resteasy-kruize-min-http-response-time-db_0"
}
]

Signed-off-by: Bhaktavatsal Reddy <bhamaram@in.ibm.com>
@mbvreddy

Copy link
Copy Markdown
Contributor Author
GET kruize/api/v1/recommendations

Your Hidden Content Here

  • You can include bullet points.
  • You can also include code blocks or logs:
root@kruize01:~/workarea/github/autotune/tests/scripts/remote_monitoring_tests/rest_apis# curl 'http://172.18.0.2:31116/kruize/api/v1/recommendations?rm=true&experiment_name=quarkus-resteasy-kruize-min-http-response-time-db_0'
[
{
  "cluster_name": "cluster-one-division-bell",
  "experiment_type": "container",
  "kubernetes_objects": [
    {
      "type": "deployment",
      "name": "tfb-qrh-deployment_0",
      "namespace": "default_0",
      "containers": [
        {
          "container_image_name": "kruize/tfb-qrh:1.13.2.F_et17",
          "container_name": "tfb-server-1",
          "recommendations": {
            "version": "1.0",
            "notifications": {
              "111000": {
                "type": "info",
                "message": "Recommendations Are Available",
                "code": 111000
              }
            },
            "data": {
              "2026-06-16T21:03:19.866Z": {
                "notifications": {
                  "111101": {
                    "type": "info",
                    "message": "Short Term Recommendations Available",
                    "code": 111101
                  }
                },
                "monitoring_end_time": "2026-06-16T21:03:19.866Z",
                "current": {
                  "replicas": 7,
                  "resources": {
                    "requests": {
                      "cpu": {
                        "amount": 1.1,
                        "format": "cores"
                      },
                      "memory": {
                        "amount": 50.21,
                        "format": "MiB"
                      }
                    },
                    "limits": {
                      "cpu": {
                        "amount": 0.5,
                        "format": "cores"
                      },
                      "memory": {
                        "amount": 100.0,
                        "format": "MiB"
                      }
                    }
                  }
                },
                "recommendation_terms": {
                  "short_term": {
                    "duration_in_hours": 24.0,
                    "notifications": {
                      "112101": {
                        "type": "info",
                        "message": "Cost Recommendations Available",
                        "code": 112101
                      },
                      "112102": {
                        "type": "info",
                        "message": "Performance Recommendations Available",
                        "code": 112102
                      },
                      "321001": {
                        "type": "notice",
                        "message": "Pod count is derived from CPU usage metric data",
                        "code": 321001
                      }
                    },
                    "metrics_info": {
                      "pod_count": {
                        "avg": 7,
                        "min": 7,
                        "max": 7
                      }
                    },
                    "monitoring_start_time": "2026-06-15T21:03:19.866Z",
                    "recommendation_engines": {
                      "cost": {
                        "pods_count": 7,
                        "confidence_level": 0.0,
                        "config": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": 0.9299999999999999,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 0.9299999999999999,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "variation": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": -0.17000000000000015,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 187.98999999999998,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 0.42999999999999994,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 138.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "notifications": {}
                      },
                      "performance": {
                        "pods_count": 7,
                        "confidence_level": 0.0,
                        "config": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": 0.9299999999999999,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 0.9299999999999999,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "variation": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": -0.17000000000000015,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 187.98999999999998,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 0.42999999999999994,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 138.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "notifications": {}
                      }
                    },
                    "plots": {
                      "datapoints": 4,
                      "plots_data": {
                        "2026-06-16T03:03:19.866Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T09:03:19.866Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T15:03:19.866Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T21:03:19.866Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        }
                      }
                    }
                  },
                  "medium_term": {
                    "duration_in_hours": 25.0,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  },
                  "long_term": {
                    "duration_in_hours": 25.0,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  }
                }
              }
            }
          }
        },
        {
          "container_image_name": "kruize/tfb-db:1.15",
          "container_name": "tfb-server-0",
          "recommendations": {
            "version": "1.0",
            "notifications": {
              "111000": {
                "type": "info",
                "message": "Recommendations Are Available",
                "code": 111000
              }
            },
            "data": {
              "2026-06-16T21:03:19.866Z": {
                "notifications": {
                  "111101": {
                    "type": "info",
                    "message": "Short Term Recommendations Available",
                    "code": 111101
                  }
                },
                "monitoring_end_time": "2026-06-16T21:03:19.866Z",
                "current": {
                  "replicas": 5,
                  "resources": {
                    "requests": {
                      "cpu": {
                        "amount": 2.1,
                        "format": "cores"
                      },
                      "memory": {
                        "amount": 50.21,
                        "format": "MiB"
                      }
                    },
                    "limits": {
                      "cpu": {
                        "amount": 1.5,
                        "format": "cores"
                      },
                      "memory": {
                        "amount": 100.0,
                        "format": "MiB"
                      }
                    }
                  }
                },
                "recommendation_terms": {
                  "short_term": {
                    "duration_in_hours": 24.0,
                    "notifications": {
                      "112101": {
                        "type": "info",
                        "message": "Cost Recommendations Available",
                        "code": 112101
                      },
                      "112102": {
                        "type": "info",
                        "message": "Performance Recommendations Available",
                        "code": 112102
                      },
                      "321001": {
                        "type": "notice",
                        "message": "Pod count is derived from CPU usage metric data",
                        "code": 321001
                      }
                    },
                    "metrics_info": {
                      "pod_count": {
                        "avg": 5,
                        "min": 5,
                        "max": 5
                      }
                    },
                    "monitoring_start_time": "2026-06-15T21:03:19.866Z",
                    "recommendation_engines": {
                      "cost": {
                        "pods_count": 5,
                        "confidence_level": 0.0,
                        "config": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": 1.03,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 1.03,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "variation": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": -1.07,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 187.98999999999998,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": -0.47,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 138.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "notifications": {}
                      },
                      "performance": {
                        "pods_count": 5,
                        "confidence_level": 0.0,
                        "config": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": 1.03,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 1.03,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "variation": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": -1.07,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 187.98999999999998,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": -0.47,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 138.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "notifications": {}
                      }
                    },
                    "plots": {
                      "datapoints": 4,
                      "plots_data": {
                        "2026-06-16T03:03:19.866Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T09:03:19.866Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T15:03:19.866Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T21:03:19.866Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        }
                      }
                    }
                  },
                  "medium_term": {
                    "duration_in_hours": 25.0,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  },
                  "long_term": {
                    "duration_in_hours": 25.0,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  }
                }
              }
            }
          }
        }
      ]
    }
  ],
  "version": "v1.0",
  "experiment_name": "quarkus-resteasy-kruize-min-http-response-time-db_0"
}
]
POST kruize/api/v1/recommendations

Your Hidden Content Here

  • You can include bullet points.
  • You can also include code blocks or logs:
root@kruize01:~/workarea/github/autotune/tests/scripts/remote_monitoring_tests/rest_apis# curl -X POST 'http://172.18.0.2:31116/kruize/api/v1/recommendations?rm=true&experiment_name=quarkus-resteasy-kruize-min-http-response-time-db_0&interval_end_time=2026-06-16T20:19:35.661Z'
[
{
  "cluster_name": "cluster-one-division-bell",
  "experiment_type": "container",
  "kubernetes_objects": [
    {
      "type": "deployment",
      "name": "tfb-qrh-deployment_0",
      "namespace": "default_0",
      "containers": [
        {
          "container_image_name": "kruize/tfb-qrh:1.13.2.F_et17",
          "container_name": "tfb-server-1",
          "recommendations": {
            "version": "1.0",
            "notifications": {
              "111000": {
                "type": "info",
                "message": "Recommendations Are Available",
                "code": 111000
              }
            },
            "data": {
              "2026-06-16T20:18:19.866Z": {
                "notifications": {
                  "111101": {
                    "type": "info",
                    "message": "Short Term Recommendations Available",
                    "code": 111101
                  }
                },
                "monitoring_end_time": "2026-06-16T20:18:19.866Z",
                "current": {
                  "replicas": 7,
                  "resources": {
                    "requests": {
                      "cpu": {
                        "amount": 1.1,
                        "format": "cores"
                      },
                      "memory": {
                        "amount": 50.21,
                        "format": "MiB"
                      }
                    },
                    "limits": {
                      "cpu": {
                        "amount": 0.5,
                        "format": "cores"
                      },
                      "memory": {
                        "amount": 100.0,
                        "format": "MiB"
                      }
                    }
                  }
                },
                "recommendation_terms": {
                  "short_term": {
                    "duration_in_hours": 24.0,
                    "notifications": {
                      "112101": {
                        "type": "info",
                        "message": "Cost Recommendations Available",
                        "code": 112101
                      },
                      "112102": {
                        "type": "info",
                        "message": "Performance Recommendations Available",
                        "code": 112102
                      },
                      "321001": {
                        "type": "notice",
                        "message": "Pod count is derived from CPU usage metric data",
                        "code": 321001
                      }
                    },
                    "metrics_info": {
                      "pod_count": {
                        "avg": 7,
                        "min": 7,
                        "max": 7
                      }
                    },
                    "monitoring_start_time": "2026-06-15T20:18:19.866Z",
                    "recommendation_engines": {
                      "cost": {
                        "pods_count": 7,
                        "confidence_level": 0.0,
                        "config": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": 0.9299999999999999,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 0.9299999999999999,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "variation": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": -0.17000000000000015,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 187.98999999999998,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 0.42999999999999994,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 138.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "notifications": {}
                      },
                      "performance": {
                        "pods_count": 7,
                        "confidence_level": 0.0,
                        "config": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": 0.9299999999999999,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 0.9299999999999999,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "variation": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": -0.17000000000000015,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 187.98999999999998,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 0.42999999999999994,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 138.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "notifications": {}
                      }
                    },
                    "plots": {
                      "datapoints": 4,
                      "plots_data": {
                        "2026-06-16T20:18:19.866Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T08:18:19.866Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T14:18:19.866Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T02:18:19.866Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        }
                      }
                    }
                  },
                  "medium_term": {
                    "duration_in_hours": 24.25,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  },
                  "long_term": {
                    "duration_in_hours": 24.25,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  }
                }
              }
            }
          }
        },
        {
          "container_image_name": "kruize/tfb-db:1.15",
          "container_name": "tfb-server-0",
          "recommendations": {
            "version": "1.0",
            "notifications": {
              "111000": {
                "type": "info",
                "message": "Recommendations Are Available",
                "code": 111000
              }
            },
            "data": {
              "2026-06-16T20:18:19.866Z": {
                "notifications": {
                  "111101": {
                    "type": "info",
                    "message": "Short Term Recommendations Available",
                    "code": 111101
                  }
                },
                "monitoring_end_time": "2026-06-16T20:18:19.866Z",
                "current": {
                  "replicas": 5,
                  "resources": {
                    "requests": {
                      "cpu": {
                        "amount": 2.1,
                        "format": "cores"
                      },
                      "memory": {
                        "amount": 50.21,
                        "format": "MiB"
                      }
                    },
                    "limits": {
                      "cpu": {
                        "amount": 1.5,
                        "format": "cores"
                      },
                      "memory": {
                        "amount": 100.0,
                        "format": "MiB"
                      }
                    }
                  }
                },
                "recommendation_terms": {
                  "short_term": {
                    "duration_in_hours": 24.0,
                    "notifications": {
                      "112101": {
                        "type": "info",
                        "message": "Cost Recommendations Available",
                        "code": 112101
                      },
                      "112102": {
                        "type": "info",
                        "message": "Performance Recommendations Available",
                        "code": 112102
                      },
                      "321001": {
                        "type": "notice",
                        "message": "Pod count is derived from CPU usage metric data",
                        "code": 321001
                      }
                    },
                    "metrics_info": {
                      "pod_count": {
                        "avg": 5,
                        "min": 5,
                        "max": 5
                      }
                    },
                    "monitoring_start_time": "2026-06-15T20:18:19.866Z",
                    "recommendation_engines": {
                      "cost": {
                        "pods_count": 5,
                        "confidence_level": 0.0,
                        "config": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": 1.03,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 1.03,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "variation": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": -1.07,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 187.98999999999998,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": -0.47,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 138.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "notifications": {}
                      },
                      "performance": {
                        "pods_count": 5,
                        "confidence_level": 0.0,
                        "config": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": 1.03,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": 1.03,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 238.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "variation": {
                          "resources": {
                            "requests": {
                              "cpu": {
                                "amount": -1.07,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 187.98999999999998,
                                "format": "MiB"
                              }
                            },
                            "limits": {
                              "cpu": {
                                "amount": -0.47,
                                "format": "cores"
                              },
                              "memory": {
                                "amount": 138.2,
                                "format": "MiB"
                              }
                            }
                          }
                        },
                        "notifications": {}
                      }
                    },
                    "plots": {
                      "datapoints": 4,
                      "plots_data": {
                        "2026-06-16T20:18:19.866Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T08:18:19.866Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T14:18:19.866Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T02:18:19.866Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        }
                      }
                    }
                  },
                  "medium_term": {
                    "duration_in_hours": 24.25,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  },
                  "long_term": {
                    "duration_in_hours": 24.25,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  }
                }
              }
            }
          }
        }
      ]
    }
  ],
  "version": "v1.0",
  "experiment_name": "quarkus-resteasy-kruize-min-http-response-time-db_0"
}
]
POST /updateRecommendations

Your Hidden Content Here

  • You can include bullet points.
  • You can also include code blocks or logs:
root@kruize01:~/workarea/github/autotune/tests/scripts/remote_monitoring_tests/rest_apis# curl -X POST 'http://172.18.0.2:31116/updateRecommendations?experiment_name=quarkus-resteasy-kruize-min-http-response-time-db_0&interval_end_time=2026-06-16T20:19:35.661Z'

[
{
  "cluster_name": "cluster-one-division-bell",
  "experiment_type": "container",
  "kubernetes_objects": [
    {
      "type": "deployment",
      "name": "tfb-qrh-deployment_0",
      "namespace": "default_0",
      "containers": [
        {
          "container_image_name": "kruize/tfb-qrh:1.13.2.F_et17",
          "container_name": "tfb-server-1",
          "recommendations": {
            "version": "1.0",
            "notifications": {
              "111000": {
                "type": "info",
                "message": "Recommendations Are Available",
                "code": 111000
              }
            },
            "data": {
              "2026-06-16T20:18:19.866Z": {
                "notifications": {
                  "111101": {
                    "type": "info",
                    "message": "Short Term Recommendations Available",
                    "code": 111101
                  }
                },
                "monitoring_end_time": "2026-06-16T20:18:19.866Z",
                "current": {
                  "replicas": 7,
                  "requests": {
                    "cpu": {
                      "amount": 1.1,
                      "format": "cores"
                    },
                    "memory": {
                      "amount": 50.21,
                      "format": "MiB"
                    }
                  },
                  "limits": {
                    "cpu": {
                      "amount": 0.5,
                      "format": "cores"
                    },
                    "memory": {
                      "amount": 100.0,
                      "format": "MiB"
                    }
                  }
                },
                "recommendation_terms": {
                  "short_term": {
                    "duration_in_hours": 24.0,
                    "notifications": {
                      "112101": {
                        "type": "info",
                        "message": "Cost Recommendations Available",
                        "code": 112101
                      },
                      "112102": {
                        "type": "info",
                        "message": "Performance Recommendations Available",
                        "code": 112102
                      },
                      "321001": {
                        "type": "notice",
                        "message": "Pod count is derived from CPU usage metric data",
                        "code": 321001
                      }
                    },
                    "metrics_info": {
                      "pod_count": {
                        "avg": 7,
                        "min": 7,
                        "max": 7
                      }
                    },
                    "monitoring_start_time": "2026-06-15T20:18:19.866Z",
                    "recommendation_engines": {
                      "cost": {
                        "pods_count": 7,
                        "confidence_level": 0.0,
                        "config": {
                          "requests": {
                            "cpu": {
                              "amount": 0.9299999999999999,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 0.9299999999999999,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "variation": {
                          "requests": {
                            "cpu": {
                              "amount": -0.17000000000000015,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 187.98999999999998,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 0.42999999999999994,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 138.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "notifications": {}
                      },
                      "performance": {
                        "pods_count": 7,
                        "confidence_level": 0.0,
                        "config": {
                          "requests": {
                            "cpu": {
                              "amount": 0.9299999999999999,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 0.9299999999999999,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "variation": {
                          "requests": {
                            "cpu": {
                              "amount": -0.17000000000000015,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 187.98999999999998,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 0.42999999999999994,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 138.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "notifications": {}
                      }
                    },
                    "plots": {
                      "datapoints": 4,
                      "plots_data": {
                        "2026-06-16T20:18:19.866Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T08:18:19.866Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T14:18:19.866Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T02:18:19.866Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        }
                      }
                    }
                  },
                  "medium_term": {
                    "duration_in_hours": 24.25,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  },
                  "long_term": {
                    "duration_in_hours": 24.25,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  }
                }
              }
            }
          }
        },
        {
          "container_image_name": "kruize/tfb-db:1.15",
          "container_name": "tfb-server-0",
          "recommendations": {
            "version": "1.0",
            "notifications": {
              "111000": {
                "type": "info",
                "message": "Recommendations Are Available",
                "code": 111000
              }
            },
            "data": {
              "2026-06-16T20:18:19.866Z": {
                "notifications": {
                  "111101": {
                    "type": "info",
                    "message": "Short Term Recommendations Available",
                    "code": 111101
                  }
                },
                "monitoring_end_time": "2026-06-16T20:18:19.866Z",
                "current": {
                  "replicas": 5,
                  "requests": {
                    "cpu": {
                      "amount": 2.1,
                      "format": "cores"
                    },
                    "memory": {
                      "amount": 50.21,
                      "format": "MiB"
                    }
                  },
                  "limits": {
                    "cpu": {
                      "amount": 1.5,
                      "format": "cores"
                    },
                    "memory": {
                      "amount": 100.0,
                      "format": "MiB"
                    }
                  }
                },
                "recommendation_terms": {
                  "short_term": {
                    "duration_in_hours": 24.0,
                    "notifications": {
                      "112101": {
                        "type": "info",
                        "message": "Cost Recommendations Available",
                        "code": 112101
                      },
                      "112102": {
                        "type": "info",
                        "message": "Performance Recommendations Available",
                        "code": 112102
                      },
                      "321001": {
                        "type": "notice",
                        "message": "Pod count is derived from CPU usage metric data",
                        "code": 321001
                      }
                    },
                    "metrics_info": {
                      "pod_count": {
                        "avg": 5,
                        "min": 5,
                        "max": 5
                      }
                    },
                    "monitoring_start_time": "2026-06-15T20:18:19.866Z",
                    "recommendation_engines": {
                      "cost": {
                        "pods_count": 5,
                        "confidence_level": 0.0,
                        "config": {
                          "requests": {
                            "cpu": {
                              "amount": 1.03,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 1.03,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "variation": {
                          "requests": {
                            "cpu": {
                              "amount": -1.07,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 187.98999999999998,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": -0.47,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 138.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "notifications": {}
                      },
                      "performance": {
                        "pods_count": 5,
                        "confidence_level": 0.0,
                        "config": {
                          "requests": {
                            "cpu": {
                              "amount": 1.03,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 1.03,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "variation": {
                          "requests": {
                            "cpu": {
                              "amount": -1.07,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 187.98999999999998,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": -0.47,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 138.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "notifications": {}
                      }
                    },
                    "plots": {
                      "datapoints": 4,
                      "plots_data": {
                        "2026-06-16T20:18:19.866Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T08:18:19.866Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T14:18:19.866Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T02:18:19.866Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        }
                      }
                    }
                  },
                  "medium_term": {
                    "duration_in_hours": 24.25,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  },
                  "long_term": {
                    "duration_in_hours": 24.25,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  }
                }
              }
            }
          }
        }
      ]
    }
  ],
  "version": "v3.0",
  "experiment_name": "quarkus-resteasy-kruize-min-http-response-time-db_0"
}
]
GET /listRecommendations

Your Hidden Content Here

  • You can include bullet points.
  • You can also include code blocks or logs:
root@kruize01:~/workarea/github/autotune/tests/scripts/remote_monitoring_tests/rest_apis# curl 'http://172.18.0.2:31116/listRecommendations?rm=true&experiment_name=quarkus-resteasy-kruize-min-http-response-time-db_0'
[
{
  "cluster_name": "cluster-one-division-bell",
  "experiment_type": "container",
  "kubernetes_objects": [
    {
      "type": "deployment",
      "name": "tfb-qrh-deployment_0",
      "namespace": "default_0",
      "containers": [
        {
          "container_image_name": "kruize/tfb-qrh:1.13.2.F_et17",
          "container_name": "tfb-server-1",
          "recommendations": {
            "version": "1.0",
            "notifications": {
              "111000": {
                "type": "info",
                "message": "Recommendations Are Available",
                "code": 111000
              }
            },
            "data": {
              "2026-06-16T21:03:19.866Z": {
                "notifications": {
                  "111101": {
                    "type": "info",
                    "message": "Short Term Recommendations Available",
                    "code": 111101
                  }
                },
                "monitoring_end_time": "2026-06-16T21:03:19.866Z",
                "current": {
                  "replicas": 7,
                  "requests": {
                    "cpu": {
                      "amount": 1.1,
                      "format": "cores"
                    },
                    "memory": {
                      "amount": 50.21,
                      "format": "MiB"
                    }
                  },
                  "limits": {
                    "cpu": {
                      "amount": 0.5,
                      "format": "cores"
                    },
                    "memory": {
                      "amount": 100.0,
                      "format": "MiB"
                    }
                  }
                },
                "recommendation_terms": {
                  "short_term": {
                    "duration_in_hours": 24.0,
                    "notifications": {
                      "112101": {
                        "type": "info",
                        "message": "Cost Recommendations Available",
                        "code": 112101
                      },
                      "112102": {
                        "type": "info",
                        "message": "Performance Recommendations Available",
                        "code": 112102
                      },
                      "321001": {
                        "type": "notice",
                        "message": "Pod count is derived from CPU usage metric data",
                        "code": 321001
                      }
                    },
                    "metrics_info": {
                      "pod_count": {
                        "avg": 7,
                        "min": 7,
                        "max": 7
                      }
                    },
                    "monitoring_start_time": "2026-06-15T21:03:19.866Z",
                    "recommendation_engines": {
                      "cost": {
                        "pods_count": 7,
                        "confidence_level": 0.0,
                        "config": {
                          "requests": {
                            "cpu": {
                              "amount": 0.9299999999999999,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 0.9299999999999999,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "variation": {
                          "requests": {
                            "cpu": {
                              "amount": -0.17000000000000015,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 187.98999999999998,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 0.42999999999999994,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 138.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "notifications": {}
                      },
                      "performance": {
                        "pods_count": 7,
                        "confidence_level": 0.0,
                        "config": {
                          "requests": {
                            "cpu": {
                              "amount": 0.9299999999999999,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 0.9299999999999999,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "variation": {
                          "requests": {
                            "cpu": {
                              "amount": -0.17000000000000015,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 187.98999999999998,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 0.42999999999999994,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 138.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "notifications": {}
                      }
                    },
                    "plots": {
                      "datapoints": 4,
                      "plots_data": {
                        "2026-06-16T03:03:19.866Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T09:03:19.866Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T15:03:19.866Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T21:03:19.866Z": {
                          "cpuUsage": {
                            "min": 0.14,
                            "q1": 0.9299999999999999,
                            "median": 0.9299999999999999,
                            "q3": 0.9299999999999999,
                            "max": 0.9299999999999999,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 28.357142857142858,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        }
                      }
                    }
                  },
                  "medium_term": {
                    "duration_in_hours": 25.0,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  },
                  "long_term": {
                    "duration_in_hours": 25.0,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  }
                }
              }
            }
          }
        },
        {
          "container_image_name": "kruize/tfb-db:1.15",
          "container_name": "tfb-server-0",
          "recommendations": {
            "version": "1.0",
            "notifications": {
              "111000": {
                "type": "info",
                "message": "Recommendations Are Available",
                "code": 111000
              }
            },
            "data": {
              "2026-06-16T21:03:19.866Z": {
                "notifications": {
                  "111101": {
                    "type": "info",
                    "message": "Short Term Recommendations Available",
                    "code": 111101
                  }
                },
                "monitoring_end_time": "2026-06-16T21:03:19.866Z",
                "current": {
                  "replicas": 5,
                  "requests": {
                    "cpu": {
                      "amount": 2.1,
                      "format": "cores"
                    },
                    "memory": {
                      "amount": 50.21,
                      "format": "MiB"
                    }
                  },
                  "limits": {
                    "cpu": {
                      "amount": 1.5,
                      "format": "cores"
                    },
                    "memory": {
                      "amount": 100.0,
                      "format": "MiB"
                    }
                  }
                },
                "recommendation_terms": {
                  "short_term": {
                    "duration_in_hours": 24.0,
                    "notifications": {
                      "112101": {
                        "type": "info",
                        "message": "Cost Recommendations Available",
                        "code": 112101
                      },
                      "112102": {
                        "type": "info",
                        "message": "Performance Recommendations Available",
                        "code": 112102
                      },
                      "321001": {
                        "type": "notice",
                        "message": "Pod count is derived from CPU usage metric data",
                        "code": 321001
                      }
                    },
                    "metrics_info": {
                      "pod_count": {
                        "avg": 5,
                        "min": 5,
                        "max": 5
                      }
                    },
                    "monitoring_start_time": "2026-06-15T21:03:19.866Z",
                    "recommendation_engines": {
                      "cost": {
                        "pods_count": 5,
                        "confidence_level": 0.0,
                        "config": {
                          "requests": {
                            "cpu": {
                              "amount": 1.03,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 1.03,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "variation": {
                          "requests": {
                            "cpu": {
                              "amount": -1.07,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 187.98999999999998,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": -0.47,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 138.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "notifications": {}
                      },
                      "performance": {
                        "pods_count": 5,
                        "confidence_level": 0.0,
                        "config": {
                          "requests": {
                            "cpu": {
                              "amount": 1.03,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": 1.03,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 238.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "variation": {
                          "requests": {
                            "cpu": {
                              "amount": -1.07,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 187.98999999999998,
                              "format": "MiB"
                            }
                          },
                          "limits": {
                            "cpu": {
                              "amount": -0.47,
                              "format": "cores"
                            },
                            "memory": {
                              "amount": 138.2,
                              "format": "MiB"
                            }
                          }
                        },
                        "notifications": {}
                      }
                    },
                    "plots": {
                      "datapoints": 4,
                      "plots_data": {
                        "2026-06-16T03:03:19.866Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T09:03:19.866Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T15:03:19.866Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        },
                        "2026-06-16T21:03:19.866Z": {
                          "cpuUsage": {
                            "min": 0.3276923076923076,
                            "q1": 1.03,
                            "median": 1.03,
                            "q3": 1.03,
                            "max": 1.03,
                            "format": "cores"
                          },
                          "memoryUsage": {
                            "min": 50.6,
                            "q1": 198.5,
                            "median": 198.5,
                            "q3": 198.5,
                            "max": 198.5,
                            "format": "MiB"
                          }
                        }
                      }
                    }
                  },
                  "medium_term": {
                    "duration_in_hours": 25.0,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  },
                  "long_term": {
                    "duration_in_hours": 25.0,
                    "notifications": {
                      "120001": {
                        "type": "info",
                        "message": "There is not enough data available to generate a recommendation.",
                        "code": 120001
                      }
                    }
                  }
                }
              }
            }
          }
        }
      ]
    }
  ],
  "version": "v3.0",
  "experiment_name": "quarkus-resteasy-kruize-min-http-response-time-db_0"
}
]

@rbadagandi1 rbadagandi1 moved this to Under Review in Monitoring Jun 15, 2026
@mbvreddy mbvreddy requested a review from khansaad June 16, 2026 04:53
Signed-off-by: Bhaktavatsal Reddy <bhamaram@in.ibm.com>
Comment thread src/main/java/com/autotune/analyzer/services/RecommendationsResource.java Outdated
Comment thread src/main/java/com/autotune/utils/MetricsConfig.java Outdated
Comment thread src/main/java/com/autotune/utils/MetricsConfig.java Outdated
mbvreddy added 2 commits June 17, 2026 19:16
Signed-off-by: Bhaktavatsal Reddy <bhamaram@in.ibm.com>
Signed-off-by: Bhaktavatsal Reddy <bhamaram@in.ibm.com>

@khansaad khansaad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dinogun

dinogun commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

@mbvreddy Can you please address the two sourcery comments, they are critical

@mbvreddy mbvreddy requested a review from dinogun June 18, 2026 17:30
@mbvreddy

Copy link
Copy Markdown
Contributor Author

ok @dinogun

Signed-off-by: Bhaktavatsal Reddy <bhamaram@in.ibm.com>
for (ContainerAPIObject containerAPIObject : kubernetesAPIObject.getContainerAPIObjects()) {
ContainerRecommendations recommendations = containerAPIObject.getContainerRecommendations();
if (recommendations != null) {
processRecommendations(recommendations.getData().values());

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getData() can still be null for both getContainerRecommendations() and getNamespaceRecommendations(). Better would be to check

if (recommendations != null && recommendations.getData() != null) {
     processRecommendations(recommendations.getData().values();
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dinogun made changes. Please review

Signed-off-by: Bhaktavatsal Reddy <bhamaram@in.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request remote_monitoring

Projects

Status: Under Review

Development

Successfully merging this pull request may close these issues.

4 participants