Skip to main content

LiteLLM

LiteLLM

Plugin: go.d.plugin Module: prometheus

Maintained by Netdata

Overview

Monitor LiteLLM gateway workload, routing, provider performance, usage, cost, governance, and internal dependencies.

The built-in profile follows requests through proxy admission, in-flight work and queueing, guardrails and LiteLLM overhead, routing and fallback, deployment selection, and the provider API response. Side branches organize response and provider caches, tokens and media, spend and budgets, rate limits, MCP tools, managed batches and files, callback failures, Redis/PostgreSQL operations, spend-update queues, and the single-process Python/process runtime. Optional charts appear when their callbacks, features, or runtime mode export metrics.

Each context represents one monitored entity type. Labels identifying that entity form chart instances; bounded aspects such as status, stream mode, service tier, and validated rate-limit classification become dimensions; ownership and descriptive details remain filterable chart metadata. When LiteLLM configuration omits a supported optional dimension label, the same context and instance remain available with an unclassified dimension.

Additive counters and histogram components always produce complete service or capability views. Selected additional views break them down by deployment, provider/model, route, accounting entity, guardrail/hook, MCP server/tool, managed batch, or callback when LiteLLM exports the required identity labels. Point-in-time gauges retain their complete exported identity, including multiprocess pid, so distinct states, limits, budgets, queues, and last-seen values are not summed together. Deployment-configured custom metadata and tag_* labels remain part of complete gauge identity when LiteLLM emits them. Additive service views intentionally roll those deployment-controlled labels up unless a dedicated entity breakdown is defined.

Netdata periodically scrapes the authenticated LiteLLM Prometheus /metrics endpoint and applies the built-in litellm profile.

This collector is supported on all platforms.

This collector supports collecting metrics from multiple instances of this integration, including remote instances.

Default Behavior

Auto-Detection

By default, it detects instances running on the local host by trying to connect to known ports that are allocated to exporters.

Limits

The default configuration for this integration does not impose any limits on data collection.

Performance Impact

The default configuration for this integration is not expected to impose a significant performance impact on the system.

Setup

You can configure the prometheus collector in two ways:

MethodBest forHow to
UIFast setup without editing filesGo to Nodes → Configure this node → Collectors → Jobs, search for prometheus, then click + to add a job.
FileIf you prefer configuring via file, or need to automate deployments (e.g., with Ansible)Edit go.d/prometheus.conf and add a job.
important

UI configuration requires paid Netdata Cloud plan.

Prerequisites

Enable LiteLLM Prometheus metrics

Enable the LiteLLM Prometheus callback and configure the Netdata job with access to its /metrics endpoint. LiteLLM's prometheus_metrics_config controls which metrics and labels the endpoint exports. Service views remain complete when optional dimension labels are omitted, and optional entity views appear only when their identity labels are available. Gauge identity follows every non-redundant label required to distinguish the emitted state, including configured custom metadata, custom tags, and the opt-in user email/alias budget labels. Arbitrary configured label names are not turned into dimensions because they are deployment-defined, unbounded classifications rather than one stable bounded aspect. Size max_time_series and max_time_series_per_metric for the exported surface.

Configuration

Options

The following options can be defined globally: update_every, autodetection_retry.

Config options
GroupOptionDescriptionDefaultRequired
Collectionupdate_everyData collection interval (seconds).10no
autodetection_retryAutodetection retry interval (seconds). Set 0 to disable.0no
TargeturlTarget endpoint URL.yes
timeoutHTTP request timeout (seconds).10no
expected_prefixIf set, the job's check passes only when at least one post-job, pre-profile metric name starts with this prefix. Guards against scraping an unexpected endpoint; profile-owned relabeling cannot satisfy it.no
CustomizationappApplication name used as the app segment of chart contexts (prometheus.<app>.<metric>). When unset, it is taken from a matched profile, otherwise it falls back to the job name.no
FiltersselectorTime series selector (filter).no
Limitsmax_time_seriesGlobal time series limit applied after job and profile relabeling. If the final output exceeds it, the data is not processed.2000no
max_time_series_per_metricPer-metric time series limit applied to final metric families. Metrics exceeding it are skipped.200no
Customizationfallback_typeJob-level fallback type overrides for untyped metrics.no
relabelingJob-owned Prometheus-compatible metric relabeling, applied before profile selection.no
profilesCurated, exporter-specific chart profiles with optional untyped classification, profile-owned normalization, and scoped fallback-chart policy. User profiles may constrain unmatched fallback charts; stock profiles preserve unknown future families. Disable profiles with mode none.autono
HTTP AuthusernameUsername for Basic HTTP authentication.no
passwordPassword for Basic HTTP authentication.no
bearer_token_filePath to a file containing a bearer token (used for Authorization: Bearer).no
TLStls_skip_verifySkip TLS certificate and hostname verification (insecure).nono
tls_caPath to CA bundle used to validate the server certificate.no
tls_certPath to client TLS certificate (for mTLS).no
tls_keyPath to client TLS private key (for mTLS).no
Proxyproxy_urlHTTP proxy URL.no
proxy_usernameUsername for proxy Basic HTTP authentication.no
proxy_passwordPassword for proxy Basic HTTP authentication.no
RequestmethodHTTP method to use.GETno
bodyRequest body (e.g., for POST/PUT).no
headersAdditional HTTP headers (one per line as key: value).no
not_follow_redirectsDo not follow HTTP redirects.nono
force_http2Force HTTP/2 (including h2c over TCP).nono
Virtual NodevnodeAssociates this data collection job with a Virtual Node.no
selector

