This feature is introduced in v2022.06.0. It is deployed behind a preference, which is disabled by default. The feature is disabled on dashboard.gitguardian.com.
Applicative metrics are gathered thanks to Prometheus, a software used for event monitoring and alerting, which permits scraping the data captured in the application.
#Enable or disable Application metrics
Applicative metrics are deactivated by default. Two steps are needed to activate Application Metrics:
- authorize collection of metrics by the application
- activate Prometheus export
#Authorize metrics collection
To authorize the metrics collection, you should go to the Preferences section
in the Admin Area, check the
prometheus_metrics_active feature flag and
To disable it, you should uncheck this parameter and save settings.
#Activate Prometheus export
Metrics are collected by Prometheus using the Prometheus Operator. This Operator is automatically installed within Embedded Clusters.
For Existing Clusters, you should manually install it (installation documentation).
To create exporter resources and allow automatic discovery, you should go in the admin console and check the Activate Prometheus Exporter checkbox in the Prometheus section of the configuration section.
Then save the configuration, and Deploy the application to apply the new configuration.
To disable it, you should uncheck this parameter, save configuration, and apply it through a new deployment.
#How to collect metrics
#For Embedded Clusters
Prometheus is installed on Embedded clusters and allows full observability of the cluster. For more information, read the Monitoring section on Replicated website.
This kind of installation uses Kube-Prometheus operator. Applicative metrics are directly available through this installation.
#For Existing Clusters
On Existing Clusters, Prometheus must be installed and configured manually. If the Kube-Prometheus Operator is used, all the applicative metrics will be automatically listed thanks to the Discovery service of Kube-Prometheus Operator.
Otherwise, a manual configuration may be needed.
Applicative metrics discovery is possible through the
app-monitoring headless service.
This service exposes an
exporter pod serving metrics at http://exporter-xxxxx-xxxxx:8082/metrics
The Prometheus exporter gives access to the following metrics:
|gim_version_info||Info||Version of the application||Application version, TokenScanner version|
|gim_active_users_total||Gauge||All users in the system||None|
|gim_issues_total||Gauge||All incidents in the system||Severity, Status|
|gim_occurrences_total||Gauge||All occurrences in the system||Hidden, Status|
|gim_commits_total||Gauge||Commits processed||Account, Scan type|
|gim_public_api_quota_total||Gauge||Maximum allowed usage of the Public API||Account|
|gim_public_api_usage_total||Gauge||Current usage of the Public API||Account|
|gim_public_api_token_total||Gauge||Count of active tokens for the Public API||Account, Type|
|gim_postgres_used_disk_bytes||Gauge||Disk space used by PostgreSQL data||None|
|gim_redis_used_memory_bytes||Gauge||Memory used by Redis data||None|
|gim_redis_available_memory_bytes||Gauge||Memory available for Redis data||None|