Prometheus
Nexus Repository may export metrics in Prometheus format to monitor your instance. Once Prometheus is running, verify connectivity between Prometheus and Nexus Repository at http://your-prometheus-server/targets. Prometheus may be used as a datasource for another tool like GrafanaGrafana or Elastic.
/service/rest/metrics/prometheus
Uses the nx-metrics-all privilege to access the endpoint.
Example Prometheus YAML
# my global config
global:
scrape_interval: 15s # Set the scrape interval to every 15 seconds. The default is every 1 minute.
evaluation_interval: 15s # Evaluate rules every 15 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# Alertmanager configuration
alerting:
alertmanagers:
- static_configs:
- targets:
# - alertmanager:9093
# Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
rule_files:
scrape_configs:
- job_name: "prometheus"
scrape_interval: 15s
scrape_timeout: 10s
metrics_path: /service/rest/metrics/prometheus
scheme: http
basic_auth:
username: admin
password: admin
static_configs:
- targets: ["localhost:8081"]