Metrics: Difference between revisions
(add setup part and prometheus config example) |
(add 'svacer_' prefix) |
||
Line 22: | Line 22: | ||
!Описание | !Описание | ||
|- | |- | ||
| | |svacer_active_imports | ||
| | |Number of active imports of svace/sarif results | ||
|- | |- | ||
| | |svacer_active_snapshot_exports | ||
| | |Number of active snapshot exports | ||
|- | |- | ||
| | |svacer_active_snapshot_imports | ||
| | |Number of active snapshot imports | ||
|- | |- | ||
| | |svacer_comment_changes_since_start | ||
|The total number of comment additions/deletions/modifications since start | |The total number of comment additions/deletions/modifications since start | ||
|- | |- | ||
| | |svacer_import_results_since_start | ||
|The total number of | |The total number of imported results since last server start | ||
|- | |||
|svacer_import_snapshots_since_start | |||
|The total number of imported snapshots since last server start | |||
|- | |- | ||
| | |svacer_rest_import_svace_dirs | ||
|The total number of import svace dir requests via REST endpoint | |The total number of import svace dir requests via REST endpoint | ||
|- | |- | ||
| | |svacer_rest_import_svace_dirs_failed | ||
|The total number of failed import svace dir requests via REST endpoint | |The total number of failed import svace dir requests via REST endpoint | ||
|- | |- | ||
| | |svacer_rest_import_svace_dirs_success | ||
| | |The total number of success import svace dir requests via REST endpoint | ||
|- | |- | ||
| | |svacer_review_changes_since_start | ||
| | |The total number of review modifications since start | ||
|- | |- | ||
| | |svacer_wsocket_sessions_counter | ||
| | |The total number of active web socket connections | ||
|} | |} |
Revision as of 12:17, 4 July 2024
Включение метрик
Для включения метрик запустите сервер Svacer с переменной окружения SVACER_TRACE_OPTIONS=prom_metrics_on
SVACER_TRACE_OPTIONS=prom_metrics_on svacer-server run
После этого метрики будут доступны по URL вашего сервера на /api/metrics
http://localhost:8080/api/metrics
Добавление в Prometheus
Для сбора метрик Прометеусом добавьте в его конфиг-файл /etc/prometheus/prometheus.yml подобную запись, поменяв название, хост и порт на те что у вас
- job_name: svacer-metrics-example metrics_path: /api/metrics static_configs: - targets: ['svacer.ispras.ru:8080']
Список метрик
Название | Описание |
---|---|
svacer_active_imports | Number of active imports of svace/sarif results |
svacer_active_snapshot_exports | Number of active snapshot exports |
svacer_active_snapshot_imports | Number of active snapshot imports |
svacer_comment_changes_since_start | The total number of comment additions/deletions/modifications since start |
svacer_import_results_since_start | The total number of imported results since last server start |
svacer_import_snapshots_since_start | The total number of imported snapshots since last server start |
svacer_rest_import_svace_dirs | The total number of import svace dir requests via REST endpoint |
svacer_rest_import_svace_dirs_failed | The total number of failed import svace dir requests via REST endpoint |
svacer_rest_import_svace_dirs_success | The total number of success import svace dir requests via REST endpoint |
svacer_review_changes_since_start | The total number of review modifications since start |
svacer_wsocket_sessions_counter | The total number of active web socket connections |