Metrics
Conduit exposes a set of useful metrics for your modules using Prometheus, allowing you to monitor the health and status of your backend and diagnose any potential issues in your deployment.
Inspection
Conduit's Admin Panel displays metric information through numerous indicator elements and configurable graphs in its interface so that you may conveniently inspect your deployment.
Most critical information is already exposed there, but if wish to personalize your own dashboard or fine-tune the way you observe your metrics, you may always manually set up Grafana, or any other metrics inspection tool that supports Prometheus, and configure it however you see fit for your own needs.
Configuration
CLI Deployments
If you're setting up a local deployment using Conduit's CLI you should already have metrics-support enabled out of the box for all of your modules.
Prometheus runs on http://localhost:9090.
Individual module metrics server endpoints are not directly exposed outside the container network
so as to avoid any potential port collisions, therefore you can't manually scrape them using a custom Prometheus setup,
but you may still run PromQL queries for all of them through the pre-deployed Prometheus instance.
Manual Deployments
If you're manually configuring your own dev/production cluster, you should provide and configure a Prometheus instance to be used by your deployment.
Conduit Core and modules expect you to specify a port for their metrics http server
through the METRICS_PORT
environment variable.
You may ping their /metrics
endpoint on the specified port to collect individual container metrics.
Exposed metrics data is formatted for Prometheus.
Your Prometheus instance should be configured appropriately so as to scrape these endpoints.
In order for the Admin Panel to display metrics-related information
you should also provide Conduit-UI with your Prometheus instance's url through the PROMETHEUS_URL
env var.
Prometheus Configuration Example
global:
scrape_interval: 5s
scrape_timeout: 5s
evaluation_interval: 5s
alerting:
alertmanagers:
- static_configs:
- targets: []
scheme: http
timeout: 10s
api_version: v1
scrape_configs:
- job_name: prometheus
honor_timestamps: true
scrape_interval: 3s
scrape_timeout: 3s
metrics_path: /metrics
scheme: http
static_configs:
- labels:
module: 'Core'
targets: ['conduit:9091']
- labels:
module: 'Database'
targets: ['conduit-database:9092']
- labels:
module: 'Router'
targets: ['conduit-router:9093']
- labels:
module: 'Authentication'
targets: ['conduit-authentication:9094']
- labels:
module: 'Chat'
targets: ['conduit-chat:9095']
- labels:
module: 'Email'
targets: ['conduit-email:9096']
- labels:
module: 'Forms'
targets: ['conduit-forms:9097']
- labels:
module: 'Push Notifications'
targets: ['conduit-push-notifications:9098']
- labels:
module: 'SMS'
targets: ['conduit-sms:9099']
- labels:
module: 'Storage'
targets: ['conduit-storage:9190']
Available Metrics
You may look up all available metrics for your deployment directly through your Prometheus instance.
Here is a handy list of all the available metrics that can be collected from Conduit.
Base Metrics
These are standard metrics utilized by all Conduit services.
conduit_internal_grpc_requests_total
- Tracks the total number of Conduit's internal gRPC requests.conduit_client_grpc_requests_total
- Tracks the total number of the client gRPC requests.conduit_admin_grpc_requests_total
- Tracks the total number of the admin gRPC requests.conduit_client_grpc_errors_total
- Tracks the total number of client gRPC errors.conduit_admin_grpc_errors_total
- Tracks the total number of admin gRPC errors.conduit_module_health_state
- Tracks the health state of the module.conduit_grpc_request_latency_seconds
- Tracks the latency of gRPC requests in seconds.conduit_grpc_response_statuses_total
- Tracks the total number of gRPC response codes.
Conduit (Core)
conduit_admin_routes_total
- Tracks the total number of registered admin routes.
Authentication
conduit_login_requests_total
- Tracks the total number of login requests.conduit_logged_in_users_total
- Tracks the total number of logged-in users.
Authorization
conduit_authorization_requests_total
- Tracks the total number of authorization requests.conduit_authorization_rules_total
- Tracks the total number of stored rules.conduit_authorization_roles_total
- Tracks the total number of stored roles.conduit_authorization_denials
- Tracks the total number of denials in the authz requests.
Chat
conduit_chat_rooms_total
- Tracks the total number of chat rooms.conduit_messages_sent_total
- Tracks the total number of messages sent.
Database
conduit_database_queries_total
- Tracks the total number of database queries.conduit_registered_schemas_total
- Tracks the total number of registered schemas.conduit_custom_endpoints_total
- Tracks the total number of custom endpoints.
Email
conduit_emails_sent_total
- Tracks the total number of emails sent.conduit_email_templates_total
- Tracks the total number of email templates.
Forms
conduit_forms_total
- Tracks the total number of forms created.
Push Notifications
conduit_push_notifications_sent_total
- Tracks the total number of push notifications sent.
Router
conduit_client_routes_total
- Tracks the total number of registered client routes.conduit_security_clients_total
- Tracks the total number of security clients.
SMS
conduit_sms_sent_total
- Tracks the total number of sms sent.
Storage
conduit_containers_total
- Tracks the total number of containers.conduit_folders_total
- Tracks the total number of folders.conduit_files_total
- Tracks the total number of files.conduit_storage_size_bytes_total
- Tracks the cumulative size of all files in bytes.