get-attribute-workloads-signals
dci get-attribute-workloads-signals
Returns three lists of workloads that need attention, grouped by workload name and type. Each list has every workload that meets its rules, ranked:
spike: cost grew a lot against the week before.new: workloads first seen in the last two weeks with real cost.network: network cost grew a lot against the week before (the same rules asspike, applied to network cost).
The windows are fixed UTC days and do not depend on any date range: the current window is
today minus 8 days to today minus 2 days, and the previous window is the 7 days before it.
window and thresholds in the response give the exact dates and rules. Use this for
"what changed" or "what should I look at". To get the matching rows or totals over your own
date range, pass signal=spike|new|network to queryAttributeWorkloadsTable,
queryAttributeWorkloadsStats or queryAttributeWorkloadsOverTime.
Freemium customers (no paid Attribute plan) see network cost only, so all three lists use network cost for them.
Authenticate with Authorization: Bearer <token>. Omit X-Tenant-Id when the credential
resolves to one customer. When the credential can act on several customers, send
X-Tenant-Id: <tenant-id> to select one.
Output
OK - The three signal lists, their windows and thresholds.
By default dci renders the result as a table. Use --output json to get the full structure described below — see Output formats.
| Field | Type | Description |
|---|---|---|
window | object | The windows the signals use, as inclusive YYYY-MM-DD UTC days. |
window.from | string (date) | |
window.to | string (date) | |
window.previousFrom | string (date) | |
window.previousTo | string (date) | |
spike | array of object | Workloads whose cost grew the most against the previous window. |
spike[].name | string | Workload name. |
spike[].type | string | Workload type. |
spike[].workloadCount | number | Number of workloads with this name and type in the signal (one per cluster or namespace). |
spike[].cost | number | Cost in the current window. |
spike[].previousCost | number | Cost in the previous window. |
spike[].dollarChange | number | cost minus previousCost. |
spike[].change | number | Percent change from previousCost to cost. |
new | array of object | Workloads first seen recently with real cost. Empty while newAvailableFrom is set. |
new[].name | string | Workload name. |
new[].type | string | Workload type. |
new[].workloadCount | number | Number of workloads with this name and type in the signal. |
new[].cost | number | Cost in the current window. |
new[].firstSeen | string (date) | First UTC day with cost. |
network | array of object | Workloads whose network cost grew the most against the previous window. Same fields as spike, with network cost values. |
network[].name | string | Workload name. |
network[].type | string | Workload type. |
network[].workloadCount | number | Number of workloads with this name and type in the signal (one per cluster or namespace). |
network[].cost | number | Cost in the current window. |
network[].previousCost | number | Cost in the previous window. |
network[].dollarChange | number | cost minus previousCost. |
network[].change | number | Percent change from previousCost to cost. |
newAvailableFrom | string (date) | Set when the customer's cost history is still too short for the new signal: the first UTC day new can have entries. Null once there is enough history, or when there is no cost at all. |
thresholds | object | The rules used for the three lists. |
thresholds.windowDays | number | Length of the current and of the previous window, in days. |
thresholds.firstSeenDays | number | A workload is new when its first day with cost is at most this many days back. |
thresholds.spike | object | Rules for a growth list (spike on cost, network on network cost). |
thresholds.spike.minPreviousCost | number | |
thresholds.spike.minDollarChange | number | |
thresholds.spike.minChangePercent | number | |
thresholds.new | object | |
thresholds.new.minCost | number | |
thresholds.network | object | Rules for a growth list (spike on cost, network on network cost). |
thresholds.network.minPreviousCost | number | |
thresholds.network.minDollarChange | number | |
thresholds.network.minChangePercent | number |
Raw JSON schema
{
"type": "object",
"required": [
"window",
"spike",
"new",
"network",
"newAvailableFrom",
"thresholds"
],
"properties": {
"window": {
"type": "object",
"description": "The windows the signals use, as inclusive `YYYY-MM-DD` UTC days.",
"required": [
"from",
"to",
"previousFrom",
"previousTo"
],
"properties": {
"from": {
"type": "string",
"format": "date"
},
"to": {
"type": "string",
"format": "date"
},
"previousFrom": {
"type": "string",
"format": "date"
},
"previousTo": {
"type": "string",
"format": "date"
}
}
},
"spike": {
"type": "array",
"description": "Workloads whose cost grew the most against the previous window.",
"items": {
"type": "object",
"required": [
"name",
"type",
"workloadCount",
"cost",
"previousCost",
"dollarChange",
"change"
],
"properties": {
"name": {
"type": "string",
"description": "Workload name."
},
"type": {
"type": "string",
"nullable": true,
"description": "Workload type."
},
"workloadCount": {
"type": "number",
"description": "Number of workloads with this name and type in the signal (one per cluster or namespace)."
},
"cost": {
"type": "number",
"description": "Cost in the current window."
},
"previousCost": {
"type": "number",
"description": "Cost in the previous window."
},
"dollarChange": {
"type": "number",
"description": "`cost` minus `previousCost`."
},
"change": {
"type": "number",
"description": "Percent change from `previousCost` to `cost`."
}
}
}
},
"new": {
"type": "array",
"description": "Workloads first seen recently with real cost. Empty while `newAvailableFrom` is set.",
"items": {
"type": "object",
"required": [
"name",
"type",
"workloadCount",
"cost",
"firstSeen"
],
"properties": {
"name": {
"type": "string",
"description": "Workload name."
},
"type": {
"type": "string",
"nullable": true,
"description": "Workload type."
},
"workloadCount": {
"type": "number",
"description": "Number of workloads with this name and type in the signal."
},
"cost": {
"type": "number",
"description": "Cost in the current window."
},
"firstSeen": {
"type": "string",
"format": "date",
"description": "First UTC day with cost."
}
}
}
},
"network": {
"type": "array",
"description": "Workloads whose network cost grew the most against the previous window. Same fields as\n`spike`, with network cost values.",
"items": {
"type": "object",
"required": [
"name",
"type",
"workloadCount",
"cost",
"previousCost",
"dollarChange",
"change"
],
"properties": {
"name": {
"type": "string",
"description": "Workload name."
},
"type": {
"type": "string",
"nullable": true,
"description": "Workload type."
},
"workloadCount": {
"type": "number",
"description": "Number of workloads with this name and type in the signal (one per cluster or namespace)."
},
"cost": {
"type": "number",
"description": "Cost in the current window."
},
"previousCost": {
"type": "number",
"description": "Cost in the previous window."
},
"dollarChange": {
"type": "number",
"description": "`cost` minus `previousCost`."
},
"change": {
"type": "number",
"description": "Percent change from `previousCost` to `cost`."
}
}
}
},
"newAvailableFrom": {
"type": "string",
"format": "date",
"nullable": true,
"description": "Set when the customer's cost history is still too short for the `new` signal: the first\nUTC day `new` can have entries. Null once there is enough history, or when there is no\ncost at all."
},
"thresholds": {
"type": "object",
"description": "The rules used for the three lists.",
"required": [
"windowDays",
"firstSeenDays",
"spike",
"new",
"network"
],
"properties": {
"windowDays": {
"type": "number",
"description": "Length of the current and of the previous window, in days."
},
"firstSeenDays": {
"type": "number",
"description": "A workload is new when its first day with cost is at most this many days back."
},
"spike": {
"type": "object",
"description": "Rules for a growth list (`spike` on cost, `network` on network cost).",
"required": [
"minPreviousCost",
"minDollarChange",
"minChangePercent"
],
"properties": {
"minPreviousCost": {
"type": "number"
},
"minDollarChange": {
"type": "number"
},
"minChangePercent": {
"type": "number"
}
}
},
"new": {
"type": "object",
"required": [
"minCost"
],
"properties": {
"minCost": {
"type": "number"
}
}
},
"network": {
"type": "object",
"description": "Rules for a growth list (`spike` on cost, `network` on network cost).",
"required": [
"minPreviousCost",
"minDollarChange",
"minChangePercent"
],
"properties": {
"minPreviousCost": {
"type": "number"
},
"minDollarChange": {
"type": "number"
},
"minChangePercent": {
"type": "number"
}
}
}
}
}
}
}
Errors
On failure, dci prints a single error message — with a hint when one is available — and exits with a typed code your scripts can branch on. See Errors and exit codes for the full contract.
HTTP status to exit code mapping
| HTTP status | Exit code | Error code | Meaning |
|---|---|---|---|
| 400 | 30 | VALIDATION_ERROR | The arguments or request body were rejected. Review the command's flags and payload. |
| 401 | 10 | AUTHENTICATION_FAILED | Not signed in, or the API token is invalid. Run dci login or check DCI_API_KEY. |
| 403 | 11 | PERMISSION_DENIED | The DoiT user or the active customer context does not have access. |
| 404 | 20 | RESOURCE_NOT_FOUND | The requested resource does not exist. Check the identifier argument. |
| 409 | 21 | RESOURCE_CONFLICT | The operation conflicts with the resource's current state. |
| 500, 502, 503 | 40 | API_SERVER_ERROR | The API failed to process the request. Retryable; contact DoiT support if it persists. |
Related
- count-attribute-attribution-sets — Count attributions
- get-attribute-attribution-set — Get one attribution
- get-attribute-workload-details — Get one workload's identity
- get-attribute-workloads-cost-data-status — Check whether workload cost data exists
- list-attribute-attribution-set-versions — List the rule versions of one attribution
- list-attribute-attribution-sets — List attributions
- list-attribute-workload-non-network-resource-types — List one workload's non-network resource types
- list-attribute-workloads-cloud-providers — List the cloud providers that billed workload resources
- list-attribute-workloads-filter-values — List the values of a workload filter field
- list-attribute-workloads-resource-tag-keys — List resource tag keys
- list-attribute-workloads-resource-tag-values — List the values of one resource tag key
- query-attribute-workload-resources-over-time — Get one workload's resource cost over time
- query-attribute-workload-resources-stats — Get one workload's cost totals
- query-attribute-workload-resources-table — List one workload's cloud resources
- query-attribute-workloads-over-time — Get Kubernetes workload cost over time
- query-attribute-workloads-stats — Get Kubernetes workload cost totals
- query-attribute-workloads-table — List Kubernetes workload costs by dimension
- API reference: GET /attribute/v1/workloads/signals
Aliases: getattributeworkloadssignals