Metrics
The 10x Metrics API provides Prometheus-compliant REST endpoints to query the Log10x SaaS or self-hosted Prometheus backend for TenXSummary metrics and to monitor 10x Engine health.
Reference Implementation
The Console App uses these queries for its dashboard and ROI calculations. See its API Reference section for real-world examples.
| 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.
For a real-world example, see the Policy module which uses an Apache Camel YAML route to periodically query this API and generate a GitOps policy lookup table for filtering TenXObjects at runtime.
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"]
}
]
}
}
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 |
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 |