Claude API

A template for monitoring Claude API usage and costs.

Available solutions

Zabbix version 8.0
Download

Claude API by HTTP

Overview

This template is designed for the effortless deployment of Claude API monitoring by Zabbix via HTTP and doesn't require any external scripts.

Please consult the Claude API documentation for more details.

Requirements

Zabbix version: 8.0 and higher.

Tested versions

This template has been tested on:

  • Claude API

Configuration

Zabbix should be configured according to the instructions in the Templates out of the box section.

Setup

  1. Create an admin token on the Claude Console page.
  2. Enter the admin token into the API token field.

Macros used

Name Description Default
{$CLAUDE.API.URL}

Claude API URL.

https://api.anthropic.com/v1
{$CLAUDE.API.TOKEN}

Claude API token.

{$CLAUDE.API.TIMEOUT}

Response timeout for an API.

15s
{$CLAUDE.API.INTERVAL}

Update interval for raw items.

1h
{$CLAUDE.API.HTTP_PROXY}

HTTP proxy for API requests. You can specify it using the format [protocol://][username[:password]@]proxy.example.com[:port]. See the documentation at https://www.zabbix.com/documentation/8.0/manual/config/items/itemtypes/http

{$HTTP.TLS.VERIFY}

TLS certificate verification for script items: "none" - disabled, "peer" - verify the certificate chain and expiration, "full" - full verification. Any other value enables full verification. To override the setting for this template only, define the macro with the context "Claude API", e.g. {$HTTP.TLS.VERIFY:"Claude API"}.

full
{$CLAUDE.API.MSG.USAGE.BUCKET}

Time period and gathering interval for Claude API message usage report data.

1m
{$CLAUDE.API.CODE.COST.WARN}

Warning threshold for estimated Claude Code usage cost.

10
{$CLAUDE.API.MODEL.COST.WARN}

Warning threshold for previous day expenses. Supports macro context for per-workspace threshold tuning.

10
{$CLAUDE.API.WORKSPACE.COST.WARN}

Warning threshold for previous day expenses. Supports macro context for per-workspace threshold tuning.

10
{$CLAUDE.API.INVITE.EXPIRE.WARN}

Number of hours before invite expiration.

24
{$CLAUDE.API.INVITE.STATUS.MATCHES}

Filter to include invites by regex.

.*
{$CLAUDE.API.INVITE.STATUS.NOT_MATCHES}

Filter to exclude invites by regex.

accepted|deleted
{$CLAUDE.API.KEY.STATUS.MATCHES}

Filter to include API keys by regex.

.*
{$CLAUDE.API.KEY.STATUS.NOT_MATCHES}

Filter to exclude API keys by regex.

archived
{$CLAUDE.API.WORKSPACE.MATCHES}

Filter to include workspaces by regex.

.*
{$CLAUDE.API.WORKSPACE.NOT_MATCHES}

Filter to exclude workspaces by regex.

CHANGE_IF_NEEDED
{$CLAUDE.API.MODEL.MATCHES}

Filter to include model by regex.

.*
{$CLAUDE.API.MODEL.NOT_MATCHES}

Filter to exclude model by regex.

CHANGE_IF_NEEDED

Items

Name Description Type Key and additional info
API key: Get data

Item for gathering Claude API data about API keys.

Script claude.keys.get
API key: Get data errors

Item for gathering errors from API key: Get data item.

Dependent item claude.keys.errors

Preprocessing

  • JSON Path: $.error

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 1h

Users: Get data

Item for gathering Claude API data about users.

Script claude.users.get
Users: Get data errors

Item for gathering errors from Users: Get data item.

Dependent item claude.users.errors

Preprocessing

  • JSON Path: $.error

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 1h

Workspace: Get data

Item for gathering Claude API data about workspaces.

Script claude.workspaces.get
Workspace: Get data errors

Item for gathering errors from Workspace: Get data item.

Dependent item claude.workspaces.errors

Preprocessing

  • JSON Path: $.error

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 1h

Invite: Get data

Item for gathering Claude API data about invites.

Script claude.invites.get
Invite: Get data errors

Item for gathering errors from Invite: Get data item.

Dependent item claude.invites.errors

Preprocessing

  • JSON Path: $.error

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 1h

Usage [messages]: Get data

Item for gathering Claude API message usage report.

Script claude.usage.messages.get
Usage [messages]: Get data errors

Item for gathering errors from Usage [messages]: Get data item.

Dependent item claude.usage.messages.errors

Preprocessing

  • JSON Path: $.error

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 1h

Usage [code]: Get data

Item retrieves previous day aggregated usage metrics for Claude Code users.

Script claude.usage.code.get
Usage [code]: Get data errors

Item for gathering errors from Usage [code]: Get data item.

Dependent item claude.usage.code.errors

Preprocessing

  • JSON Path: $.error

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 1h

Costs: Get data

Item retrieves previous day aggregated cost report.

Script claude.costs.get
Costs: Get data errors

Item for gathering errors from Costs: Get data item.

Dependent item claude.costs.errors

Preprocessing

  • JSON Path: $.error

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 1h

Workspace: Total count

Total number of workspaces in your organization.

Dependent item claude.workspaces.count

Preprocessing

  • JSON Path: $[*].length()

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 1h

Limits: Get data

Item retrieves organization limits.

Script claude.limits.get
Limits: Get data errors

Item for gathering errors from Limits: Get data item.

Dependent item claude.limits.errors

Preprocessing

  • JSON Path: $.error

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 1h

Users: Total count

Total number of users in your organization.

Dependent item claude.users.total

Preprocessing

  • JSON Path: $[*].length()

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 1h

Users: Role [user], count

Number of users with "user" role in your organization.

Dependent item claude.users.user

Preprocessing

  • JSON Path: $[?(@.role == 'user')].length()

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 1h

Users: Role [developer], count

Number of users with "developer" role in your organization.

Dependent item claude.users.developer

Preprocessing

  • JSON Path: $[?(@.role == 'developer')].length()

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 1h

Users: Role [billing], count

Number of users with "billing" role in your organization.

Dependent item claude.users.billing

Preprocessing

  • JSON Path: $[?(@.role == 'billing')].length()

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 1h

Users: Role [admin], count

Number of users with "admin" role in your organization.

Dependent item claude.users.admin

Preprocessing

  • JSON Path: $[?(@.role == 'admin')].length()

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 1h

Users: Role [claude_code_user], count

Number of users with "claude_code_user" role in your organization.

Dependent item claude.users.claude_code_user

Preprocessing

  • JSON Path: $[?(@.role == 'claude_code_user')].length()

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 1h

Triggers

Name Description Expression Severity Dependencies and additional info
Claude API: There are errors in the API key: Get data item

An error occurred while attempting to retrieve values for the API key: Get data item.

length(last(/Claude API by HTTP/claude.keys.errors))>0 Warning
Claude API: There are errors in the Users: Get data item

An error occurred while attempting to retrieve values for the Users: Get data item.

length(last(/Claude API by HTTP/claude.users.errors))>0 Warning
Claude API: There are errors in the Workspace: Get data item

An error occurred while attempting to retrieve values for the Workspace: Get data item.

length(last(/Claude API by HTTP/claude.workspaces.errors))>0 Warning
Claude API: There are errors in the Invite: Get data item

An error occurred while attempting to retrieve values for the Invite: Get data item.

length(last(/Claude API by HTTP/claude.invites.errors))>0 Warning
Claude API: There are errors in the Usage [messages]: Get data item

An error occurred while attempting to retrieve values for the Usage [messages]: Get data item.

length(last(/Claude API by HTTP/claude.usage.messages.errors))>0 Warning
Claude API: There are errors in the Usage [code]: Get data item

An error occurred while attempting to retrieve values for the Usage [code]: Get data item.

length(last(/Claude API by HTTP/claude.usage.code.errors))>0 Warning
Claude API: There are errors in the Costs: Get data item

An error occurred while attempting to retrieve values for the Costs: Get data item.

length(last(/Claude API by HTTP/claude.costs.errors))>0 Warning
Claude API: There are errors in the Limits: Get data item

An error occurred while attempting to retrieve values for the Limits: Get data item.

length(last(/Claude API by HTTP/claude.limits.errors))>0 Warning

LLD rule Workspace discovery

Name Description Type Key and additional info
Workspace discovery

Workspace discovery.

Dependent item claude.workspaces.discovery

Preprocessing

  • Discard unchanged with heartbeat: 6h

Item prototypes for Workspace discovery

Name Description Type Key and additional info
Workspace [{#WORKSPACE.NAME}]: Member, count

Number of members in the workspace.

Dependent item claude.workspaces.members[{#WORKSPACE.ID}]

Preprocessing

  • JSON Path: $[?(@.id == '{#WORKSPACE.ID}')].members[*].length()

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 1h

Workspace [{#WORKSPACE.NAME}]: Messages: Output tokens

The number of output tokens generated.

Dependent item claude.workspaces.msg.tokens.out[{#WORKSPACE.ID}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 1h

Workspace [{#WORKSPACE.NAME}]: Messages: Input tokens, uncached

The number of uncached input tokens processed.

Dependent item claude.workspaces.msg.tokens.in.uncached[{#WORKSPACE.ID}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 1h

Workspace [{#WORKSPACE.NAME}]: Messages: Input tokens, cached

The number of input tokens read from the cache.

Dependent item claude.workspaces.msg.tokens.in.cached[{#WORKSPACE.ID}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 1h

Workspace [{#WORKSPACE.NAME}]: API key count

Number of API keys.

Dependent item claude.workspaces.keys.count[{#WORKSPACE.ID}]

Preprocessing

  • JSON Path: $[?(@.workspace_id == '{#WORKSPACE.ID}')].length()

  • Discard unchanged with heartbeat: 1h

Workspace [{#WORKSPACE.NAME}]: Spent, total

Total expenses for the previous day.

Dependent item claude.workspaces.costs.total[{#WORKSPACE.ID}]

Preprocessing

  • JSON Path: $[?(@.workspace_id == '{#WORKSPACE.ID}')].amount.sum()

    ⛔️Custom on fail: Set value to: 0

  • Custom multiplier: 0.01

  • Discard unchanged with heartbeat: 6h

Workspace [{#WORKSPACE.NAME}]: Uptime

Workspace uptime - how long ago it was created.

Dependent item claude.workspaces.uptime[{#WORKSPACE.ID}]

Preprocessing

  • JSON Path: $[?(@.id == '{#WORKSPACE.ID}')].created_at.first()

  • JavaScript: The text is too long. Please see the template.

Workspace [{#WORKSPACE.NAME}]: Limit: Batch requests

Batch requests limit for {#WORKSPACE.NAME} workspace.

Dependent item claude.workspaces.limit.requests[{#WORKSPACE.ID}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Discard value

Workspace [{#WORKSPACE.NAME}]: Limit: Web search

Web search limit for {#WORKSPACE.NAME} workspace.

Dependent item claude.workspaces.limit.web_search[{#WORKSPACE.ID}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Discard value

Workspace [{#WORKSPACE.NAME}]: Users, count

Number of user role members in the workspace.

Dependent item claude.workspaces.member_role.user[{#WORKSPACE.ID}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 6h

Workspace [{#WORKSPACE.NAME}]: Developers, count

Number of developer role members in the workspace.

Dependent item claude.workspaces.member_role.developer[{#WORKSPACE.ID}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 6h

Workspace [{#WORKSPACE.NAME}]: Restricted developers, count

Number of restricted developer role members in the workspace.

Dependent item claude.workspaces.member_role.developer.restricted[{#WORKSPACE.ID}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 6h

Workspace [{#WORKSPACE.NAME}]: Admins, count

Number of admin role members in the workspace.

Dependent item claude.workspaces.member_role.admin[{#WORKSPACE.ID}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 6h

Workspace [{#WORKSPACE.NAME}]: Billing, count

Number of billing role members in the workspace.

Dependent item claude.workspaces.member_role.billing[{#WORKSPACE.ID}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Discard value

  • Discard unchanged with heartbeat: 6h

Trigger prototypes for Workspace discovery

Name Description Expression Severity Dependencies and additional info
Claude API: Workspace [{#WORKSPACE.NAME}] expenses exceeded the threshold

Total workspace expenses exceeded the threshold in the previous day.

last(/Claude API by HTTP/claude.workspaces.costs.total[{#WORKSPACE.ID}])>({$CLAUDE.API.WORKSPACE.COST.WARN:"{#WORKSPACE.NAME}"}) Warning

LLD rule Workspace [{#WORKSPACE.NAME}]: Cost model discovery

Name Description Type Key and additional info
Workspace [{#WORKSPACE.NAME}]: Cost model discovery

Claude costs model discovery.

Dependent item claude.costs.model.discovery[{#WORKSPACE.ID}]

Preprocessing

  • JSON Path: $[?(@.workspace_id == '{#WORKSPACE.ID}')]

    ⛔️Custom on fail: Set value to: []

  • JavaScript: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 6h

Item prototypes for Workspace [{#WORKSPACE.NAME}]: Cost model discovery

Name Description Type Key and additional info
Workspace [{#WORKSPACE.NAME}]: Model [{#MODEL.NAME}]: Total costs

Total {#WORKSPACE.NAME} expenses for {#MODEL.NAME}.

Dependent item claude.costs.model.total[{#WORKSPACE.NAME}, {#MODEL.NAME}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 6h

  • Custom multiplier: 0.01

Trigger prototypes for Workspace [{#WORKSPACE.NAME}]: Cost model discovery

Name Description Expression Severity Dependencies and additional info
Claude API: Model {#MODEL.NAME} expenses exceeded the threshold

Model expenses exceeded the threshold in the previous day.

last(/Claude API by HTTP/claude.costs.model.total[{#WORKSPACE.NAME}, {#MODEL.NAME}])>({$CLAUDE.API.MODEL.COST.WARN:"{#WORKSPACE.NAME}"}) Warning

LLD rule Workspace [{#WORKSPACE.NAME}]: Limits discovery

Name Description Type Key and additional info
Workspace [{#WORKSPACE.NAME}]: Limits discovery

Limits discovery.

Dependent item claude.limits.discovery[{#WORKSPACE.ID}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

  • Discard unchanged with heartbeat: 6h

Item prototypes for Workspace [{#WORKSPACE.NAME}]: Limits discovery

Name Description Type Key and additional info
Workspace [{#WORKSPACE.NAME}]: Model group [{#GROUP.NAME}]: Limit: Output tokens

{#GROUP.NAME} model group output token limit for {#WORKSPACE.NAME} workspace.

Dependent item claude.workspaces.model.limit.token.output[{#WORKSPACE.ID}, {#GROUP.NAME}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Discard value

Workspace [{#WORKSPACE.NAME}]: Model group [{#GROUP.NAME}]: Limit: Input tokens

{#GROUP.NAME} model group input token limit for {#WORKSPACE.NAME} workspace.

Dependent item claude.workspaces.model.limit.token.input[{#WORKSPACE.ID}, {#GROUP.NAME}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Discard value

Workspace [{#WORKSPACE.NAME}]: Model group [{#GROUP.NAME}]: Limit: Requests per minute

{#GROUP.NAME} model group requests per minute limit for {#WORKSPACE.NAME} workspace.

Dependent item claude.workspaces.model.limit.requests[{#WORKSPACE.ID}, {#GROUP.NAME}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Discard value

LLD rule Workspace [{#WORKSPACE.NAME}]: API key discovery

Name Description Type Key and additional info
Workspace [{#WORKSPACE.NAME}]: API key discovery

API keys discovery.

Dependent item claude.keys.discovery[{#WORKSPACE.ID}]

Preprocessing

  • JSON Path: $[?(@.workspace_id == '{#WORKSPACE.ID}')]

  • Discard unchanged with heartbeat: 6h

Item prototypes for Workspace [{#WORKSPACE.NAME}]: API key discovery

Name Description Type Key and additional info
Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Status

API key status. Possible values: "active", "inactive", "archived" and "expired".

Dependent item claude.keys.status[{#WORKSPACE.ID}, {#KEY.ID}]

Preprocessing

  • JSON Path: $[?(@.id == '{#KEY.ID}')].status.first()

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 6h

  • JavaScript: The text is too long. Please see the template.

Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Uptime

API key uptime - how long ago it was created.

Dependent item claude.keys.uptime[{#WORKSPACE.ID}, {#KEY.ID}]

Preprocessing

  • JSON Path: $[?(@.id == '{#KEY.ID}')].created_at.first()

  • JavaScript: The text is too long. Please see the template.

Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Code: Commits

Number of git commits created yesterday through Claude Code's commit functionality.

Dependent item claude.code.commits[{#WORKSPACE.NAME}, {#KEY.ID}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 6h

Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Code: Lines added

Total number of lines of code added yesterday across all files by Claude Code.

Dependent item claude.code.lines.added[{#WORKSPACE.NAME}, {#KEY.ID}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 6h

Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Code: Lines removed

Total number of lines of code removed yesterday across all files by Claude Code.

Dependent item claude.code.lines.removed[{#WORKSPACE.NAME}, {#KEY.ID}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 6h

Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Code: Sessions

Number of distinct Claude Code sessions initiated yesterday by this API key.

Dependent item claude.code.sessions[{#WORKSPACE.NAME}, {#KEY.ID}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 6h

Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Code: Pull requests

Number of pull requests created yesterday through Claude Code's PR functionality.

Dependent item claude.code.pull_requests[{#WORKSPACE.NAME}, {#KEY.ID}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 6h

Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Code: Estimated cost, total

Estimated cost amount for previous day for all models.

Dependent item claude.code.cost.total[{#WORKSPACE.NAME}, {#KEY.ID}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 6h

  • Custom multiplier: 0.01

Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Code: Output tokens

Total number of output tokens generated by all models for previous day.

Dependent item claude.code.token.output.total[{#WORKSPACE.NAME}, {#KEY.ID}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 6h

Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Code: Input tokens

Total number of input tokens consumed by all models for previous day.

Dependent item claude.code.token.input.total[{#WORKSPACE.NAME}, {#KEY.ID}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 6h

Trigger prototypes for Workspace [{#WORKSPACE.NAME}]: API key discovery

Name Description Expression Severity Dependencies and additional info
Claude API: API key [{#KEY.NAME}] expired

API key expired.

last(/Claude API by HTTP/claude.keys.status[{#WORKSPACE.ID}, {#KEY.ID}])=4 Warning Manual close: Yes
Claude API: API key [{#KEY.NAME}] became inactive

API key became inactive.

last(/Claude API by HTTP/claude.keys.status[{#WORKSPACE.ID}, {#KEY.ID}])=2 Warning Manual close: Yes
Claude API: Code usage estimated costs by {#KEY.NAME} key exceeded the threshold

Code usage estimated costs exceeded the threshold in the previous day.

last(/Claude API by HTTP/claude.code.cost.total[{#WORKSPACE.NAME}, {#KEY.ID}])>({$CLAUDE.API.CODE.COST.WARN:"{#WORKSPACE.NAME}"}) Warning

LLD rule Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Messages model discovery

Name Description Type Key and additional info
Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Messages model discovery

Claude messages model discovery.

Dependent item claude.messages.model.discovery[{#WORKSPACE.ID}, {#KEY.ID}]

Preprocessing

  • JSON Path: $[?(@.api_key_id == '{#KEY.ID}')]

    ⛔️Custom on fail: Set value to: []

  • Discard unchanged with heartbeat: 6h

Item prototypes for Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Messages model discovery

Name Description Type Key and additional info
Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Model [{#MODEL.NAME}]: Messages: Uncached input tokens

The number of uncached input tokens processed for {#MODEL.NAME} model.

Dependent item claude.messages.model.token.input.uncached[{#WORKSPACE.NAME}, {#KEY.NAME}, {#MODEL.NAME}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 1h

Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Model [{#MODEL.NAME}]: Messages: Cached input tokens

The number of input tokens read from the cache for {#MODEL.NAME} model.

Dependent item claude.messages.model.token.input.cached[{#WORKSPACE.NAME}, {#KEY.NAME}, {#MODEL.NAME}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 1h

Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Model [{#MODEL.NAME}]: Messages: Output tokens

The number of output tokens generated for {#MODEL.NAME} model.

Dependent item claude.messages.model.token.output[{#WORKSPACE.NAME}, {#KEY.NAME}, {#MODEL.NAME}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 1h

LLD rule Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Code model discovery

Name Description Type Key and additional info
Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Code model discovery

Claude code model discovery.

Dependent item claude.code.model.discovery[{#WORKSPACE.ID}, {#KEY.ID}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Set value to: []

  • Discard unchanged with heartbeat: 6h

Item prototypes for Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Code model discovery

Name Description Type Key and additional info
Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Model [{#MODEL.NAME}]: Code: Input tokens

Total number of input tokens consumed by {#MODEL.NAME} model for previous day.

Dependent item claude.code.token.input[{#WORKSPACE.NAME}, {#KEY.ID}, {#MODEL.NAME}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 6h

Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Model [{#MODEL.NAME}]: Code: Output tokens

Total number of output tokens generated by {#MODEL.NAME} model for previous day.

Dependent item claude.code.token.output[{#WORKSPACE.NAME}, {#KEY.ID}, {#MODEL.NAME}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 6h

Workspace [{#WORKSPACE.NAME}]: Key [{#KEY.NAME}]: Model [{#MODEL.NAME}]: Code: Estimated cost

Estimated cost amount for {#MODEL.NAME} model for previous day.

Dependent item claude.code.costs[{#WORKSPACE.NAME}, {#KEY.ID}, {#MODEL.NAME}]

Preprocessing

  • JSON Path: The text is too long. Please see the template.

    ⛔️Custom on fail: Set value to: 0

  • Discard unchanged with heartbeat: 6h

  • Custom multiplier: 0.01

LLD rule Invite discovery

Name Description Type Key and additional info
Invite discovery

Invite discovery.

Dependent item claude.invites.discovery

Preprocessing

  • Discard unchanged with heartbeat: 6h

Item prototypes for Invite discovery

Name Description Type Key and additional info
Invite [{#INVITE.EMAIL}]: Status

Invite status.

Possible values: "accepted", "expired", "deleted", "pending" and "unknown".

Dependent item claude.invites.status[{#INVITE.ID}]

Preprocessing

  • JSON Path: $[?(@.id == '{#INVITE.ID}')].status.first()

    ⛔️Custom on fail: Set value to: unknown

  • JavaScript: The text is too long. Please see the template.

Invite [{#INVITE.EMAIL}]: Time left

Time left before the invite will expire.

Dependent item claude.invites.expires[{#INVITE.ID}]

Preprocessing

  • JSON Path: $[?(@.id == '{#INVITE.ID}')].expires_at.first()

  • JavaScript: The text is too long. Please see the template.

  • Custom multiplier: -1

  • In range: 1 ->

    ⛔️Custom on fail: Set value to: 0

Trigger prototypes for Invite discovery

Name Description Expression Severity Dependencies and additional info
Claude API: Invite [{#INVITE.EMAIL}] expired

Invite has expired.

last(/Claude API by HTTP/claude.invites.status[{#INVITE.ID}])=2 Warning Manual close: Yes
Claude API: Invite [{#INVITE.EMAIL}] was accepted

Invite was accepted.

last(/Claude API by HTTP/claude.invites.status[{#INVITE.ID}])=1 Info Manual close: Yes
Claude API: Invite [{#INVITE.EMAIL}] will expire soon

Invite will expire.

last(/Claude API by HTTP/claude.invites.expires[{#INVITE.ID}])<({$CLAUDE.API.INVITE.EXPIRE.WARN}*3600) Warning Manual close: Yes
Depends on:
  • Claude API: Invite [{#INVITE.EMAIL}] expired

Feedback

Please report any issues with the template at https://support.zabbix.com

You can also provide feedback, discuss the template, or ask for help at ZABBIX forums

Articles and documentation

+ Propose new article

Didn't find what you are looking for?