---
title: "oz0 tenant spend-alerts"
description: "Usage and flags for oz0 tenant spend-alerts."
canonical_url: "https://docs.oz0.ai/reference/cli/oz0/tenant/spend-alerts"
---
# oz0 tenant spend-alerts

> Usage and flags for oz0 tenant spend-alerts.

For: Operators and developers looking up a command.

People are alerted (event budget.share, through the tenant's notification rules and to the budget's own people) when a budget passes one of its shares, once per budget and period, at the highest share passed.

--tree sets the shares of a job tree's budget (60% to 100%: 50% is only for monthly budgets and quotas), --monthly those of the tenant's monthly budget and of every quota without shares of its own (50% to 100%), and --quota a quota's own (team:\<name>, user:\<name>, * or team:*). A list is up to five shares, as 0.5,0.8,1 or 50%,80%,100%; `default` is [80%, 100%] and `off` turns those alerts off.

These shares are apart from the agent's warn_share (oz0 tenant spend), which only tells an agent to wrap up. The alert at 100% says whether jobs now wait and who decides.

The spend-anomaly finding compares each UTC day's spend with its usual (the median of the last 28 days, or of the same weekday once the tenant has two weeks of history) and opens a finding with the top three drivers by agent, model and plugin when the day is far above it and at least --anomaly-floor dollars (10 by default); --anomaly off turns it off.

Every change takes a reason (--reason or $OZ0_REASON); dropping an alert at 100%, starting a list later, emptying one, raising the floor or turning the finding off loosens, and waits for a second admin where the tenant has four eyes on. Operators may read the setting; admins change it.

## Usage

```bash
oz0 tenant spend-alerts <tenant> [flags]
```

## Flags

<table>
<thead>
  <tr>
    <th>
      Flag
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        --anomaly
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      the daily spend-anomaly finding: on or off
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --anomaly-floor
      </code>
    </td>
    
    <td>
      float
    </td>
    
    <td>
      
    </td>
    
    <td>
      no anomaly finding for a day under this many dollars (0: the default, 10)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --decision-ref
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      the decision or case the change follows, such as a case number (at most 200 characters)
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --json
      </code>
    </td>
    
    <td>
      bool
    </td>
    
    <td>
      
    </td>
    
    <td>
      print JSON instead of a table
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --monthly
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      the shares of the monthly budget and of quotas without their own: a list such as 0.5,0.8,1, default, or off
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --quota
      </code>
    </td>
    
    <td>
      stringArray
    </td>
    
    <td>
      
    </td>
    
    <td>
      a quota's own shares, SUBJECT=LIST, SUBJECT=off or SUBJECT=default (back to the monthly ones); repeatable
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --reason
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      why, required for every governance change (at most 500 characters; default $OZ0_REASON); the audit log keeps it
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --tree
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      
    </td>
    
    <td>
      the shares of a job tree's budget: a list such as 0.8,1, default, or off
    </td>
  </tr>
</tbody>
</table>

## Inherited flags

<table>
<thead>
  <tr>
    <th>
      Flag
    </th>
    
    <th>
      Type
    </th>
    
    <th>
      Default
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        --context
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      <code>
        $OZ0_CONTEXT or &lt;config dir>/orchestrator-zero/context.json
      </code>
    </td>
    
    <td>
      CLI context file written by server init
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --log-level
      </code>
    </td>
    
    <td>
      string
    </td>
    
    <td>
      <code>
        info
      </code>
    </td>
    
    <td>
      log level: debug, info, warn or error
    </td>
  </tr>
</tbody>
</table>

See [all `oz0` commands](https://docs.oz0.ai/reference/cli/oz0) and the [global flags](https://docs.oz0.ai/reference/cli/oz0#global-flags).


## Sitemap

See the full [sitemap](https://docs.oz0.ai/sitemap.md) for all pages.