This option allows you to filter out unwanted time series. Only metrics matching the selector will be collected.

  • Logic: (pattern1 OR pattern2) AND !(pattern3 or pattern4)
  • Pattern syntax: selector.
  • Option syntax:
selector:
allow:
- pattern1
- pattern2
deny:
- pattern3
- pattern4
fallback_type

This job option allows you to process untyped metrics as Counter or Gauge instead of ignoring them. Classification uses the post-job, pre-profile metric name. Profile relabeling preserves the selected type but cannot create or change it by renaming the final metric.

Selected profiles may provide exporter-owned fallback_type defaults inside their own match scope. Job gauge rules take precedence over job counter rules, and both job rule sets take precedence over every profile rule. Use them for deployment-specific overrides rather than exporter behavior that belongs in a profile. Keep patterns narrow: a broad job rule such as gauge: ['*'] overrides profile counter classifications. Blank patterns and patterns with leading or trailing whitespace are rejected.

fallback_type:
counter:
- metric_name_pattern1
- metric_name_pattern2
gauge:
- metric_name_pattern3
- metric_name_pattern4
relabeling

A list of job-owned relabeling blocks, applied after selector and before profile selection. Each block applies a list of Prometheus metric_relabel_configs rules to the metrics whose name matches match. Profiles may own the same block format for exporter normalization after selection. See the relabeling reference for the full action set and more examples.

  • match: Netdata simple patterns matched against the full metric name — including any _bucket/_sum/_count suffix, so prefer globs like app_lat* over an exact app_lat (space-separated; * matches any sequence, ? any character, a leading ! negates). Use * to target every metric. Required.
  • metric_relabel_configs: Prometheus relabel rules (source_labels, separator, regex, modulus, target_label, replacement, action), applied in order to the scraped samples before charts are built.

Relabeling that would corrupt a histogram or summary — splitting it, dropping a component, mutating the le/quantile label, or merging two families — is rejected.

relabeling:
- match: 'http_*'
metric_relabel_configs:
- source_labels: [code]
regex: '(\d)\d\d'
target_label: code_class
replacement: '${1}xx'
profiles

Profiles ship curated charts for recognized exporters -- see the profile format for the file format and how to author your own. profiles.mode selects them:

  • auto (default): every profile whose match hits at least one scraped metric.
  • exact: only the profiles named in mode_exact.entries (each must match, or the job fails its check).
  • combined: auto plus the profiles named in mode_combined.entries.
  • none: no profiles — generic autogen charts only (the pre-profile behavior).

Selection uses post-job, pre-profile family names. A selected profile may carry fallback_type rules that classify untyped scalar families inside its match scope and relabeling blocks that normalize matching source families automatically before chart routing. Job fallback policy takes precedence; conflicting profile rules use the same ordering as normalization. Each original family is processed only by the first applicable profile normalizer: profile-name order in auto, configured entry order in exact, and configured entries followed by remaining auto profiles in name order in combined. Later profile pipelines do not see the family. All selected templates consume the same final names and labels; the collector does not create a private metric stream per profile.

Only the block matching the selected mode (mode_exact or mode_combined) is read; entries under the other block are ignored. Metrics not covered by an authored profile chart keep their generic autogen charts unless an applicable profile autogen.selector rejects them. Every selector is limited to its profile's match scope; when scopes overlap, every applicable selector must accept the series. This changes fallback charts only; use selector or a relabeling drop rule to discard samples. Stock profiles leave unknown future families eligible for generic fallback; closed fallback selectors are a user-owned deployment policy, not a stock-profile authoring pattern.

