Prometheus
Direct Scraping
Basic prometheus.yml configuration:
scrape_configs: - job_name: "xray-checker" metrics_path: "/metrics" static_configs: - targets: ["localhost:2112"] scrape_interval: 1m
With authentication:
scrape_configs: - job_name: "xray-checker" metrics_path: "/metrics" basic_auth: username: "metricsUser" password: "MetricsVeryHardPassword" static_configs: - targets: ["localhost:2112"]
Pushgateway Integration
Prometheus configuration for Pushgateway:
scrape_configs: - job_name: "pushgateway" honor_labels: true static_configs: - targets: ["pushgateway:9091"]
Xray Checker configuration:
METRICS_PUSH_URL="http://user:password@pushgateway:9091"