Files
upstream-tldraw/internal/grafana/resources/alertrules.v0alpha1.rules.alerting.grafana.app/e75d2f6c-44cf-54bf-8a74-ced2e045fcb6.yaml
upstream-mirror a774ac673a
Some checks failed
Deploy analytics worker / Deploy analytics worker to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Failing after 1s
i18n upload strings / Upload latest strings (push) Failing after 1s
Deploy bemo / Deploy bemo to ${{ (github.ref == 'refs/heads/bemo-production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Failing after 1s
Deploy grafana resources / ${{ github.event_name == 'push' && 'Deploy grafana resources' || 'Validate grafana resources (dry run)' }} (push) Failing after 0s
End to end tests (dotcom) / Check for relevant changes (push) Failing after 0s
End to end tests (examples) / Check for relevant changes (push) Failing after 0s
End to end tests (mermaid readability) / Check for relevant changes (push) Failing after 1s
End to end tests (perf) / Check for relevant changes (push) Failing after 0s
Publish editor extensions / Publish editor extensions (push) Failing after 1s
Publish SDK packages / Remove the publish-packages label (push) Has been skipped
Checks / Tests & checks (push) Has been cancelled
Checks / Build all projects (push) Has been cancelled
Deploy templates / Deploy templates (push) Has been cancelled
End to end tests (dotcom) / End to end tests (dotcom) (push) Has been cancelled
End to end tests (mermaid readability) / End to end tests (mermaid readability) (push) Has been cancelled
End to end tests (perf) / End to end tests (perf) (push) Has been cancelled
Deploy .com / Deploy dotcom to ${{ (github.ref == 'refs/heads/production' && 'production') || (github.ref == 'refs/heads/main' && 'staging') || 'preview' }} (push) Has been cancelled
End to end tests (examples) / End to end tests (examples) (push) Has been cancelled
Publish SDK packages / Publish SDK packages (push) Has been cancelled
Publish SDK packages / Tell user released version (push) Has been cancelled
Publish SDK packages / Publishes code templates to separate repositories (push) Has been cancelled
Publish SDK packages / Deploys the template demos with the new SDK version (push) Has been cancelled
snapshot of https://github.com/tldraw/tldraw.git (main, 2026-09-23; blobs > 131072B omitted)
2026-09-23 16:12:52 +05:00

117 lines
3.2 KiB
YAML

apiVersion: rules.alerting.grafana.app/v0alpha1
kind: AlertRule
metadata:
annotations:
grafana.app/folder: anthropic
grafana.com/provenance: ''
grafana.com/updateTimestamp: '2026-03-20T11:22:55Z'
grafana.com/updatedBy: bf1wptf89bpq8d
labels:
grafana.app/folder: anthropic
grafana.com/group: anthropic
grafana.com/group-index: '0'
name: e75d2f6c-44cf-54bf-8a74-ced2e045fcb6
namespace: stacks-890472
spec:
annotations:
description: 'The last completed day cost ${{ $value | humanize }}, more than
1.5x the day before. The cost metric updates once a day at about 03:00 UTC,
so this describes yesterday.'
summary: Anthropic API daily cost spike detected.
execErrState: Ok
expressions:
prometheus_math:
model:
datasource:
IsPrunable: false
access: ''
apiVersion: ''
basicAuth: false
basicAuthUser: ''
created: '0001-01-01T00:00:00Z'
database: ''
id: -100
isDefault: false
jsonData: {}
name: __expr__
readOnly: false
secureJsonData: {}
type: __expr__
uid: __expr__
updated: '0001-01-01T00:00:00Z'
url: ''
user: ''
withCredentials: false
expression: is_number($query) || is_nan($query) || is_inf($query)
intervalMs: 1000
maxDataPoints: 43200
refId: prometheus_math
type: math
queryType: math
query:
datasourceUID: grafanacloud-prom
model:
datasource:
type: prometheus
uid: grafanacloud-prom
expr: |
(
sum(increase(gen_ai_cost{job=~"integrations/anthropic/.*"}[1d])) / 100
>
1.5 * sum(increase(gen_ai_cost{job=~"integrations/anthropic/.*"}[1d] offset 1d)) / 100
)
and
sum(increase(gen_ai_cost{job=~"integrations/anthropic/.*"}[1d])) / 100 > 50
instant: true
intervalMs: 1000
maxDataPoints: 43200
range: false
refId: query
queryType: prometheus
relativeTimeRange:
from: 11m0s
to: 1m0s
threshold:
model:
conditions:
- evaluator:
params:
- 0
type: gt
datasource:
IsPrunable: false
access: ''
apiVersion: ''
basicAuth: false
basicAuthUser: ''
created: '0001-01-01T00:00:00Z'
database: ''
id: -100
isDefault: false
jsonData: {}
name: __expr__
readOnly: false
secureJsonData: {}
type: __expr__
uid: __expr__
updated: '0001-01-01T00:00:00Z'
url: ''
user: ''
withCredentials: false
expression: prometheus_math
intervalMs: 1000
maxDataPoints: 43200
refId: threshold
type: threshold
queryType: threshold
source: true
for: 5m0s
labels:
__converted_prometheus_rule__: 'true'
severity: warning
missingSeriesEvalsToResolve: 10
noDataState: Ok
title: AnthropicDailyCostSpike
trigger:
interval: 1m