<commit_before>exclude:
  - id: /etc/diamond/collectors/HttpdCollector.conf


/etc/apache2/sites-available/stats.conf:
  file.managed:
    - source: salt://monitoring/client/configs/apache2.conf
    - user: root
    - group: root
    - mode: 644
    - require:
      - pkg: apache2
    - watch_in:
      - service: apache2


/etc/apache2/sites-enabled/stats.conf:
  cmd.run:
    - name: a2ensite stats
    - unless: ls /etc/apache2/sites-enabled/stats.conf
    - require:
      - file: /etc/apache2/sites-available/stats.conf
    - require:
      - pkg: apache2
    - watch_in:
      - service: apache2


HttpdCollector-Override:
  file.managed:
    - name: /etc/diamond/collectors/HttpdCollector.conf
    - source: salt://monitoring/client/configs/Collector.conf.jinja
    - template: jinja
    - context:
      collector:
        enabled: True
    - use:
      - file: /etc/diamond/diamond.conf
    - watch_in:
      - service: diamond
    - require:
      - file: /etc/apache2/sites-available/stats.conf
      - file: /etc/apache2/sites-enabled/stats.conf<commit_msg>Use the correct require<commit_after>exclude:
  - id: /etc/diamond/collectors/HttpdCollector.conf


/etc/apache2/sites-available/stats.conf:
  file.managed:
    - source: salt://monitoring/client/configs/apache2.conf
    - user: root
    - group: root
    - mode: 644
    - require:
      - pkg: apache2
    - watch_in:
      - service: apache2


/etc/apache2/sites-enabled/stats.conf:
  cmd.run:
    - name: a2ensite stats
    - unless: ls /etc/apache2/sites-enabled/stats.conf
    - require:
      - file: /etc/apache2/sites-available/stats.conf
    - require:
      - pkg: apache2
    - watch_in:
      - service: apache2


HttpdCollector-Override:
  file.managed:
    - name: /etc/diamond/collectors/HttpdCollector.conf
    - source: salt://monitoring/client/configs/Collector.conf.jinja
    - template: jinja
    - context:
      collector:
        enabled: True
    - use:
      - file: /etc/diamond/diamond.conf
    - watch_in:
      - service: diamond
    - require:
      - file: /etc/apache2/sites-available/stats.conf
      - cmd: /etc/apache2/sites-enabled/stats.conf
{'fraction_non_alphanumeric': 0.1275011633317822, 'fraction_numerical': 0.013959981386691484, 'mean_word_length': 2.1899109792284865, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4545335', 'n_tokens_mistral': 792, 'n_tokens_neox': 733, 'n_words': 120}