メインコンテンツにスキップ

Prometheus

Casdoorのランタイムメトリクス(APIスループット、APIレイテンシ、CPU使用率、メモリ使用率など)を収集するには、Prometheusプロファイルを設定する必要があります。

global:
scrape_interval: 10s # The time interval for fetching metrics

scrape_configs:
- job_name: 'prometheus'
static_configs:
- targets: ['localhost:9090']
- job_name: 'casdoor' # Name of the application to be monitored
static_configs:
- targets: ['localhost:8000'] # Back-end address of Casdoor deployment
metrics_path: '/api/metrics' # Path for collecting indicators

設定が成功すると、Prometheusで以下の情報が見つかります:

情報