profiles:
mode: exact
mode_exact:
entries:
- name: haproxy

via UI

Configure the prometheus collector from the Netdata web interface:

  1. Go to Nodes.
  2. Select the node where you want the prometheus data-collection job to run and click the (Configure this node). That node will run the data collection.
  3. The Collectors → Jobs view opens by default.
  4. In the Search box, type prometheus (or scroll the list) to locate the prometheus collector.
  5. Click the + next to the prometheus collector to add a new job.
  6. Fill in the job fields, then click Test to verify the configuration and Submit to save.
    • Test runs the job with the provided settings and shows whether data can be collected.
    • If it fails, an error message appears with details (for example, connection refused, timeout, or command execution errors), so you can adjust and retest.

via File

The configuration file name for this integration is go.d/prometheus.conf.

The file format is YAML. Generally, the structure is:

update_every: 1
autodetection_retry: 0
jobs:
- name: some_name1
- name: some_name2

You can edit the configuration file using the edit-config script from the Netdata config directory.

cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
sudo ./edit-config go.d/prometheus.conf
Examples
LiteLLM

Collect the complete LiteLLM surface with automatically matched application, process-runtime, and Python-GC profiles.

jobs:
- name: litellm
url: http://127.0.0.1:4000/metrics
expected_prefix: litellm_

Alerts

There are no alerts configured by default for this integration.

Metrics

The built-in Prometheus profiles on this page map Prometheus metrics into 109 curated Netdata charts across the primary and applicable supporting profiles. The tables are generated from the same profile design and runtime chart contracts used by the Agent.

Eligible metrics that are not covered by a curated chart, including future exporter metrics, can still be collected through the generic Prometheus autogeneration behavior. This catalogue describes curated profile coverage; it is not an allowlist of every metric that the collector can render.

LiteLLM

Curated gateway, routing, provider, usage, cost, governance, dependency, and runtime metrics from LiteLLM.

Gateway

Prometheus metricNetdata chartDimensionUnitScope
litellm_proxy_total_requests_metric_totalGateway / Client Traffic — Client Request Outcomesrequestsrequests/sroute, status_class
litellm_proxy_failed_requests_metric_totalGateway / Client Traffic — Client Failure Causesfailuresfailures/sstatus_class, exception_class
litellm_proxy_failed_requests_metric_total{rate_limit_category=".+",rate_limit_type=".+"}Gateway / Client Traffic — Client Rate-Limit Attributionfailuresfailures/srate_limit_category, rate_limit_type
litellm_in_flight_requestsGateway / Client Traffic — In-Flight Requestsrequestsrequestscollector job service
litellm_request_queue_time_seconds_bucketGateway / Admission Queue — Request Queue-Time Distributionmatching seriesobservations/smodel_id
litellm_request_queue_time_seconds_countGateway / Admission Queue — Queued Request Measurementsrequestsrequests/smodel_id
litellm_request_queue_time_seconds_sumGateway / Admission Queue — Accumulated Request Queue Timetimeseconds/smodel_id
litellm_request_total_latency_metric_bucketGateway / Request Latency — End-to-End Request-Latency Distributionmatching seriesobservations/smodel_id, service_tier
litellm_request_total_latency_metric_countGateway / Request Latency — End-to-End Request Measurementsrequestsrequests/smodel_id, service_tier
litellm_request_total_latency_metric_sumGateway / Request Latency — Accumulated End-to-End Request Timetimeseconds/smodel_id, service_tier
litellm_overhead_latency_metric_bucketGateway / Processing Overhead — LiteLLM Overhead-Latency Distributionmatching seriesobservations/smodel_id
litellm_overhead_latency_metric_countGateway / Processing Overhead — LiteLLM Overhead Measurementsrequestsrequests/smodel_id
litellm_overhead_latency_metric_sumGateway / Processing Overhead — Accumulated LiteLLM Overheadtimeseconds/smodel_id
litellm_overhead_with_guardrails_latency_metric_bucketGateway / Processing Overhead — Guardrail-Inclusive Overhead Distributionmatching seriesobservations/smodel_id
litellm_overhead_with_guardrails_latency_metric_countGateway / Processing Overhead — Guardrail-Inclusive Overhead Measurementsrequestsrequests/smodel_id
litellm_overhead_with_guardrails_latency_metric_sumGateway / Processing Overhead — Accumulated Guardrail-Inclusive Overheadtimeseconds/smodel_id

