Skip to main content

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 as spike, 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.

FieldTypeDescription
windowobjectThe windows the signals use, as inclusive YYYY-MM-DD UTC days.
window.fromstring (date)
window.tostring (date)
window.previousFromstring (date)
window.previousTostring (date)
spikearray of objectWorkloads whose cost grew the most against the previous window.
spike[].namestringWorkload name.
spike[].typestringWorkload type.
spike[].workloadCountnumberNumber of workloads with this name and type in the signal (one per cluster or namespace).
spike[].costnumberCost in the current window.
spike[].previousCostnumberCost in the previous window.
spike[].dollarChangenumbercost minus previousCost.
spike[].changenumberPercent change from previousCost to cost.
newarray of objectWorkloads first seen recently with real cost. Empty while newAvailableFrom is set.
new[].namestringWorkload name.
new[].typestringWorkload type.
new[].workloadCountnumberNumber of workloads with this name and type in the signal.
new[].costnumberCost in the current window.
new[].firstSeenstring (date)First UTC day with cost.
networkarray of objectWorkloads whose network cost grew the most against the previous window. Same fields as spike, with network cost values.
network[].namestringWorkload name.
network[].typestringWorkload type.
network[].workloadCountnumberNumber of workloads with this name and type in the signal (one per cluster or namespace).
network[].costnumberCost in the current window.
network[].previousCostnumberCost in the previous window.
network[].dollarChangenumbercost minus previousCost.
network[].changenumberPercent change from previousCost to cost.
newAvailableFromstring (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.
thresholdsobjectThe rules used for the three lists.
thresholds.windowDaysnumberLength of the current and of the previous window, in days.
thresholds.firstSeenDaysnumberA workload is new when its first day with cost is at most this many days back.
thresholds.spikeobjectRules for a growth list (spike on cost, network on network cost).
thresholds.spike.minPreviousCostnumber
thresholds.spike.minDollarChangenumber
thresholds.spike.minChangePercentnumber
thresholds.newobject
thresholds.new.minCostnumber
thresholds.networkobjectRules for a growth list (spike on cost, network on network cost).
thresholds.network.minPreviousCostnumber
thresholds.network.minDollarChangenumber
thresholds.network.minChangePercentnumber
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 statusExit codeError codeMeaning
40030VALIDATION_ERRORThe arguments or request body were rejected. Review the command's flags and payload.
40110AUTHENTICATION_FAILEDNot signed in, or the API token is invalid. Run dci login or check DCI_API_KEY.
40311PERMISSION_DENIEDThe DoiT user or the active customer context does not have access.
40420RESOURCE_NOT_FOUNDThe requested resource does not exist. Check the identifier argument.
40921RESOURCE_CONFLICTThe operation conflicts with the resource's current state.
500, 502, 50340API_SERVER_ERRORThe API failed to process the request. Retryable; contact DoiT support if it persists.

Aliases: getattributeworkloadssignals