sfp Server
Configure sfp to send metrics to sfp server with built-in Victoria Metrics for centralized metrics storage and querying.
Availability
✅
❌
From
January 26
sfp-pro includes a built-in metrics collector powered by Victoria Metrics. This is the default metrics destination for sfp-pro users - once configured, all sfp commands automatically emit metrics to the server.
Overview
When SFP_SERVER_URL is configured, all sfp commands (build, deploy, release, validate, etc.) automatically send metrics to your sfp server instance where they are stored in Victoria Metrics. No additional flags or configuration is needed.
You can then query and visualize these metrics using:
The
sfp metrics:querycommand for ad-hoc queriesThe
sfp metrics:displaycommand for summary dashboardsDirect Victoria Metrics API access for advanced use cases
Prerequisites
sfp server running (see Server Setup)
Server authentication configured (see Server Authentication)
Configuration
Using sfp config
Set the server URL and authentication credentials globally:
Using Environment Variables
Alternatively, set environment variables in your CI/CD pipeline:
Using Flags
Pass credentials directly to commands:
How It Works
Once SFP_SERVER_URL is set, metrics flow automatically:
Automatic Collection: Every sfp command emits metrics during execution
Batching: Metrics are batched for efficient network usage
Ingestion: Batched metrics are sent to the server's
/sfp/api/metrics/ingestendpointStorage: sfp server stores metrics in Victoria Metrics
Querying: Use
metrics:queryormetrics:displayto retrieve data
No changes to your existing workflows are required - just configure the server URL and metrics will start flowing.
Authentication Requirements
Metrics Ingestion
Metrics ingestion requires an application token (used by CI/CD pipelines). When authenticated with a user token, the server silently accepts the request but does not store the metrics. This design ensures:
CI/CD pipelines with application tokens can emit metrics
Local development with user tokens doesn't fail or require special handling
Metrics data comes only from automated pipelines, ensuring consistency
To create an application token for your CI/CD pipeline, see Application Tokens.
Metrics Querying
Both user tokens and application tokens can query metrics using metrics:query and metrics:display commands.
Querying Metrics
Using metrics:query
Query metrics using simple names or MetricsQL expressions:
Using metrics:display
View a summary dashboard of key metrics:
Available Range Options
5m
5 minutes
15m
15 minutes
30m
30 minutes
1h
1 hour
3h
3 hours
6h
6 hours
12h
12 hours
24h
24 hours
2d
2 days
7d
7 days
30d
30 days
Metric Categories
The display command provides summaries for these categories:
build
Build operations and package counts
deploy
Deployment success rates and timing
validate
Validation execution statistics
release
Release operations and package stats
prepare
Pool preparation metrics
JSON Output
Both commands support JSON output for programmatic access:
Combining with Other Collectors
sfp server metrics can be used alongside other collectors. When SFP_SERVER_URL is configured, metrics are sent to the server in addition to any other configured destinations (DataDog, NewRelic, etc.).
Troubleshooting
No Metrics Appearing
Verify you're using an application token: User tokens are silently accepted but metrics are not stored. CI/CD pipelines must use application tokens for metrics ingestion.
Verify server is running:
sfp server statusCheck authentication:
sfp server auth whoamiEnsure server URL is correct:
sfp config list | grep server-url
Query Returns No Data
Verify the time range covers when metrics were sent
Check metric name spelling (use
sfp metrics:query --label __name__to list all metrics)Ensure the metric prefix is correct (
sfpowerscripts.is auto-added for-nflag)
Connection Errors
Check network connectivity to the server
Verify firewall rules allow traffic on port 3029
Check server logs:
sfp server logs
Last updated