Skip to content

Metrics

The 10x Metrics API provides Prometheus-compliant REST endpoints to query the Log10x hosted or self-hosted Prometheus backend for TenXSummary metrics and to monitor 10x Engine health.

Used by the MCP

The MCP cost tools run these queries against your metrics backend.

Deployment Metrics Endpoint User Management Endpoint
Cloud (SaaS) https://prometheus.log10x.com https://api.log10x.com
Staging https://prometheus-staging.log10x.com https://api-staging.log10x.com
Self-Hosted Your configured endpoint Your configured endpoint

Authenticate by placing your Log10x API key in an X-10X-Auth header.

Use this API to build custom cost analyses, dashboards, and automation on top of the per-pattern cost time series.

Endpoints

The prometheus.log10x.com endpoint exposes the following Prometheus HTTP API endpoints:

Endpoint Methods Description
/query POST/GET Instant queries
/query_range POST/GET Range queries
/query_exemplars POST/GET Query exemplars
/series POST/GET Find series by label
/labels POST/GET Get label names
/label/{name}/values GET Get label values
Example: Query Pipeline Health
curl -s -H "X-10X-Auth: <YOUR-API-KEY>" \
  "https://prometheus.log10x.com/api/v1/query?query=tenx_pipeline_up"

Response:

{
  "status": "success",
  "data": {
    "resultType": "vector",
    "result": [
      {
        "metric": {
          "TENX_Tenant": "00000000-0000-0000-0000-000000000000",
          "__name__": "tenx_pipeline_up",
          "tenx_env": "production",
          "tenx_host_name": "edge-node-1",
          "tenx_pipeline_uuid": "a1b2c3d4-...",
          "tenx_reported_name": "my-10x-pipeline"
        },
        "value": [1704109200, "1"]
      }
    ]
  }
}

Demo License Queries

Holders of an anonymous demo license can read back the metrics that the same license wrote, without an API key, via the /api/v1/demo/* mirror of the query endpoints. Authenticate with the demo license JWT in an Authorization: Bearer header (not X-10X-Auth):

Endpoint Methods
/api/v1/demo/query POST/GET
/api/v1/demo/query_range POST/GET
/api/v1/demo/query_exemplars POST/GET
/api/v1/demo/series POST/GET
/api/v1/demo/labels POST/GET
/api/v1/demo/label/{name}/values GET

Demo limits

Demo queries are bounded to the last 3 hours of data and are rate limited. A request whose start, end, or time falls outside the 3-hour window, or whose PromQL range selector (e.g. [24h]) exceeds it, returns 400 with an explanation. For full-history, higher-throughput access, use an API key against the standard endpoints above. The AI query endpoints (/query_ai) are not available to demo licenses.

Example: Query demo data with a demo license
# Mint a demo license (response includes { "license": "<jwt>", ... })
LICENSE=$(curl -s -X POST "https://api.log10x.com/api/v1/license/demo" | jq -r .license)

# Read back what that license wrote (last 3 hours only)
curl -s -H "Authorization: Bearer $LICENSE" \
  "https://prometheus.log10x.com/api/v1/demo/query?query=tenx_pipeline_up"

Available Metrics

Pipeline Health

Metric Type Description
tenx_pipeline_up Gauge Pipeline running status (1 = up)
tenx_pipeline_bootstrap_time_seconds Gauge Pipeline startup time
tenx_pipeline_runtime_seconds Gauge Total pipeline runtime
tenx_pipeline_input_time_seconds Gauge Time spent processing input
tenx_pipeline_invocation_time_seconds Gauge Function invocation time

Event Counters

Metric Type Description
totalEvents_total Counter Total events processed
totalBytes_total Counter Total bytes processed
tokenized_total Counter Events matched to templates
nonTokenized_total Counter Events without template matches
singleEvents_total Counter Single (non-grouped) events
eventGroups_total Counter Number of event groups

Volume Metrics

Metric Type Description
all_events_summaryVolume_total Counter Total event volume
all_events_summaryBytes_total Counter Total event bytes
emitted_events_summaryVolume_total Counter Emitted event volume
emitted_events_summaryBytes_total Counter Emitted event bytes
emitted_events_optimized_size_total Counter Optimized output size
indexed_events_summaryVolume_total Counter Indexed event volume
indexed_events_summaryBytes_total Counter Indexed event bytes
streamed_events_summaryVolume_total Counter Streamed event volume
streamed_events_summaryBytes_total Counter Streamed event bytes

Available Labels

Labels allow filtering and grouping metrics by dimension:

Label Description
TENX_Tenant Tenant/organization ID
tenx_env Environment (e.g., production, staging)
tenx_app Application name
tenx_sub_app Sub-application identifier
tenx_host_name Host running the pipeline
tenx_pipeline_uuid Unique pipeline instance ID
tenx_reported_name User-defined pipeline name
tenx_fwd_input Log forwarder input source
severity_level Log severity level
message_pattern Matched message template
http_code HTTP response code
http_message HTTP response message
k8s_namespace Kubernetes namespace
k8s_pod Kubernetes pod name
k8s_container Kubernetes container name
index_app Target index application
index_file Target index file
tenx_user_service User-defined service label
tenx_user_process User-defined process label

Query Examples

List All Metric Names
curl -s -H "X-10X-Auth: <YOUR-API-KEY>" \
  "https://prometheus.log10x.com/api/v1/label/__name__/values" | jq
Query Event Volume by Environment
curl -s -H "X-10X-Auth: <YOUR-API-KEY>" \
  "https://prometheus.log10x.com/api/v1/query?query=sum(totalEvents_total)by(tenx_env)" | jq
Query Range (Last Hour)
curl -s -H "X-10X-Auth: <YOUR-API-KEY>" \
  "https://prometheus.log10x.com/api/v1/query_range?\
query=rate(totalEvents_total[5m])&\
start=$(date -u -v-1H +%Y-%m-%dT%H:%M:%SZ)&\
end=$(date -u +%Y-%m-%dT%H:%M:%SZ)&\
step=60s" | jq
Get Series Metadata
curl -s -H "X-10X-Auth: <YOUR-API-KEY>" \
  "https://prometheus.log10x.com/api/v1/series?match[]=tenx_pipeline_up" | jq