Skip to content

[monitoring] scraping of endpoint /v1/stats/db is not included in prometheus configuration #85

@bmm-alc

Description

@bmm-alc

In the prometheus monitoring container the file prometheus.yml there is no section for database metric endpoint as documented in the API reference /v1/stats/db

current state of the file

scrape_configs:
  # Monitor prometheus itself
  - job_name: 'prometheus'
    metrics_path: /metrics
    scrape_interval: 5s
    static_configs:
      - targets: ['localhost:9090']
  # Monitor App Stats of Biz Clients
  - job_name: 'appstats'
    metrics_path: /v1/stats/app
    params:
      format: ['prometheus']
    bearer_token_file: /etc/prometheus/auth_token
    static_configs:
      - targets: ['whatsapp-web-service']
    tls_config:
      insecure_skip_verify: true
    scheme: https
  # Monitor Webapp Stats of Biz Clients
  - job_name: 'webstats'
    metrics_path: /metrics
    scrape_interval: 5s
    params:
      format: ['prometheus']
    bearer_token_file: /etc/prometheus/auth_token
    static_configs:
      - targets: ['whatsapp-web-service']
    tls_config:
      insecure_skip_verify: true
    scheme: https
  # Monitor DB
  - job_name: 'mysqld-exporter'
    static_configs:
    - targets: ['mysqld-exporter:9104']
    relabel_configs:
      - source_labels: ['instance']
        target_label: 'instance'
        replacement: database
  # Monitor DB System
  - job_name: 'db-node-exporter'
    static_configs:
    - targets: ['127.0.0.1']
    relabel_configs:
      - source_labels: ['instance']
        target_label: 'instance'
        replacement: database
  # Monitor node and container
  - job_name: 'default'
    file_sd_configs:
      - files:
        - /etc/prometheus/targets.json
        refresh_interval: 30s

missing part

- job_name: 'dbstats'
    metrics_path: /v1/stats/db
    params:
      format: ['prometheus']
    bearer_token_file: /etc/prometheus/auth_token
    static_configs:
      - targets: ['whatsapp-web-service']
    tls_config:
      insecure_skip_verify: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions