Overview
Infisical exports metrics in OpenTelemetry (OTEL) format, which provides maximum flexibility for your monitoring infrastructure. While this guide focuses on Grafana, the OTEL format means you can easily integrate with:- Cloud-native monitoring: AWS CloudWatch, Google Cloud Monitoring, Azure Monitor
- Observability platforms: Datadog, New Relic, Splunk, Dynatrace
- Custom backends: Any system that supports OTEL ingestion
- Traditional monitoring: Prometheus, Grafana (as covered in this guide)
- Pull-based (Prometheus): Exposes metrics on a dedicated endpoint for Prometheus to scrape
- Push-based (OTLP): Sends metrics to an OpenTelemetry Collector via OTLP protocol
Prerequisites
- Self-hosted Infisical instance running
- Access to deploy monitoring services (Prometheus, Grafana, etc.)
- Basic understanding of Prometheus and Grafana
Environment Variables
Configure the following environment variables in your Infisical backend:OTEL_COLLECTOR_BASIC_AUTH_USERNAME
and OTEL_COLLECTOR_BASIC_AUTH_PASSWORD
values must match the credentials configured in your OpenTelemetry Collector’s basicauth/server
extension. These are not hardcoded values - you configure them in your collector configuration file.
Option 1: Pull-based Monitoring (Prometheus)
This approach exposes metrics on port 9464 at the/metrics
endpoint, allowing Prometheus to scrape the data. The metrics are exposed in Prometheus format but originate from OpenTelemetry instrumentation.
Configuration
-
Enable Prometheus export in Infisical:
-
Expose the metrics port in your Infisical backend:
- Docker: Expose port 9464
- Kubernetes: Create a service exposing port 9464
- Other: Ensure port 9464 is accessible to your monitoring stack
-
Create Prometheus configuration (
prometheus.yml
):Note: Replaceinfisical-backend:9464
with the actual hostname and port where your Infisical backend is running. This could be:- Docker Compose:
infisical-backend:9464
(service name) - Kubernetes:
infisical-backend.default.svc.cluster.local:9464
(service name) - Bare Metal:
192.168.1.100:9464
(actual IP address) - Cloud:
your-infisical.example.com:9464
(domain name)
- Docker Compose:
Deployment Options
Docker Compose
Kubernetes
Helm
Option 2: Push-based Monitoring (OTLP)
This approach sends metrics directly to an OpenTelemetry Collector via the OTLP protocol. This gives you the most flexibility as you can configure the collector to export to multiple backends simultaneously.Configuration
-
Enable OTLP export in Infisical:
-
Create OpenTelemetry Collector configuration (
otel-collector-config.yaml
):Important: Replaceyour_username:your_password
with your chosen credentials. These must match the values you set in Infisical’sOTEL_COLLECTOR_BASIC_AUTH_USERNAME
andOTEL_COLLECTOR_BASIC_AUTH_PASSWORD
environment variables. -
Create Prometheus configuration for the collector:
Note: Replace
otel-collector:8889
with the actual hostname and port where your OpenTelemetry Collector is running. This could be:- Docker Compose:
otel-collector:8889
(service name) - Kubernetes:
otel-collector.default.svc.cluster.local:8889
(service name) - Bare Metal:
192.168.1.100:8889
(actual IP address) - Cloud:
your-collector.example.com:8889
(domain name)
- Docker Compose:
Deployment Options
Docker Compose
Kubernetes
Helm
Alternative Backends
Since Infisical exports in OpenTelemetry format, you can easily configure the collector to send metrics to other backends instead of (or in addition to) Prometheus:Cloud-Native Examples
Multi-Backend Configuration
Setting Up Grafana
- Access Grafana: Navigate to your Grafana instance
- Login: Use your configured credentials
- Add Prometheus Data Source:
- Go to Configuration → Data Sources
- Click “Add data source”
- Select “Prometheus”
- Set URL to your Prometheus endpoint
- Click “Save & Test”
Available Metrics
Infisical exposes the following key metrics in OpenTelemetry format:API Performance Metrics
-
API_latency
- API request latency histogram in milliseconds- Labels:
route
,method
,statusCode
- Example: Monitor response times for specific endpoints
- Labels:
-
API_errors
- API error count histogram- Labels:
route
,method
,type
,name
- Example: Track error rates by endpoint and error type
- Labels:
Integration & Secret Sync Metrics
-
integration_secret_sync_errors
- Integration secret sync error count- Labels:
version
,integration
,integrationId
,type
,status
,name
,projectId
- Example: Monitor integration sync failures across different services
- Labels:
-
secret_sync_sync_secrets_errors
- Secret sync operation error count- Labels:
version
,destination
,syncId
,projectId
,type
,status
,name
- Example: Track secret sync failures to external systems
- Labels:
-
secret_sync_import_secrets_errors
- Secret import operation error count- Labels:
version
,destination
,syncId
,projectId
,type
,status
,name
- Example: Monitor secret import failures
- Labels:
-
secret_sync_remove_secrets_errors
- Secret removal operation error count- Labels:
version
,destination
,syncId
,projectId
,type
,status
,name
- Example: Track secret removal operation failures
- Labels:
System Metrics
These metrics are automatically collected by OpenTelemetry’s HTTP instrumentation:http_server_duration
- HTTP server request duration metrics (histogram buckets, count, sum)http_client_duration
- HTTP client request duration metrics (histogram buckets, count, sum)
Custom Business Metrics
infisical_secret_operations_total
- Total secret operationsinfisical_secrets_processed_total
- Total secrets processed
Troubleshooting
Common Issues
-
Metrics not appearing:
- Check if
OTEL_TELEMETRY_COLLECTION_ENABLED=true
- Verify the correct
OTEL_EXPORT_TYPE
is set - Check network connectivity between services
- Check if
-
Authentication errors:
- Verify basic auth credentials in OTLP configuration
- Check if credentials match between Infisical and collector