Routing and Deployments

Prometheus metricNetdata chartDimensionUnitScope
litellm_deployment_total_requests_totalRouting and Deployments / Deployment Requests — Deployment Request Workloadrequestsrequests/smodel_id
litellm_deployment_success_responses_totalRouting and Deployments / Deployment Requests — Classified Deployment Outcomessuccessfulrequests/smodel_id
litellm_deployment_failure_responses_totalRouting and Deployments / Deployment Requests — Classified Deployment Outcomesfailedrequests/smodel_id
litellm_deployment_failure_responses_totalRouting and Deployments / Deployment Requests — Deployment Failure Causesfailuresfailures/smodel_id, status_class, exception_class
litellm_deployment_cooled_down_totalRouting and Deployments / Deployment Health — Deployment Cooldownscooldownsevents/smodel_id, status_class
litellm_deployment_stateRouting and Deployments / Deployment Health — Deployment Statestate{status}model_id
litellm_deployment_rpm_limitRouting and Deployments / Deployment Capacity — Deployment Request Limitlimitrequests/minmodel_id
litellm_deployment_tpm_limitRouting and Deployments / Deployment Capacity — Deployment Token Limitlimittokens/minmodel_id
litellm_remaining_requests_metricRouting and Deployments / Deployment Capacity — Provider Remaining Requestsremainingrequestsmodel_id
litellm_remaining_tokens_metricRouting and Deployments / Deployment Capacity — Provider Remaining Tokensremainingtokensmodel_id
litellm_deployment_latency_per_output_token_bucketRouting and Deployments / Output-Token Latency — Deployment Output-Token Latency Distributionmatching seriesobservations/smodel_id
litellm_deployment_latency_per_output_token_countRouting and Deployments / Output-Token Latency — Deployment Output-Token Latency Measurementsrequestsrequests/smodel_id
litellm_deployment_latency_per_output_token_sumRouting and Deployments / Output-Token Latency — Accumulated Deployment Output-Token Latencytimeseconds/smodel_id
litellm_deployment_successful_fallbacks_totalRouting and Deployments / Fallbacks — Fallback Outcomessuccessfulfallbacks/srequested_model, fallback_model
litellm_deployment_failed_fallbacks_totalRouting and Deployments / Fallbacks — Fallback Outcomesfailedfallbacks/srequested_model, fallback_model

Provider API

Prometheus metricNetdata chartDimensionUnitScope
litellm_llm_api_latency_metric_bucketProvider API — Provider API Latency Distributionmatching seriesobservations/smodel_id, service_tier
litellm_llm_api_latency_metric_countProvider API — Provider API Latency Measurementsrequestsrequests/smodel_id, service_tier
litellm_llm_api_latency_metric_sumProvider API — Accumulated Provider API Latencytimeseconds/smodel_id, service_tier
litellm_llm_api_time_to_first_token_metric_bucketProvider API — Provider Time-to-First-Token Distributionmatching seriesobservations/smodel_id, service_tier
litellm_llm_api_time_to_first_token_metric_countProvider API — Provider Time-to-First-Token Measurementsrequestsrequests/smodel_id, service_tier
litellm_llm_api_time_to_first_token_metric_sumProvider API — Accumulated Provider Time-to-First-Tokentimeseconds/smodel_id, service_tier

Usage and Cost

