<commit_before>---
apiVersion: v0
product:
  name: cf-rabbitmq
  version: latest

metadata:
  source_id: <%= spec.deployment.include?("service-instance") ? spec.deployment.split("_")[1] : spec.deployment %>
  deployment: <%= spec.deployment %>
  expected_number_of_nodes: <%= link('rabbitmq-server').instances.size %>

indicators:
  - name: channels_count
    promql: _p_rabbitmq_rabbitmq_channels_count{source_id="$source_id", deployment="$deployment"}
    documentation:
      title: Channel Count
      description: The number of channels open on the cluster

  - name: connections_count
    promql: _p_rabbitmq_rabbitmq_connections_count{source_id="$source_id", deployment="$deployment"}
    documentation:
      title: Connection Count
      description: The number of connections open on the cluster

  - name: consumers_count
    promql: _p_rabbitmq_rabbitmq_consumers_count{source_id="$source_id", deployment="$deployment"}
    documentation:
      title: Consumer Count
      description: The number of consumers registered on the cluster

  - name: erlang_processes
    promql: _p_rabbitmq_rabbitmq_erlang_erlang_processes{source_id="$source_id", deployment="$deployment"}
    thresholds:
      - level: critical
        gt: 950000
      - level: warning
        gt: 900000
    documentation:
      title: Erlang Processes
      description: The number of erlang processes consumed by RabbitMQ, which runs on an Erlang VM. This is the key indicator of the processing capability of a cluster. <commit_msg>Fix indicator metrics output for pre-provisioned<commit_after>---
apiVersion: v0
product:
  name: cf-rabbitmq
  version: latest

metadata:
  source_id: <%= spec.deployment.include?("service-instance") ? spec.deployment.split("_")[1] : "p-rabbitmq" %>
  deployment: <%= spec.deployment.include?("service-instance") ? spec.deployment : "cf-rabbitmq" %>
  expected_number_of_nodes: <%= link('rabbitmq-server').instances.size %>

indicators:
  - name: channels_count
    promql: _p_rabbitmq_rabbitmq_channels_count{source_id="$source_id", deployment="$deployment"}
    documentation:
      title: Channel Count
      description: The number of channels open on the cluster

  - name: connections_count
    promql: _p_rabbitmq_rabbitmq_connections_count{source_id="$source_id", deployment="$deployment"}
    documentation:
      title: Connection Count
      description: The number of connections open on the cluster

  - name: consumers_count
    promql: _p_rabbitmq_rabbitmq_consumers_count{source_id="$source_id", deployment="$deployment"}
    documentation:
      title: Consumer Count
      description: The number of consumers registered on the cluster

  - name: erlang_processes
    promql: _p_rabbitmq_rabbitmq_erlang_erlang_processes{source_id="$source_id", deployment="$deployment"}
    thresholds:
      - level: critical
        gt: 950000
      - level: warning
        gt: 900000
    documentation:
      title: Erlang Processes
      description: The number of erlang processes consumed by RabbitMQ, which runs on an Erlang VM. This is the key indicator of the processing capability of a cluster. 
{'fraction_non_alphanumeric': 0.09221902017291066, 'fraction_numerical': 0.008965738072366315, 'mean_word_length': 4.285956006768189, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2760846', 'n_tokens_mistral': 951, 'n_tokens_neox': 872, 'n_words': 241}