<commit_before>---
include:
  default:
    - profile::messaging::rabbitmq
    - profile::logging::rsyslog::client

profile::messaging::rabbitmq::manage_rsyslog: true

# Sensu
profile::base::common::packages:
  'gcc-c++': {}

profile::monitoring::sensu::agent::plugins:
  sensu-plugins-rabbitmq:
    type:         package
    pkg_version:  '2.0.0'

profile::monitoring::sensu::agent::checks:
  'metrics-rabbitmq-overview':
    type:         'metric'
    command:      'metrics-rabbitmq-overview.rb --scheme mq.%{::hostname}'
    interval:     60
    subscribers:  ['metrics']
    handlers:     ['graphite_tcp']

profile::messaging::rabbitmq::users:
  nova:
    password: "%{hiera('nova::rabbit_password')}"
  cinder:
    password: "%{hiera('cinder::rabbit_password')}"
  neutron:
    password: "%{hiera('neutron::rabbit_password')}"
  sensu:
    password: "%{hiera('sensu::rabbit_password')}"
  local:
    password: "%{hiera('local_rabbit_password')}"
    tags:     'monitoring'

#  glance:
#    password: "%{hiera('glance::rabbit_password')}"

profile::messaging::rabbitmq::vhosts:
  nova: {}
  cinder: {}
  neutron: {}
  sensu: {}
#  glance: {}

profile::messaging::rabbitmq::user_permissions:
  'nova@nova':
    configure_permission: '.*'
    write_permission:     '.*'
    read_permission:      '.*'
  'cinder@cinder':
    configure_permission: '.*'
    write_permission:     '.*'
    read_permission:      '.*'
  'neutron@neutron':
    configure_permission: '.*'
    write_permission:     '.*'
    read_permission:      '.*'
  'sensu@sensu':
    configure_permission: '.*'
    write_permission:     '.*'
    read_permission:      '.*'
#  'local@*':
#    read_permission:      '.*'
#  'glance@glance':
#    configure_permission: '.*'
#    write_permission:     '.*'
#    read_permission:      '.*'

profile::messaging::rabbitmq::policy:
  ha-all@nova:
    pattern:                '.*'
    priority:               0
    applyto:                'all'
    definition:
      'ha-mode':            'all'
      'ha-sync-mode':       'automatic'
<commit_msg>Use new rabbitmq monitor user for sensu metrics<commit_after>---
include:
  default:
    - profile::messaging::rabbitmq
    - profile::logging::rsyslog::client

profile::messaging::rabbitmq::manage_rsyslog: true

# Sensu
profile::base::common::packages:
  'gcc-c++': {}

profile::monitoring::sensu::agent::plugins:
  sensu-plugins-rabbitmq:
    type:         package
    pkg_version:  '2.0.0'

profile::monitoring::sensu::agent::checks:
  'metrics-rabbitmq-overview':
    type:         'metric'
    command:      "metrics-rabbitmq-overview.rb --scheme mq.%{::hostname} --user local --password %{hiera('local_rabbit_password')}"
    interval:     60
    subscribers:  ['metrics']
    handlers:     ['graphite_tcp']

profile::messaging::rabbitmq::users:
  nova:
    password: "%{hiera('nova::rabbit_password')}"
  cinder:
    password: "%{hiera('cinder::rabbit_password')}"
  neutron:
    password: "%{hiera('neutron::rabbit_password')}"
  sensu:
    password: "%{hiera('sensu::rabbit_password')}"
  local:
    password: "%{hiera('local_rabbit_password')}"
    tags:     'monitoring'

#  glance:
#    password: "%{hiera('glance::rabbit_password')}"

profile::messaging::rabbitmq::vhosts:
  nova: {}
  cinder: {}
  neutron: {}
  sensu: {}
#  glance: {}

profile::messaging::rabbitmq::user_permissions:
  'nova@nova':
    configure_permission: '.*'
    write_permission:     '.*'
    read_permission:      '.*'
  'cinder@cinder':
    configure_permission: '.*'
    write_permission:     '.*'
    read_permission:      '.*'
  'neutron@neutron':
    configure_permission: '.*'
    write_permission:     '.*'
    read_permission:      '.*'
  'sensu@sensu':
    configure_permission: '.*'
    write_permission:     '.*'
    read_permission:      '.*'
#  'local@*':
#    read_permission:      '.*'
#  'glance@glance':
#    configure_permission: '.*'
#    write_permission:     '.*'
#    read_permission:      '.*'

profile::messaging::rabbitmq::policy:
  ha-all@nova:
    pattern:                '.*'
    priority:               0
    applyto:                'all'
    definition:
      'ha-mode':            'all'
      'ha-sync-mode':       'automatic'

{'fraction_non_alphanumeric': 0.17642857142857143, 'fraction_numerical': 0.002857142857142857, 'mean_word_length': 3.039423076923077, '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': '6862785', 'n_tokens_mistral': 1513, 'n_tokens_neox': 1453, 'n_words': 195}