Prometheus metricNetdata chartDimensionUnitScope
litellm_input_tokens_metric_totalUsage and Cost / By Deployment — Request Token Throughputinputtokens/smodel_id
litellm_output_tokens_metric_totalUsage and Cost / By Deployment — Request Token Throughputoutputtokens/smodel_id
litellm_total_tokens_metric_totalUsage and Cost / By Deployment — Reported Total Token Throughputtotaltokens/smodel_id
litellm_spend_metric_totalUsage and Cost / By Deployment — LLM SpendspendUSD/smodel_id, service_tier
litellm_input_audio_tokens_metric_totalUsage and Cost / By Deployment — Audio and Reasoning Token Throughputinput_audiotokens/smodel_id
litellm_output_audio_tokens_metric_totalUsage and Cost / By Deployment — Audio and Reasoning Token Throughputoutput_audiotokens/smodel_id
litellm_output_reasoning_tokens_metric_totalUsage and Cost / By Deployment — Audio and Reasoning Token Throughputoutput_reasoningtokens/smodel_id
litellm_images_generated_metric_totalUsage and Cost / By Deployment — Generated Imagesimagesimages/smodel_id
litellm_video_duration_seconds_metric_totalUsage and Cost / By Deployment — Generated Video Durationdurationseconds/smodel_id
litellm_input_tokens_metric_totalUsage and Cost / By API Key — Request Token Throughput by API Keyinputtokens/shashed_api_key
litellm_output_tokens_metric_totalUsage and Cost / By API Key — Request Token Throughput by API Keyoutputtokens/shashed_api_key
litellm_total_tokens_metric_totalUsage and Cost / By API Key — Reported Total Token Throughput by API Keytotaltokens/shashed_api_key
litellm_spend_metric_totalUsage and Cost / By API Key — LLM Spend by API KeyspendUSD/shashed_api_key
litellm_input_tokens_metric_totalUsage and Cost / By Team — Request Token Throughput by Teaminputtokens/steam
litellm_output_tokens_metric_totalUsage and Cost / By Team — Request Token Throughput by Teamoutputtokens/steam
litellm_total_tokens_metric_totalUsage and Cost / By Team — Reported Total Token Throughput by Teamtotaltokens/steam
litellm_spend_metric_totalUsage and Cost / By Team — LLM Spend by TeamspendUSD/steam
litellm_input_tokens_metric_totalUsage and Cost / By User — Request Token Throughput by Userinputtokens/suser
litellm_output_tokens_metric_totalUsage and Cost / By User — Request Token Throughput by Useroutputtokens/suser
litellm_total_tokens_metric_totalUsage and Cost / By User — Reported Total Token Throughput by Usertotaltokens/suser
litellm_spend_metric_totalUsage and Cost / By User — LLM Spend by UserspendUSD/suser
litellm_input_tokens_metric_totalUsage and Cost / By Organization — Request Token Throughput by Organizationinputtokens/sorg_id
litellm_output_tokens_metric_totalUsage and Cost / By Organization — Request Token Throughput by Organizationoutputtokens/sorg_id
litellm_total_tokens_metric_totalUsage and Cost / By Organization — Reported Total Token Throughput by Organizationtotaltokens/sorg_id
litellm_spend_metric_totalUsage and Cost / By Organization — LLM Spend by OrganizationspendUSD/sorg_id
litellm_input_tokens_metric_totalUsage and Cost / By End User — Request Token Throughput by End Userinputtokens/send_user
litellm_output_tokens_metric_totalUsage and Cost / By End User — Request Token Throughput by End Useroutputtokens/send_user
litellm_total_tokens_metric_totalUsage and Cost / By End User — Reported Total Token Throughput by End Usertotaltokens/send_user
litellm_spend_metric_totalUsage and Cost / By End User — LLM Spend by End UserspendUSD/send_user
litellm_input_tokens_metric_totalUsage and Cost / By Requested Model — Request Token Throughput by Requested Modelinputtokens/srequested_model
litellm_output_tokens_metric_totalUsage and Cost / By Requested Model — Request Token Throughput by Requested Modeloutputtokens/srequested_model
litellm_total_tokens_metric_totalUsage and Cost / By Requested Model — Reported Total Token Throughput by Requested Modeltotaltokens/srequested_model
litellm_spend_metric_totalUsage and Cost / By Requested Model — LLM Spend by Requested ModelspendUSD/srequested_model

Caching

Prometheus metricNetdata chartDimensionUnitScope
litellm_cache_hits_metric_totalCaching — Cache Outcomeshitsevents/smodel_id
litellm_cache_misses_metric_totalCaching — Cache Outcomesmissesevents/smodel_id
litellm_cached_tokens_metric_totalCaching — LiteLLM Cached Token Throughputcachedtokens/smodel_id
litellm_input_cached_tokens_metric_totalCaching — Request Input-Cache Token Throughputreadtokens/smodel_id
litellm_input_cache_creation_tokens_metric_totalCaching — Request Input-Cache Token Throughputcreationtokens/smodel_id
litellm_provider_cache_read_input_tokens_metric_totalCaching — Provider Cache Token Throughputreadtokens/smodel_id
litellm_provider_cache_creation_input_tokens_metric_totalCaching — Provider Cache Token Throughputcreationtokens/smodel_id

Governance

