wso2 / product-microgateway

Choreo Connect is a cloud-native, open-source, and developer-centric API gateway.
https://wso2.com/choreo/choreo-connect/
Apache License 2.0
292 stars 251 forks source link

Wrong indentation in prometheus.yaml #2204

Open gayanlggd opened 3 years ago

gayanlggd commented 3 years ago

Description:

The prometheus.yaml configuration given in the below page is incorrect in terms of its indentation.

https://mg.docs.wso2.com/en/latest/how-tos/observability/

Steps to reproduce:

Use the configuration and try to run the docker image and it will fail with the following error.

level=error ts=2021-08-21T02:55:41.047Z caller=main.go:350 msg="Error loading config (--config.file=/etc/prometheus/prometheus.yml)" err="parsing YAML file /etc/prometheus/prometheus.yml: yaml: line 7: did not find expected '-' indicator"

Move scrape_configs and job_name two spaces to the left.

Content Positioning in Documentation:

https://mg.docs.wso2.com/en/latest/how-tos/observability/

VirajSalaka commented 1 year ago
global:
  scrape_interval:  15s
  evaluation_interval: 15s

scrape_configs:
  - job_name: 'Ballerina_Metrics'
    basic_auth:
      username: prometheus
      password: 'password'
    scheme: https
    tls_config:
      insecure_skip_verify: true

    metrics_path: /metrics

    static_configs:
      - targets: ['<user_IP>:9000']

  - job_name: 'JMX_Metrics'

    basic_auth:
      username: prometheus
      password: 'password'

    scheme: https
    tls_config:
      insecure_skip_verify: true

    metrics_path: /jmxMetrics

    static_configs:
      - targets: ['<user_IP>:9000']
Mariangela commented 1 year ago

@ruthryi , please look into this!