Skip to content

Prometheus

Environment contains a proxy version of federated Prometheus - small VM which passes all the data to the OpsControl.

The manifest is in file prometheus_standalone_with_consul.yml

Deployment base

https://github.com/bosh-prometheus/prometheus-boshrelease#basic-deployment

Deployment version

v24.1.0

Manifest

instance_groups:
  - name: prometheus2
    azs:
      - z1
    instances: 1
    vm_type: general_medium
    persistent_disk_type: 10GB
    stemcell: default
    networks:
      - name: ((network_name))
    jobs:
    - name: prometheus2
      release: prometheus
      properties:
        prometheus:
          rule_files:
            - /var/vcap/jobs/postgres_alerts/*.alerts.yml
            - /var/vcap/jobs/prometheus_alerts/*.alerts.yml
          scrape_configs:
            - job_name: prometheus
              static_configs:
              - targets:
                - localhost:9090
            - job_name: bosh_director
              static_configs:
              - targets:
                - ((bosh_internal_ip)):9100

    - name: consul
      release: consul
      provides:
        consul_servers:
          as: consul_leaders
          shared: true
      consumes:
        consul_servers: { from: consul_leaders }
      properties:
        consul:
          verify_incoming: false
          server: true
          datacenter: opscontrol
          agent_config:
            start_join:
            - ((opscontrol_consul_address))
            retry_join:
            - ((opscontrol_consul_address))
            ports:
              dns: 8600
            node_name: ((env_name))-prometheus
            bootstrap_expect: 0

Configured operations files

Priority Ops name Description
100 cb-prometheus-deployment/ops/metrics-forwarder-standalone.yml Run prometheus in metrics forwarder mode
200 cb-prometheus-deployment/ops/rename-prometheus-vm.yml Rename the instance