Prometheus metricNetdata chartDimensionUnitScope
litellm_remaining_api_key_budget_metricGovernance / API Keys — API-Key Remaining BudgetremainingUSDhashed_api_key
litellm_api_key_max_budget_metricGovernance / API Keys — API-Key Budget LimitlimitUSDhashed_api_key
litellm_api_key_budget_remaining_hours_metricGovernance / API Keys — API-Key Budget Reset Windowremaininghourshashed_api_key
litellm_remaining_api_key_requests_for_modelGovernance / API Keys — API-Key Model Request Headroomremainingrequestshashed_api_key, model
litellm_remaining_api_key_tokens_for_modelGovernance / API Keys — API-Key Model Token Headroomremainingtokenshashed_api_key, model
litellm_remaining_org_budget_metricGovernance / Organizations — Organization Remaining BudgetremainingUSDorg_id
litellm_org_max_budget_metricGovernance / Organizations — Organization Budget LimitlimitUSDorg_id
litellm_org_budget_remaining_hours_metricGovernance / Organizations — Organization Budget Reset Windowremaininghoursorg_id
litellm_remaining_team_budget_metricGovernance / Teams — Team Remaining BudgetremainingUSDteam
litellm_team_max_budget_metricGovernance / Teams — Team Budget LimitlimitUSDteam
litellm_team_budget_remaining_hours_metricGovernance / Teams — Team Budget Reset Windowremaininghoursteam
litellm_team_members_metricGovernance / Teams — Team Membershipmembersmembersteam
litellm_remaining_user_budget_metricGovernance / Users — User Remaining BudgetremainingUSDuser
litellm_user_max_budget_metricGovernance / Users — User Budget LimitlimitUSDuser
litellm_user_budget_remaining_hours_metricGovernance / Users — User Budget Reset Windowremaininghoursuser
litellm_provider_remaining_budget_metricGovernance / Providers — Provider Remaining BudgetremainingUSDapi_provider

Guardrails

Prometheus metricNetdata chartDimensionUnitScope
litellm_guardrail_latency_seconds_countGuardrails — Guardrail Invocationsinvocationsinvocations/sguardrail_name, hook_type, status
litellm_guardrail_errors_totalGuardrails — Guardrail Errorserrorserrors/sguardrail_name, hook_type, error_type
litellm_guardrail_latency_seconds_bucketGuardrails — Guardrail Latency Distributionmatching seriesobservations/sguardrail_name, hook_type
litellm_guardrail_latency_seconds_sumGuardrails — Accumulated Guardrail Latencytimeseconds/sguardrail_name, hook_type

MCP Gateway

Prometheus metricNetdata chartDimensionUnitScope
litellm_mcp_tool_calls_totalMCP Gateway — MCP Tool Callscallscalls/smcp_server_name, mcp_tool_name
litellm_mcp_tool_call_spend_metric_totalMCP Gateway — MCP Tool-Call SpendspendUSD/smcp_server_name, mcp_tool_name

Managed Batches and Files

Prometheus metricNetdata chartDimensionUnitScope
litellm_managed_batch_created_totalManaged Batches and Files — Managed Batches Createdcreatedbatches/sapi_provider, model
litellm_check_batch_cost_jobs_processed_totalManaged Batches and Files — Successfully Cost-Tracked Batchescost_trackedbatches/sapi_provider, model
litellm_check_batch_cost_errors_totalManaged Batches and Files — Batch-Cost Processing Errorserrorserrors/scollector job service
litellm_managed_file_created_totalManaged Batches and Files — Managed Files Createdcreatedfiles/sapi_provider, model
litellm_managed_file_deleted_totalManaged Batches and Files — Managed File Deletionsdeletionsfiles/sresult
litellm_managed_batch_duration_seconds_bucketManaged Batches and Files — Managed Batch Duration Distributionmatching seriesobservations/sapi_provider, model
litellm_managed_batch_duration_seconds_countManaged Batches and Files — Completed Managed Batchescompletedbatches/sapi_provider, model
litellm_managed_batch_duration_seconds_sumManaged Batches and Files — Accumulated Managed Batch Durationtimeseconds/sapi_provider, model

Inventory and Callbacks

Prometheus metricNetdata chartDimensionUnitScope
litellm_total_usersInventory and Callbacks — Total Usersusersuserscollector job
litellm_active_usersInventory and Callbacks — Billable Usersusersuserscollector job
litellm_teams_countInventory and Callbacks — Teamsteamsteamscollector job
litellm_callback_logging_failures_metric_totalInventory and Callbacks — Callback Logging Failuresfailuresfailures/scallback_name

Internal Services

Prometheus metricNetdata chartDimensionUnitScope
litellm_auth_latency_countInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_batch_write_to_db_latency_countInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_postgres_latency_countInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_proxy_pre_call_latency_countInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_redis_latency_countInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_redis_daily_org_spend_update_queue_latency_countInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_redis_daily_tag_spend_update_queue_latency_countInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_redis_daily_team_spend_update_queue_latency_countInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_reset_budget_job_latency_countInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_router_latency_countInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_self_latency_countInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_auth_failed_requests_totalInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_batch_write_to_db_failed_requests_totalInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_postgres_failed_requests_totalInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_proxy_pre_call_failed_requests_totalInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_redis_failed_requests_totalInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_redis_daily_org_spend_update_queue_failed_requests_totalInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_redis_daily_tag_spend_update_queue_failed_requests_totalInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_redis_daily_team_spend_update_queue_failed_requests_totalInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_reset_budget_job_failed_requests_totalInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_router_failed_requests_totalInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_self_failed_requests_totalInternal Services — Internal Service Request Outcomesvalues of label outcomerequests/sservice
litellm_auth_failed_requests_totalInternal Services — Internal Service Failure Causesvalues of label servicefailures/sfunction_name, error_class
litellm_batch_write_to_db_failed_requests_totalInternal Services — Internal Service Failure Causesvalues of label servicefailures/sfunction_name, error_class
litellm_postgres_failed_requests_totalInternal Services — Internal Service Failure Causesvalues of label servicefailures/sfunction_name, error_class
litellm_proxy_pre_call_failed_requests_totalInternal Services — Internal Service Failure Causesvalues of label servicefailures/sfunction_name, error_class
litellm_redis_failed_requests_totalInternal Services — Internal Service Failure Causesvalues of label servicefailures/sfunction_name, error_class
litellm_redis_daily_org_spend_update_queue_failed_requests_totalInternal Services — Internal Service Failure Causesvalues of label servicefailures/sfunction_name, error_class
litellm_redis_daily_tag_spend_update_queue_failed_requests_totalInternal Services — Internal Service Failure Causesvalues of label servicefailures/sfunction_name, error_class
litellm_redis_daily_team_spend_update_queue_failed_requests_totalInternal Services — Internal Service Failure Causesvalues of label servicefailures/sfunction_name, error_class
litellm_reset_budget_job_failed_requests_totalInternal Services — Internal Service Failure Causesvalues of label servicefailures/sfunction_name, error_class
litellm_router_failed_requests_totalInternal Services — Internal Service Failure Causesvalues of label servicefailures/sfunction_name, error_class
litellm_self_failed_requests_totalInternal Services — Internal Service Failure Causesvalues of label servicefailures/sfunction_name, error_class
litellm_auth_latency_bucketInternal Services — Internal Service Latency Distributionmatching seriesobservations/sservice
litellm_batch_write_to_db_latency_bucketInternal Services — Internal Service Latency Distributionmatching seriesobservations/sservice
litellm_postgres_latency_bucketInternal Services — Internal Service Latency Distributionmatching seriesobservations/sservice
litellm_proxy_pre_call_latency_bucketInternal Services — Internal Service Latency Distributionmatching seriesobservations/sservice
litellm_redis_latency_bucketInternal Services — Internal Service Latency Distributionmatching seriesobservations/sservice
litellm_redis_daily_org_spend_update_queue_latency_bucketInternal Services — Internal Service Latency Distributionmatching seriesobservations/sservice
litellm_redis_daily_tag_spend_update_queue_latency_bucketInternal Services — Internal Service Latency Distributionmatching seriesobservations/sservice
litellm_redis_daily_team_spend_update_queue_latency_bucketInternal Services — Internal Service Latency Distributionmatching seriesobservations/sservice
litellm_reset_budget_job_latency_bucketInternal Services — Internal Service Latency Distributionmatching seriesobservations/sservice
litellm_router_latency_bucketInternal Services — Internal Service Latency Distributionmatching seriesobservations/sservice
litellm_self_latency_bucketInternal Services — Internal Service Latency Distributionmatching seriesobservations/sservice
litellm_auth_latency_sumInternal Services — Accumulated Internal Service Latencyvalues of label measurementseconds/sservice
litellm_batch_write_to_db_latency_sumInternal Services — Accumulated Internal Service Latencyvalues of label measurementseconds/sservice
litellm_postgres_latency_sumInternal Services — Accumulated Internal Service Latencyvalues of label measurementseconds/sservice
litellm_proxy_pre_call_latency_sumInternal Services — Accumulated Internal Service Latencyvalues of label measurementseconds/sservice
litellm_redis_latency_sumInternal Services — Accumulated Internal Service Latencyvalues of label measurementseconds/sservice
litellm_redis_daily_org_spend_update_queue_latency_sumInternal Services — Accumulated Internal Service Latencyvalues of label measurementseconds/sservice
litellm_redis_daily_tag_spend_update_queue_latency_sumInternal Services — Accumulated Internal Service Latencyvalues of label measurementseconds/sservice
litellm_redis_daily_team_spend_update_queue_latency_sumInternal Services — Accumulated Internal Service Latencyvalues of label measurementseconds/sservice
litellm_reset_budget_job_latency_sumInternal Services — Accumulated Internal Service Latencyvalues of label measurementseconds/sservice
litellm_router_latency_sumInternal Services — Accumulated Internal Service Latencyvalues of label measurementseconds/sservice
litellm_self_latency_sumInternal Services — Accumulated Internal Service Latencyvalues of label measurementseconds/sservice

Process runtime

Curated CPU, memory, file-descriptor, and lifecycle metrics exported by the monitored process.

Supporting profile for LiteLLM. Included whenever the LiteLLM profile is active and the endpoint exports process runtime metrics.

Process Runtime

Prometheus metricNetdata chartDimensionUnitScope
process_cpu_seconds_totalProcess Runtime — Process CPU Usageusedcorescollector job process
process_resident_memory_bytesProcess Runtime — Process Resident Memoryresidentbytescollector job process
process_virtual_memory_bytesProcess Runtime — Process Virtual Memoryvirtualbytescollector job process
process_open_fdsProcess Runtime — Open File Descriptorsopenfdscollector job process
process_max_fdsProcess Runtime — File Descriptor Limitlimitfdscollector job process

Python garbage collection

Curated collection, uncollectable-object, and collection-run metrics for each Python garbage-collector generation.

Supporting profile for LiteLLM. Included whenever the LiteLLM profile is active and the endpoint exports Python garbage-collection metrics.

Process Runtime

Prometheus metricNetdata chartDimensionUnitScope
python_gc_objects_collected_totalProcess Runtime / Python GC — Collected Objectscollectedobjects/sPython garbage-collector generation
python_gc_objects_uncollectable_totalProcess Runtime / Python GC — Uncollectable Objectsuncollectableobjects/sPython garbage-collector generation
python_gc_collections_totalProcess Runtime / Python GC — Collectionscollectionscollections/sPython garbage-collector generation

Troubleshooting

Debug Mode

Important: Debug mode is not supported for data collection jobs created via the UI using the Dyncfg feature.

To troubleshoot issues with the prometheus collector, run the go.d.plugin with the debug option enabled. The output should give you clues as to why the collector isn't working.

  • Navigate to the plugins.d directory, usually at /usr/libexec/netdata/plugins.d/. If that's not the case on your system, open netdata.conf and look for the plugins setting under [directories].

    cd /usr/libexec/netdata/plugins.d/
  • Switch to the netdata user.

    sudo -u netdata -s
  • Run the go.d.plugin to debug the collector:

    ./go.d.plugin -d -m prometheus

    To debug a specific job:

    ./go.d.plugin -d -m prometheus -j jobName

Getting Logs

If you're encountering problems with the prometheus collector, follow these steps to retrieve logs and identify potential issues:

  • Run the command specific to your system (systemd, non-systemd, or Docker container).
  • Examine the output for any warnings or error messages that might indicate issues. These messages should provide clues about the root cause of the problem.

System with systemd

Use the following command to view logs generated since the last Netdata service restart:

journalctl _SYSTEMD_INVOCATION_ID="$(systemctl show --value --property=InvocationID netdata)" --namespace=netdata --grep prometheus

System without systemd

Locate the collector log file, typically at /var/log/netdata/collector.log, and use grep to filter for collector's name:

grep prometheus /var/log/netdata/collector.log

Note: This method shows logs from all restarts. Focus on the latest entries for troubleshooting current issues.

Docker Container

If your Netdata runs in a Docker container named "netdata" (replace if different), use this command:

docker logs netdata 2>&1 | grep prometheus

Disappearing or sparse metrics not clearing alerts

The Prometheus collector detects metrics that disappear from a successful scrape response. Generated charts and individual dimensions expire after their configured successful-cycle lifetime. An expired chart or dimension makes its alerts REMOVED; this is not a normal CLEAR transition and does not send a recovery notification. Export an explicit normal value (for example 0) whenever an alert needs a reliable recovery transition. A failed scrape does not advance the expiry lifetime; use the generic collector collection-failure alert to detect that separate condition.


Do you have any feedback for this page? If so, you can open a new issue on our netdata/learn repository.