Skip to content

View Workload Status

You can check the current status of any workload at any time.

This status will indicate whether the workload is running, stopped, staged, or in another state, and it will also display detailed information about its current configuration, including assigned assets, recommendation definitions, environment variables, and more.

You can only get limited information about the workload from the Kelvin UI.

If the Workload has a staged Workload waiting to be activated then you will be able to expand the row and see details abou the staged Workload.

curl -X "GET" \
    "https://<url.kelvin.ai>/api/v4/workloads/list" \
    -H "Authorization: Bearer <Your Current Token>" \
    -H "Accept: application/json-cursor"

You will get a response similar to this;

{
  "pagination": {
    "next_page": null,
    "previous_page": null
  },
  "data": [
    {
      "name": "pcp-optimization-d1gdvz1gst7n",
      "title": "pcp-optimization-d1gdvz1gst7n",
      "enabled": true,
      "acp_name": "beta-dev-01-cluster",
      "cluster_name": "beta-dev-01-cluster",
      "node_name": "beta-dev-01-cluster",
      "app_name": "pcp-optimization",
      "app_version": "1.0.05221921",
      "created": "2024-05-22T18:27:27.70517Z",
      "updated": "2024-06-13T14:13:18.985888Z",
      "status": {
        "state": "running",
        "message": "Running",
        "last_seen": "2024-06-14T04:57:52.520335503Z",
        "warnings": null
      },
      "download_status": "pending",
      "staged": null
    }
  ]
}
from kelvin.api.client import Client

# Login
client = Client(config={"url": "https://<url.kelvin.ai>", "username": "<your_username>"})
client.login(password="<your_password>")

# Get Workloads List
response = client.workload.list_workloads()

# Convert the response to a Pandas DataFrame
df = response.to_df()
df = df[["node_name", "app_name", "name", "status"]]

# Print the result
print(response)

You will get a response similar to this;

        node_name                             app_name                              name                                             status  
0  sales-01-cluster                  esp-opcua-simulator                  esp-simulator-01  {'last_seen': 2024-08-08 13:47:36.383966+00:00...  
1  sales-01-cluster             azure-data-lake-uploader  azure-data-lake-upl-d2tn05mo5jtl  {'last_seen': 2024-08-08 13:47:36.383966+00:00...  
2  sales-02-cluster                      bp-optimization      bp-optimization-d2l4zq4dtf0h  {'last_seen': 2024-08-08 13:47:39.367366+00:00...  
3  sales-01-cluster  centrifugal-compressor-optimization  centrifugal-comp-f6a52b6e4e72446  {'last_seen': 2024-08-08 13:47:36.383966+00:00...  
4  sales-01-cluster  centrifugal-compressor-optimization  centrifugal-compres-d0kul6e8e6a6  {'last_seen': 2024-08-08 13:47:36.383966+00:00...