prometheus connection with jenkins

Install Jenkins

plugin install prometheus

install prometheus in linux

docker exec -it containerid sh

vi /etc/prometheus/prometheus.yml

paste it in it

global:
  scrape_interval:     15s
  evaluation_interval: 15s
  scrape_timeout:      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:
  # - "first_rules.yml"
  # - "second_rules.yml"

# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
  - job_name: 'prometheus'
    static_configs:
    - targets: ['localhost:9090']
  - job_name: 'jenkins'
    metrics_path: /prometheus/
    static_configs:
    - targets: ['192.168.32.13:8080']

change 192.......... to public id

save it

exit

docker restart promethus container

docker ps

check in prometheus status