<commit_before>---
name: prometheus

instance_groups:
  - name: alertmanager
    azs:
      - z1
    instances: 1
    vm_type: default
    persistent_disk_type: 1GB
    stemcell: default
    networks:
      - name: default
    jobs:
      - name: alertmanager
        release: prometheus
        properties:
          alertmanager:
            mesh:
              password: ((alertmanager_mesh_password))
            route:
              receiver: default
            receivers:
              - name: default
            test_alert:
              daily: true

  - name: prometheus
    azs:
      - z1
    instances: 1
    vm_type: default
    persistent_disk_type: 10GB
    stemcell: default
    networks:
      - name: default
    jobs:
      - name: prometheus
        release: prometheus
        properties:
          prometheus:
            rule_files:
              - /var/vcap/jobs/postgres_alerts/*.alerts
              - /var/vcap/jobs/prometheus_alerts/*.alerts
            scrape_configs:
              - job_name: prometheus
                static_configs:
                - targets:
                  - localhost:9090
      - name: postgres_alerts
        release: prometheus
      - name: prometheus_alerts
        release: prometheus

  - name: database
    azs:
      - z1
    instances: 1
    vm_type: default
    persistent_disk_type: 10GB
    stemcell: default
    networks:
      - name: default
    jobs:
      - name: postgres
        release: postgres
        properties:
          databases:
            port: 5432
            databases:
              - name: grafana
                citext: true
            roles:
              - name: grafana
                password: ((<PASSWORD>))
      - name: postgres_exporter
        release: prometheus
        properties:
          postgres_exporter:
            datasource_name: postgresql://grafana:((postgres_grafana_password))@127.0.0.1:5432/?sslmode=disable

  - name: grafana
    azs:
      - z1
    instances: 1
    vm_type: default
    persistent_disk_type: 1GB
    stemcell: default
    networks:
      - name: default
    jobs:
      - name: grafana
        release: prometheus
        properties:
          grafana:
            database:
              type: postgres
              port: 5432
              name: grafana
              user: grafana
              password: ((<PASSWORD>))
            session:
              provider: postgres
              provider_port: 5432
              provider_name: grafana
              provider_user: grafana
              provider_password: ((postgres_grafana_password))
            security:
              admin_user: admin
              admin_password: ((<PASSWORD>))
              secret_key: ((grafana_secret_key))
            dashboards:
              json:
                enabled: true
            prometheus:
              dashboard_files:
                - /var/vcap/jobs/grafana_dashboards/*.json
                - /var/vcap/jobs/postgres_dashboards/*.json
                - /var/vcap/jobs/prometheus_dashboards/*.json
      - name: grafana_dashboards
        release: prometheus
      - name: postgres_dashboards
        release: prometheus
      - name: prometheus_dashboards
        release: prometheus

  - name: nginx
    azs:
      - z1
    instances: 1
    vm_type: default
    stemcell: default
    networks:
      - name: default
    jobs:
      - name: nginx
        release: prometheus
        properties:
          nginx:
            alertmanager:
              auth_username: admin
              auth_password: <PASSWORD>))
            prometheus:
              auth_username: admin
              auth_password: ((<PASSWORD>))

variables:
  - name: alertmanager_password
    type: password
  - name: alertmanager_mesh_password
    type: password
  - name: prometheus_password
    type: password
  - name: postgres_grafana_password
    type: password
  - name: grafana_password
    type: password
  - name: grafana_secret_key
    type: password

update:
  canaries: 1
  max_in_flight: 32
  canary_watch_time: 1000-100000
  update_watch_time: 1000-100000
  serial: false

stemcells:
  - alias: default
    os: ubuntu-trusty
    version: latest

releases:
- name: postgres
  version: "20"
  url: https://bosh.io/d/github.com/cloudfoundry/postgres-release?v=20
  sha1: 3f378bcab294e20316171d4e656636df88763664
- name: prometheus
  version: 18.6.2
  url: https://github.com/cloudfoundry-community/prometheus-boshrelease/releases/download/v18.6.2/prometheus-18.6.2.tgz
  sha1: f6b7ed381a28ce8fef99017a89e1122b718d5556<commit_msg>Upgrade postgres release to v21 at manifest file<commit_after>---
name: prometheus

instance_groups:
  - name: alertmanager
    azs:
      - z1
    instances: 1
    vm_type: default
    persistent_disk_type: 1GB
    stemcell: default
    networks:
      - name: default
    jobs:
      - name: alertmanager
        release: prometheus
        properties:
          alertmanager:
            mesh:
              password: <PASSWORD>))
            route:
              receiver: default
            receivers:
              - name: default
            test_alert:
              daily: true

  - name: prometheus
    azs:
      - z1
    instances: 1
    vm_type: default
    persistent_disk_type: 10GB
    stemcell: default
    networks:
      - name: default
    jobs:
      - name: prometheus
        release: prometheus
        properties:
          prometheus:
            rule_files:
              - /var/vcap/jobs/postgres_alerts/*.alerts
              - /var/vcap/jobs/prometheus_alerts/*.alerts
            scrape_configs:
              - job_name: prometheus
                static_configs:
                - targets:
                  - localhost:9090
      - name: postgres_alerts
        release: prometheus
      - name: prometheus_alerts
        release: prometheus

  - name: database
    azs:
      - z1
    instances: 1
    vm_type: default
    persistent_disk_type: 10GB
    stemcell: default
    networks:
      - name: default
    jobs:
      - name: postgres
        release: postgres
        properties:
          databases:
            port: 5432
            databases:
              - name: grafana
                citext: true
            roles:
              - name: grafana
                password: <PASSWORD>password))
      - name: postgres_exporter
        release: prometheus
        properties:
          postgres_exporter:
            datasource_name: postgresql://grafana:((postgres_grafana_password))@127.0.0.1:5432/?sslmode=disable

  - name: grafana
    azs:
      - z1
    instances: 1
    vm_type: default
    persistent_disk_type: 1GB
    stemcell: default
    networks:
      - name: default
    jobs:
      - name: grafana
        release: prometheus
        properties:
          grafana:
            database:
              type: postgres
              port: 5432
              name: grafana
              user: grafana
              password: ((<PASSWORD>))
            session:
              provider: postgres
              provider_port: 5432
              provider_name: grafana
              provider_user: grafana
              provider_password: ((<PASSWORD>))
            security:
              admin_user: admin
              admin_password: ((<PASSWORD>))
              secret_key: ((grafana_secret_key))
            dashboards:
              json:
                enabled: true
            prometheus:
              dashboard_files:
                - /var/vcap/jobs/grafana_dashboards/*.json
                - /var/vcap/jobs/postgres_dashboards/*.json
                - /var/vcap/jobs/prometheus_dashboards/*.json
      - name: grafana_dashboards
        release: prometheus
      - name: postgres_dashboards
        release: prometheus
      - name: prometheus_dashboards
        release: prometheus

  - name: nginx
    azs:
      - z1
    instances: 1
    vm_type: default
    stemcell: default
    networks:
      - name: default
    jobs:
      - name: nginx
        release: prometheus
        properties:
          nginx:
            alertmanager:
              auth_username: admin
              auth_password: ((<PASSWORD>))
            prometheus:
              auth_username: admin
              auth_password: ((prometheus_password))

variables:
  - name: alertmanager_password
    type: password
  - name: alertmanager_mesh_password
    type: password
  - name: prometheus_password
    type: password
  - name: postgres_grafana_password
    type: password
  - name: grafana_password
    type: password
  - name: grafana_secret_key
    type: password

update:
  canaries: 1
  max_in_flight: 32
  canary_watch_time: 1000-100000
  update_watch_time: 1000-100000
  serial: false

stemcells:
  - alias: default
    os: ubuntu-trusty
    version: latest

releases:
- name: postgres
  version: "21"
  url: https://bosh.io/d/github.com/cloudfoundry/postgres-release?v=21
  sha1: b37916b709fb45ac7de3e195456301cb01a1ae22
- name: prometheus
  version: 18.6.2
  url: https://github.com/cloudfoundry-community/prometheus-boshrelease/releases/download/v18.6.2/prometheus-18.6.2.tgz
  sha1: f6b7ed381a28ce8fef99017a89e1122b718d5556
{'fraction_non_alphanumeric': 0.07452737405748006, 'fraction_numerical': 0.030160638181619494, 'mean_word_length': 1.6405077899596077, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 14, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3273985', 'n_tokens_mistral': 2960, 'n_tokens_neox': 2705, 'n_words': 568}